From 2e742bbf5891657df5be50fc265eef1bce9fd9d5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 13 Mar 2022 10:35:41 +0000 Subject: [PATCH] CodeGen from PR 18195 in Azure/azure-rest-api-specs Merge b08c47a0db9f4c8fcf1751c208002776d0faeb81 into 2c66a689c610dbef623d6c4e4c4e913446d5ac68 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 1185 +++++++++++++---- .../pom.xml | 2 +- .../SecurityInsightsManager.java | 148 +- .../fluent/ActionsClient.java | 4 +- .../fluent/AlertRuleTemplatesClient.java | 4 +- .../fluent/AlertRulesClient.java | 4 +- .../fluent/AutomationRulesClient.java | 73 +- .../fluent/BookmarkRelationsClient.java | 4 +- .../fluent/BookmarksClient.java | 4 +- .../fluent/DataConnectorsClient.java | 4 +- .../fluent/EntitiesClient.java | 4 +- .../fluent/EntitiesRelationsClient.java | 4 +- .../fluent/EntityQueriesClient.java | 4 +- .../fluent/EntityQueryTemplatesClient.java | 8 +- .../fluent/IncidentCommentsClient.java | 4 +- .../fluent/IncidentRelationsClient.java | 4 +- .../fluent/IncidentsClient.java | 40 +- .../fluent/MetadatasClient.java | 4 +- .../fluent/OfficeConsentsClient.java | 4 +- .../fluent/OperationsClient.java | 6 +- .../fluent/SecurityInsights.java | 90 +- .../fluent/SourceControlsClient.java | 4 +- .../SourceControlsOperationsClient.java | 4 +- .../ThreatIntelligenceIndicatorsClient.java | 20 +- ...ntelligenceIndicatorsOperationsClient.java | 4 +- .../fluent/WatchlistItemsClient.java | 9 +- .../fluent/WatchlistsClient.java | 34 +- .../AadCheckRequirementsProperties.java | 4 - .../models/AadDataConnectorProperties.java | 4 - .../AatpCheckRequirementsProperties.java | 4 - .../models/AatpDataConnectorProperties.java | 4 - .../models/AccountEntityProperties.java | 4 - .../models/ActionRequestProperties.java | 7 +- .../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 - .../models/AnomaliesSettingsProperties.java | 4 - .../fluent/models/ApiPollingParameters.java | 4 - .../AscCheckRequirementsProperties.java | 4 - .../models/AscDataConnectorProperties.java | 4 - .../fluent/models/AutomationRuleInner.java | 56 +- .../models/AutomationRuleProperties.java | 75 +- .../AwsCloudTrailDataConnectorProperties.java | 7 +- .../models/AwsS3DataConnectorProperties.java | 13 +- .../models/AzureResourceEntityProperties.java | 4 - .../models/BookmarkExpandResponseInner.java | 4 - .../fluent/models/BookmarkInner.java | 75 +- .../fluent/models/BookmarkProperties.java | 92 +- .../CloudApplicationEntityProperties.java | 4 - .../fluent/models/CodelessParameters.java | 4 - .../fluent/models/DataConnectorInner.java | 10 +- .../DataConnectorRequirementsStateInner.java | 4 - .../fluent/models/DnsEntityProperties.java | 4 - ...ynamics365CheckRequirementsProperties.java | 4 - .../Dynamics365DataConnectorProperties.java | 7 +- .../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 - .../models/FusionAlertRuleProperties.java | 83 +- .../FusionAlertRuleTemplateProperties.java | 252 +++- .../models/GetQueriesResponseInner.java | 4 - .../fluent/models/HostEntityProperties.java | 4 - .../models/HuntingBookmarkProperties.java | 9 +- .../fluent/models/IncidentAlertListInner.java | 7 +- .../models/IncidentBookmarkListInner.java | 7 +- .../fluent/models/IncidentCommentInner.java | 4 - .../models/IncidentCommentProperties.java | 7 +- .../models/IncidentEntitiesResponseInner.java | 4 - .../fluent/models/IncidentInner.java | 4 - .../models/IncidentPropertiesInner.java | 11 +- .../IoTCheckRequirementsProperties.java | 46 + .../models/IoTDataConnectorProperties.java | 57 + .../models/IoTDeviceEntityProperties.java | 4 - .../fluent/models/IpEntityProperties.java | 4 - ...LBehaviorAnalyticsAlertRuleProperties.java | 22 +- ...rAnalyticsAlertRuleTemplateProperties.java | 42 +- .../models/MailClusterEntityProperties.java | 4 - .../models/MailMessageEntityProperties.java | 4 - .../models/MailboxEntityProperties.java | 4 - .../models/MalwareEntityProperties.java | 4 - .../McasCheckRequirementsProperties.java | 4 - .../models/McasDataConnectorProperties.java | 7 +- .../MdatpCheckRequirementsProperties.java | 4 - .../models/MdatpDataConnectorProperties.java | 4 - .../fluent/models/MetadataModelInner.java | 171 ++- .../fluent/models/MetadataProperties.java | 202 ++- .../models/MetadataPropertiesPatch.java | 197 ++- ...tyIncidentCreationAlertRuleProperties.java | 9 +- ...ntCreationAlertRuleTemplateProperties.java | 15 +- .../MstiCheckRequirementsProperties.java | 4 - .../models/MstiDataConnectorProperties.java | 7 +- .../MtpCheckRequirementsProperties.java | 4 - .../models/MtpDataConnectorProperties.java | 7 +- .../fluent/models/NrtAlertRuleProperties.java | 451 ++++++- .../NrtAlertRuleTemplateProperties.java | 48 +- ...365ProjectCheckRequirementsProperties.java | 29 + ...fice365ProjectDataConnectorProperties.java | 68 + .../OfficeAtpCheckRequirementsProperties.java | 4 - .../OfficeAtpDataConnectorProperties.java | 4 - .../fluent/models/OfficeConsentInner.java | 4 - .../models/OfficeConsentProperties.java | 4 - .../models/OfficeDataConnectorProperties.java | 7 +- .../OfficeIrmCheckRequirementsProperties.java | 4 - .../OfficeIrmDataConnectorProperties.java | 4 - ...icePowerBICheckRequirementsProperties.java | 29 + .../OfficePowerBIDataConnectorProperties.java | 68 + .../fluent/models/OperationInner.java | 4 - .../models/ProcessEntityProperties.java | 4 - .../models/RegistryKeyEntityProperties.java | 4 - .../models/RegistryValueEntityProperties.java | 4 - .../fluent/models/RelationInner.java | 4 - .../fluent/models/RelationProperties.java | 7 +- .../fluent/models/RepoInner.java | 4 - .../models/ScheduledAlertRuleProperties.java | 195 +-- .../ScheduledAlertRuleTemplateProperties.java | 384 ++++-- .../models/SecurityAlertProperties.java | 4 - .../models/SecurityGroupEntityProperties.java | 4 - .../models/SentinelOnboardingStateInner.java | 4 - .../SentinelOnboardingStateProperties.java | 4 - .../SentinelOnboardingStatesListInner.java | 7 +- .../fluent/models/SettingListInner.java | 7 +- .../fluent/models/SettingsInner.java | 4 - .../fluent/models/SourceControlInner.java | 76 +- .../models/SourceControlProperties.java | 100 +- .../SubmissionMailEntityProperties.java | 4 - .../models/TICheckRequirementsProperties.java | 4 - .../models/TIDataConnectorProperties.java | 7 +- .../fluent/models/TeamInformationInner.java | 4 - ...ThreatIntelligenceAlertRuleProperties.java | 22 +- ...telligenceAlertRuleTemplateProperties.java | 42 +- ...ThreatIntelligenceIndicatorProperties.java | 4 - .../ThreatIntelligenceInformationInner.java | 4 - .../ThreatIntelligenceMetricsListInner.java | 7 +- .../TiTaxiiCheckRequirementsProperties.java | 4 - .../TiTaxiiDataConnectorProperties.java | 9 +- .../fluent/models/UebaProperties.java | 4 - .../fluent/models/UrlEntityProperties.java | 4 - .../fluent/models/WatchlistInner.java | 60 +- .../fluent/models/WatchlistItemInner.java | 4 - .../models/WatchlistItemProperties.java | 7 +- .../fluent/models/WatchlistProperties.java | 84 +- .../implementation/ActionsClientImpl.java | 11 +- .../implementation/ActionsImpl.java | 35 +- .../AlertRuleTemplatesClientImpl.java | 11 +- .../AlertRuleTemplatesImpl.java | 3 +- .../implementation/AlertRulesClientImpl.java | 11 +- .../implementation/AlertRulesImpl.java | 3 +- .../implementation/AutomationRuleImpl.java | 22 +- .../AutomationRulesClientImpl.java | 434 +++--- .../implementation/AutomationRulesImpl.java | 59 +- .../implementation/BookmarkImpl.java | 44 + .../BookmarkOperationsClientImpl.java | 3 - .../BookmarkOperationsImpl.java | 3 +- .../BookmarkRelationsClientImpl.java | 13 +- .../implementation/BookmarkRelationsImpl.java | 35 +- .../implementation/BookmarksClientImpl.java | 11 +- .../implementation/BookmarksImpl.java | 27 +- ...CheckRequirementsOperationsClientImpl.java | 3 - ...ectorsCheckRequirementsOperationsImpl.java | 4 +- .../DataConnectorsClientImpl.java | 11 +- .../implementation/DataConnectorsImpl.java | 3 +- .../implementation/DomainWhoisClientImpl.java | 3 - .../implementation/DomainWhoisImpl.java | 3 +- .../implementation/EntitiesClientImpl.java | 11 +- .../EntitiesGetTimelinesClientImpl.java | 3 - .../EntitiesGetTimelinesImpl.java | 3 +- .../implementation/EntitiesImpl.java | 3 +- .../EntitiesRelationsClientImpl.java | 13 +- .../implementation/EntitiesRelationsImpl.java | 3 +- .../EntityQueriesClientImpl.java | 13 +- .../implementation/EntityQueriesImpl.java | 3 +- .../EntityQueryTemplatesClientImpl.java | 31 +- .../EntityQueryTemplatesImpl.java | 7 +- .../EntityRelationsClientImpl.java | 3 - .../implementation/EntityRelationsImpl.java | 3 +- .../IncidentCommentsClientImpl.java | 13 +- .../implementation/IncidentCommentsImpl.java | 35 +- .../IncidentRelationsClientImpl.java | 13 +- .../implementation/IncidentRelationsImpl.java | 3 +- .../implementation/IncidentsClientImpl.java | 250 +++- .../implementation/IncidentsImpl.java | 43 +- .../implementation/IpGeodatasClientImpl.java | 3 - .../implementation/IpGeodatasImpl.java | 3 +- .../implementation/MetadataModelImpl.java | 118 ++ .../implementation/MetadatasClientImpl.java | 13 +- .../implementation/MetadatasImpl.java | 27 +- .../OfficeConsentsClientImpl.java | 11 +- .../implementation/OfficeConsentsImpl.java | 3 +- .../implementation/OperationsClientImpl.java | 13 +- .../implementation/OperationsImpl.java | 3 +- .../ProductSettingsClientImpl.java | 3 - .../implementation/ProductSettingsImpl.java | 3 +- .../implementation/SecurityInsightsImpl.java | 178 +-- .../SentinelOnboardingStatesClientImpl.java | 3 - .../SentinelOnboardingStatesImpl.java | 27 +- .../implementation/SourceControlImpl.java | 30 + .../SourceControlsClientImpl.java | 11 +- .../implementation/SourceControlsImpl.java | 3 +- .../SourceControlsOperationsClientImpl.java | 11 +- .../SourceControlsOperationsImpl.java | 27 +- ...ntelligenceIndicatorMetricsClientImpl.java | 3 - ...hreatIntelligenceIndicatorMetricsImpl.java | 3 +- ...hreatIntelligenceIndicatorsClientImpl.java | 55 +- .../ThreatIntelligenceIndicatorsImpl.java | 19 +- ...ligenceIndicatorsOperationsClientImpl.java | 13 +- ...tIntelligenceIndicatorsOperationsImpl.java | 3 +- .../implementation/WatchlistImpl.java | 24 +- .../WatchlistItemsClientImpl.java | 66 +- .../implementation/WatchlistItemsImpl.java | 39 +- .../implementation/WatchlistsClientImpl.java | 139 +- .../implementation/WatchlistsImpl.java | 38 +- .../models/AadCheckRequirements.java | 4 - .../models/AadDataConnector.java | 4 - .../models/AatpCheckRequirements.java | 4 - .../models/AatpDataConnector.java | 4 - .../models/AccountEntity.java | 4 - .../models/ActionPropertiesBase.java | 7 +- .../models/ActionRequest.java | 4 - .../securityinsights/models/ActionType.java | 34 + .../securityinsights/models/Actions.java | 4 +- .../securityinsights/models/ActionsList.java | 7 +- .../models/ActivityCustomEntityQuery.java | 4 - ...tityQueriesPropertiesQueryDefinitions.java | 5 - .../models/ActivityEntityQuery.java | 4 - .../models/ActivityEntityQueryTemplate.java | 4 - ...eryTemplatePropertiesQueryDefinitions.java | 5 - .../models/ActivityTimelineItem.java | 19 +- .../models/AlertDetailsOverride.java | 4 - .../models/AlertRuleTemplateDataSource.java | 4 - .../AlertRuleTemplatePropertiesBase.java | 4 - .../AlertRuleTemplateWithMitreProperties.java | 112 ++ .../models/AlertRuleTemplates.java | 4 +- .../models/AlertRuleTemplatesList.java | 7 +- .../securityinsights/models/AlertRules.java | 4 +- .../models/AlertRulesList.java | 7 +- .../models/AlertsDataTypeOfDataConnector.java | 7 +- .../securityinsights/models/Anomalies.java | 4 - .../models/AscCheckRequirements.java | 4 - .../models/AscDataConnector.java | 4 - .../securityinsights/models/AttackTactic.java | 12 + .../models/AutomationRule.java | 113 +- .../models/AutomationRuleAction.java | 14 +- .../models/AutomationRuleActionType.java | 34 - .../models/AutomationRuleCondition.java | 6 +- .../models/AutomationRuleConditionType.java | 31 - .../AutomationRuleModifyPropertiesAction.java | 26 +- ...ulePropertyConditionSupportedProperty.java | 13 +- ...AutomationRulePropertyValuesCondition.java | 99 +- ...RulePropertyValuesConditionProperties.java | 106 -- .../AutomationRuleRunPlaybookAction.java | 26 +- .../models/AutomationRuleTriggeringLogic.java | 23 +- .../models/AutomationRules.java | 48 +- .../models/AutomationRulesList.java | 57 +- .../securityinsights/models/Availability.java | 4 - .../AwsCloudTrailCheckRequirements.java | 4 - .../models/AwsCloudTrailDataConnector.java | 4 - .../AwsCloudTrailDataConnectorDataTypes.java | 7 +- ...sCloudTrailDataConnectorDataTypesLogs.java | 4 - .../models/AwsS3CheckRequirements.java | 4 - .../models/AwsS3DataConnector.java | 4 - .../models/AwsS3DataConnectorDataTypes.java | 7 +- .../AwsS3DataConnectorDataTypesLogs.java | 4 - .../models/AzureDevOpsResourceInfo.java | 72 + .../models/AzureResourceEntity.java | 4 - .../securityinsights/models/Bookmark.java | 91 +- .../models/BookmarkEntityMappings.java | 76 ++ .../models/BookmarkExpandParameters.java | 4 - .../models/BookmarkExpandResponseValue.java | 4 - .../securityinsights/models/BookmarkList.java | 11 +- .../models/BookmarkRelations.java | 4 +- .../models/BookmarkTimelineItem.java | 7 +- .../securityinsights/models/Bookmarks.java | 4 +- .../securityinsights/models/ClientInfo.java | 4 - .../models/CloudApplicationEntity.java | 4 - .../CodelessApiPollingDataConnector.java | 4 - ...odelessConnectorPollingAuthProperties.java | 7 +- ...elessConnectorPollingConfigProperties.java | 9 +- ...elessConnectorPollingPagingProperties.java | 7 +- ...lessConnectorPollingRequestProperties.java | 11 +- ...essConnectorPollingResponseProperties.java | 7 +- .../CodelessUiConnectorConfigProperties.java | 27 +- ...figPropertiesConnectivityCriteriaItem.java | 6 - ...onnectorConfigPropertiesDataTypesItem.java | 5 - ...ectorConfigPropertiesGraphQueriesItem.java | 5 - ...rConfigPropertiesInstructionStepsItem.java | 5 - ...ctorConfigPropertiesSampleQueriesItem.java | 5 - .../models/CodelessUiDataConnector.java | 4 - .../models/ConditionType.java | 31 + .../models/ConnectedEntity.java | 4 - .../models/ConnectivityCriteria.java | 4 - .../models/ConnectorInstructionModelBase.java | 7 +- .../{Constant69.java => Constant73.java} | 18 +- .../models/ContentPathMap.java | 4 - .../models/CustomEntityQuery.java | 4 - .../securityinsights/models/Customs.java | 4 - .../models/CustomsPermission.java | 4 - .../models/DataConnectorConnectBody.java | 4 - .../models/DataConnectorDataTypeCommon.java | 7 +- .../models/DataConnectorKind.java | 9 + .../models/DataConnectorList.java | 7 +- .../models/DataConnectorTenantId.java | 7 +- .../DataConnectorWithAlertsProperties.java | 4 - .../models/DataConnectors.java | 4 +- .../DataConnectorsCheckRequirements.java | 9 +- .../models/DataTypeDefinitions.java | 4 - .../securityinsights/models/Deployment.java | 151 +++ .../models/DeploymentFetchStatus.java | 37 + .../models/DeploymentInfo.java | 101 ++ .../models/DeploymentResult.java | 37 + .../models/DeploymentState.java | 40 + .../securityinsights/models/DnsEntity.java | 4 - .../models/Dynamics365CheckRequirements.java | 4 - .../models/Dynamics365DataConnector.java | 4 - .../Dynamics365DataConnectorDataTypes.java | 7 +- ...ctorDataTypesDynamics365CdsActivities.java | 6 - .../models/EnrichmentDomainWhoisContact.java | 4 - .../models/EnrichmentDomainWhoisContacts.java | 4 - .../models/EnrichmentDomainWhoisDetails.java | 4 - ...EnrichmentDomainWhoisRegistrarDetails.java | 4 - .../securityinsights/models/Entities.java | 4 +- .../models/EntitiesRelations.java | 4 +- .../models/EntityAnalytics.java | 4 - .../models/EntityCommonProperties.java | 4 - .../securityinsights/models/EntityEdges.java | 4 - .../models/EntityExpandParameters.java | 4 - .../models/EntityExpandResponseValue.java | 4 - .../models/EntityFieldMapping.java | 72 + .../models/EntityGetInsightsParameters.java | 9 +- .../models/EntityInsightItem.java | 4 - .../EntityInsightItemQueryTimeInterval.java | 4 - .../securityinsights/models/EntityList.java | 7 +- .../models/EntityMapping.java | 4 - .../models/EntityQueries.java | 4 +- .../models/EntityQueryItem.java | 4 - .../models/EntityQueryItemProperties.java | 4 - ...ntityQueryItemPropertiesDataTypesItem.java | 4 - .../models/EntityQueryList.java | 7 +- .../models/EntityQueryTemplateList.java | 7 +- .../models/EntityQueryTemplates.java | 6 +- .../models/EntityTimelineItem.java | 4 - .../models/EntityTimelineParameters.java | 9 +- .../models/EventGroupingSettings.java | 4 - .../models/ExpansionEntityQuery.java | 4 - .../models/ExpansionResultAggregation.java | 7 +- .../models/ExpansionResultsMetadata.java | 4 - .../securityinsights/models/EyesOn.java | 4 - .../securityinsights/models/FieldMapping.java | 4 - .../securityinsights/models/FileEntity.java | 4 - .../models/FileHashEntity.java | 4 - .../models/FusionAlertRule.java | 60 +- .../models/FusionAlertRuleTemplate.java | 162 ++- .../FusionScenarioExclusionPattern.java | 87 ++ .../models/FusionSourceSettings.java | 117 ++ .../models/FusionSourceSubTypeSetting.java | 139 ++ .../models/FusionSubTypeSeverityFilter.java | 69 + .../FusionSubTypeSeverityFiltersItem.java | 84 ++ .../models/FusionTemplateSourceSetting.java | 88 ++ .../models/FusionTemplateSourceSubType.java | 112 ++ .../FusionTemplateSubTypeSeverityFilter.java | 79 ++ .../securityinsights/models/GeoLocation.java | 4 - .../models/GetInsightsError.java | 7 +- .../models/GetInsightsResultsMetadata.java | 4 - .../models/GitHubResourceInfo.java | 46 + .../securityinsights/models/GraphQueries.java | 4 - .../models/GroupingConfiguration.java | 9 +- .../securityinsights/models/HostEntity.java | 4 - .../models/HuntingBookmark.java | 4 - .../models/IncidentAdditionalData.java | 35 +- .../models/IncidentCommentList.java | 7 +- .../models/IncidentComments.java | 4 +- .../models/IncidentConfiguration.java | 4 - .../IncidentEntitiesResultsMetadata.java | 7 +- .../securityinsights/models/IncidentInfo.java | 4 - .../models/IncidentLabel.java | 7 +- .../models/IncidentLabelType.java | 4 +- .../securityinsights/models/IncidentList.java | 7 +- .../models/IncidentOwnerInfo.java | 4 - ...ion.java => IncidentPropertiesAction.java} | 172 ++- .../models/IncidentRelations.java | 4 +- .../securityinsights/models/Incidents.java | 37 +- .../models/InsightQueryItem.java | 4 - .../models/InsightQueryItemProperties.java | 4 - ...ghtQueryItemPropertiesAdditionalQuery.java | 4 - ...htQueryItemPropertiesDefaultTimeRange.java | 4 - ...QueryItemPropertiesReferenceTimeRange.java | 5 - .../InsightQueryItemPropertiesTableQuery.java | 4 - ...rtiesTableQueryColumnsDefinitionsItem.java | 6 - ...rtiesTableQueryQueriesDefinitionsItem.java | 6 - ...QueriesDefinitionsPropertiesItemsItem.java | 6 - .../models/InsightsTableResult.java | 4 - .../InsightsTableResultColumnsItem.java | 4 - .../models/InstructionSteps.java | 4 - .../InstructionStepsInstructionsItem.java | 4 - .../models/IoTCheckRequirements.java | 68 + .../models/IoTDataConnector.java | 99 ++ .../models/IoTDeviceEntity.java | 4 - .../securityinsights/models/IpEntity.java | 4 - .../securityinsights/models/Kind.java | 9 + .../models/LastDataReceivedDataType.java | 4 - .../models/MLBehaviorAnalyticsAlertRule.java | 13 +- .../MLBehaviorAnalyticsAlertRuleTemplate.java | 31 +- .../models/MailClusterEntity.java | 4 - .../models/MailMessageEntity.java | 4 - .../models/MailboxEntity.java | 4 - .../models/MalwareEntity.java | 4 - .../models/ManualTriggerRequestBody.java | 73 + .../models/McasCheckRequirements.java | 4 - .../models/McasDataConnector.java | 4 - .../models/McasDataConnectorDataTypes.java | 4 - .../models/MdatpCheckRequirements.java | 4 - .../models/MdatpDataConnector.java | 4 - .../models/MetadataAuthor.java | 4 - .../models/MetadataCategories.java | 4 - .../models/MetadataDependencies.java | 4 - .../securityinsights/models/MetadataList.java | 7 +- .../models/MetadataModel.java | 226 +++- .../models/MetadataPatch.java | 171 ++- .../models/MetadataSource.java | 7 +- .../models/MetadataSupport.java | 7 +- .../securityinsights/models/Metadatas.java | 4 +- ...softSecurityIncidentCreationAlertRule.java | 4 - ...dentCreationAlertRuleCommonProperties.java | 10 +- ...rityIncidentCreationAlertRuleTemplate.java | 5 - .../models/MstiCheckRequirements.java | 4 - .../models/MstiDataConnector.java | 4 - .../models/MstiDataConnectorDataTypes.java | 9 +- ...nnectorDataTypesBingSafetyPhishingUrl.java | 8 +- ...rDataTypesMicrosoftEmergingThreatFeed.java | 9 +- .../models/MtpCheckRequirements.java | 4 - .../models/MtpDataConnector.java | 4 - .../models/MtpDataConnectorDataTypes.java | 7 +- .../MtpDataConnectorDataTypesIncidents.java | 4 - .../securityinsights/models/NrtAlertRule.java | 370 ++++- .../models/NrtAlertRuleTemplate.java | 73 +- .../Office365ProjectCheckRequirements.java | 45 + .../Office365ProjectConnectorDataTypes.java | 57 + ...ffice365ProjectConnectorDataTypesLogs.java | 28 + .../models/Office365ProjectDataConnector.java | 99 ++ .../models/OfficeAtpCheckRequirements.java | 4 - .../models/OfficeAtpDataConnector.java | 4 - .../models/OfficeConsentList.java | 7 +- .../models/OfficeConsents.java | 4 +- .../models/OfficeDataConnector.java | 4 - .../models/OfficeDataConnectorDataTypes.java | 11 +- .../OfficeDataConnectorDataTypesExchange.java | 4 - ...fficeDataConnectorDataTypesSharePoint.java | 4 - .../OfficeDataConnectorDataTypesTeams.java | 4 - .../models/OfficeIrmCheckRequirements.java | 4 - .../models/OfficeIrmDataConnector.java | 4 - .../OfficePowerBICheckRequirements.java | 45 + .../OfficePowerBIConnectorDataTypes.java | 57 + .../OfficePowerBIConnectorDataTypesLogs.java | 28 + .../models/OfficePowerBIDataConnector.java | 99 ++ .../models/OperationDisplay.java | 4 - .../securityinsights/models/Operations.java | 6 +- .../models/OperationsList.java | 7 +- .../securityinsights/models/Permissions.java | 4 - .../models/PermissionsCustomsItem.java | 4 - .../PermissionsResourceProviderItem.java | 4 - ...ion.java => PlaybookActionProperties.java} | 22 +- .../models/ProcessEntity.java | 4 - .../models/PropertyConditionProperties.java | 56 + .../models/QueryBasedAlertRuleProperties.java | 443 ------ ...QueryBasedAlertRuleTemplateProperties.java | 30 - .../models/RegistryKeyEntity.java | 4 - .../models/RegistryValueEntity.java | 4 - .../securityinsights/models/RelationList.java | 7 +- .../securityinsights/models/RepoList.java | 7 +- .../securityinsights/models/Repository.java | 4 - .../models/RepositoryResourceInfo.java | 107 ++ .../models/RequiredPermissions.java | 4 - .../models/ResourceProvider.java | 4 - .../models/ResourceWithEtag.java | 4 - .../models/SampleQueries.java | 4 - .../models/ScheduledAlertRule.java | 213 +-- .../ScheduledAlertRuleCommonProperties.java | 143 +- .../models/ScheduledAlertRuleTemplate.java | 267 ++-- .../models/SecurityAlert.java | 4 - ...yAlertPropertiesConfidenceReasonsItem.java | 5 - .../models/SecurityAlertTimelineItem.java | 19 +- .../models/SecurityGroupEntity.java | 4 - .../securityinsights/models/Source.java | 34 - .../models/SourceControl.java | 58 +- .../models/SourceControlList.java | 7 +- .../models/SourceControls.java | 4 +- .../models/SourceControlsOperations.java | 4 +- .../securityinsights/models/SourceType.java | 34 + .../models/SubmissionMailEntity.java | 4 - .../models/TICheckRequirements.java | 4 - .../models/TIDataConnector.java | 4 - .../models/TIDataConnectorDataTypes.java | 7 +- .../TIDataConnectorDataTypesIndicators.java | 4 - .../models/TeamProperties.java | 7 +- .../models/ThreatIntelligence.java | 4 - .../models/ThreatIntelligenceAlertRule.java | 13 +- .../ThreatIntelligenceAlertRuleTemplate.java | 31 +- .../models/ThreatIntelligenceAppendTags.java | 4 - .../ThreatIntelligenceExternalReference.java | 4 - .../ThreatIntelligenceFilteringCriteria.java | 4 - ...hreatIntelligenceGranularMarkingModel.java | 4 - .../ThreatIntelligenceIndicatorModel.java | 4 - ...elligenceIndicatorModelForRequestBody.java | 751 ----------- .../models/ThreatIntelligenceIndicators.java | 18 +- ...hreatIntelligenceIndicatorsOperations.java | 4 +- .../ThreatIntelligenceInformationList.java | 7 +- .../ThreatIntelligenceKillChainPhase.java | 4 - .../models/ThreatIntelligenceMetric.java | 4 - .../ThreatIntelligenceMetricEntity.java | 4 - .../models/ThreatIntelligenceMetrics.java | 4 - .../ThreatIntelligenceParsedPattern.java | 4 - ...eatIntelligenceParsedPatternTypeValue.java | 4 - .../ThreatIntelligenceResourceKind.java | 56 - .../ThreatIntelligenceSortingCriteria.java | 4 - .../models/TiTaxiiCheckRequirements.java | 4 - .../models/TiTaxiiDataConnector.java | 4 - .../models/TiTaxiiDataConnectorDataTypes.java | 7 +- ...axiiDataConnectorDataTypesTaxiiClient.java | 4 - .../models/TimelineAggregation.java | 7 +- .../models/TimelineError.java | 9 +- .../models/TimelineResultsMetadata.java | 7 +- .../securityinsights/models/Ueba.java | 4 - .../securityinsights/models/UrlEntity.java | 4 - .../securityinsights/models/UserInfo.java | 4 - .../securityinsights/models/Version.java | 34 + .../securityinsights/models/Watchlist.java | 78 +- .../models/WatchlistItemList.java | 7 +- .../models/WatchlistItems.java | 9 +- .../models/WatchlistList.java | 7 +- .../securityinsights/models/Watchlists.java | 17 +- .../WatchlistsCreateOrUpdateHeaders.java | 46 + .../WatchlistsCreateOrUpdateResponse.java | 38 + .../models/WatchlistsDeleteHeaders.java | 46 + .../models/WatchlistsDeleteResponse.java | 26 + .../securityinsights/models/Webhook.java | 124 ++ .../ActionsCreateOrUpdateSamples.java | 2 +- .../generated/ActionsDeleteSamples.java | 2 +- .../generated/ActionsGetSamples.java | 2 +- .../ActionsListByAlertRuleSamples.java | 2 +- .../AlertRuleTemplatesGetSamples.java | 2 +- .../AlertRuleTemplatesListSamples.java | 2 +- .../AlertRulesCreateOrUpdateSamples.java | 481 ++++++- .../generated/AlertRulesDeleteSamples.java | 2 +- .../generated/AlertRulesGetSamples.java | 8 +- .../generated/AlertRulesListSamples.java | 2 +- .../AutomationRulesCreateOrUpdateSamples.java | 62 +- .../AutomationRulesDeleteSamples.java | 6 +- .../generated/AutomationRulesGetSamples.java | 6 +- .../generated/AutomationRulesListSamples.java | 7 +- .../BookmarkOperationExpandSamples.java | 2 +- ...ookmarkRelationsCreateOrUpdateSamples.java | 2 +- .../BookmarkRelationsDeleteSamples.java | 2 +- .../BookmarkRelationsGetSamples.java | 2 +- .../BookmarkRelationsListSamples.java | 2 +- .../BookmarksCreateOrUpdateSamples.java | 18 +- .../generated/BookmarksDeleteSamples.java | 2 +- .../generated/BookmarksGetSamples.java | 2 +- .../generated/BookmarksListSamples.java | 2 +- ...CheckRequirementsOperationPostSamples.java | 78 +- .../DataConnectorsConnectSamples.java | 2 +- .../DataConnectorsCreateOrUpdateSamples.java | 68 +- .../DataConnectorsDeleteSamples.java | 36 +- .../DataConnectorsDisconnectSamples.java | 2 +- .../generated/DataConnectorsGetSamples.java | 101 +- .../generated/DataConnectorsListSamples.java | 2 +- .../generated/DomainWhoisGetSamples.java | 2 +- .../generated/EntitiesExpandSamples.java | 2 +- .../generated/EntitiesGetInsightsSamples.java | 2 +- .../generated/EntitiesGetSamples.java | 40 +- .../EntitiesGetTimelineListSamples.java | 2 +- .../generated/EntitiesListSamples.java | 2 +- .../generated/EntitiesQueriesSamples.java | 2 +- .../EntitiesRelationsListSamples.java | 2 +- .../EntityQueriesCreateOrUpdateSamples.java | 2 +- .../generated/EntityQueriesDeleteSamples.java | 2 +- .../generated/EntityQueriesGetSamples.java | 4 +- .../generated/EntityQueriesListSamples.java | 2 +- .../EntityQueryTemplatesGetSamples.java | 2 +- .../EntityQueryTemplatesListSamples.java | 6 +- .../EntityRelationsGetRelationSamples.java | 2 +- ...IncidentCommentsCreateOrUpdateSamples.java | 2 +- .../IncidentCommentsDeleteSamples.java | 2 +- .../generated/IncidentCommentsGetSamples.java | 2 +- .../IncidentCommentsListSamples.java | 2 +- ...ncidentRelationsCreateOrUpdateSamples.java | 2 +- .../IncidentRelationsDeleteSamples.java | 2 +- .../IncidentRelationsGetSamples.java | 2 +- .../IncidentRelationsListSamples.java | 2 +- .../IncidentsCreateOrUpdateSamples.java | 2 +- .../generated/IncidentsCreateTeamSamples.java | 2 +- .../generated/IncidentsDeleteSamples.java | 2 +- .../generated/IncidentsGetSamples.java | 2 +- .../generated/IncidentsListAlertsSamples.java | 2 +- .../IncidentsListBookmarksSamples.java | 2 +- .../IncidentsListEntitiesSamples.java | 2 +- .../generated/IncidentsListSamples.java | 2 +- .../IncidentsRunPlaybookSamples.java | 25 + .../generated/IpGeodataGetSamples.java | 2 +- .../generated/MetadataCreateSamples.java | 10 +- .../generated/MetadataDeleteSamples.java | 2 +- .../generated/MetadataGetSamples.java | 2 +- .../generated/MetadataListSamples.java | 4 +- .../generated/MetadataUpdateSamples.java | 2 +- .../OfficeConsentsDeleteSamples.java | 2 +- .../generated/OfficeConsentsGetSamples.java | 2 +- .../generated/OfficeConsentsListSamples.java | 2 +- .../generated/OperationsListSamples.java | 22 + .../ProductSettingsDeleteSamples.java | 2 +- .../generated/ProductSettingsGetSamples.java | 2 +- .../generated/ProductSettingsListSamples.java | 2 +- .../ProductSettingsUpdateSamples.java | 2 +- ...SentinelOnboardingStatesCreateSamples.java | 2 +- ...SentinelOnboardingStatesDeleteSamples.java | 2 +- .../SentinelOnboardingStatesGetSamples.java | 2 +- .../SentinelOnboardingStatesListSamples.java | 2 +- .../SourceControlListRepositoriesSamples.java | 2 +- .../SourceControlsOperationCreateSamples.java | 2 +- .../SourceControlsOperationDeleteSamples.java | 2 +- .../SourceControlsOperationGetSamples.java | 2 +- .../SourceControlsOperationListSamples.java | 2 +- ...ntelligenceIndicatorAppendTagsSamples.java | 2 +- ...igenceIndicatorCreateIndicatorSamples.java | 8 +- ...eatIntelligenceIndicatorCreateSamples.java | 8 +- ...eatIntelligenceIndicatorDeleteSamples.java | 2 +- ...ThreatIntelligenceIndicatorGetSamples.java | 2 +- ...telligenceIndicatorMetricsListSamples.java | 2 +- ...igenceIndicatorQueryIndicatorsSamples.java | 2 +- ...telligenceIndicatorReplaceTagsSamples.java | 8 +- ...ligenceIndicatorsOperationListSamples.java | 2 +- .../WatchlistItemsCreateOrUpdateSamples.java | 2 +- .../WatchlistItemsDeleteSamples.java | 2 +- .../generated/WatchlistItemsGetSamples.java | 2 +- .../generated/WatchlistItemsListSamples.java | 4 +- .../WatchlistsCreateOrUpdateSamples.java | 12 +- .../generated/WatchlistsDeleteSamples.java | 2 +- .../generated/WatchlistsGetSamples.java | 2 +- .../generated/WatchlistsListSamples.java | 4 +- 651 files changed, 10974 insertions(+), 5800 deletions(-) create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java rename sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/{Constant69.java => Constant73.java} (64%) create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java rename sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/{AutomationRuleModifyPropertiesActionConfiguration.java => IncidentPropertiesAction.java} (70%) create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java rename sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/{AutomationRuleRunPlaybookActionConfiguration.java => PlaybookActionProperties.java} (67%) create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md index 72e1cc8528da..31fe35e1c686 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-13) + +- Azure Resource Manager SecurityInsights client library for Java. This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md index 1b93d3a71614..8b42d5e173a7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager SecurityInsights client library for Java. -This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-securityinsights - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md index 639641490bec..4b474f2c6e03 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md @@ -118,6 +118,7 @@ - [ListAlerts](#incidents_listalerts) - [ListBookmarks](#incidents_listbookmarks) - [ListEntities](#incidents_listentities) +- [RunPlaybook](#incidents_runplaybook) ## IpGeodata @@ -137,6 +138,10 @@ - [Get](#officeconsents_get) - [List](#officeconsents_list) +## Operations + +- [List](#operations_list) + ## ProductSettings - [Delete](#productsettings_delete) @@ -199,7 +204,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. @@ -230,7 +235,7 @@ import com.azure.core.util.Context; /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -259,7 +264,7 @@ import com.azure.core.util.Context; /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -288,7 +293,7 @@ import com.azure.core.util.Context; /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -310,7 +315,7 @@ import com.azure.core.util.Context; /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -334,7 +339,7 @@ import com.azure.core.util.Context; /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -362,6 +367,10 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingAggregatio import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.FieldMapping; import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSubTypeSetting; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFilter; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFiltersItem; import com.azure.resourcemanager.securityinsights.models.GroupingConfiguration; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.MatchingMethod; @@ -378,7 +387,7 @@ import java.util.Map; /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -396,12 +405,212 @@ public final class AlertRulesCreateOrUpdateSamples { new FusionAlertRule() .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") - .withEnabled(true), + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -425,7 +634,7 @@ public final class AlertRulesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -443,13 +652,12 @@ public final class AlertRulesCreateOrUpdateSamples { new ScheduledAlertRule() .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDescription("An example for a scheduled rule") - .withQuery("Heartbeat") .withDisplayName("My scheduled rule") .withEnabled(true) .withSuppressionDuration(Duration.parse("PT1H")) .withSuppressionEnabled(false) - .withSeverity(AlertSeverity.HIGH) .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) .withIncidentConfiguration( new IncidentConfiguration() .withCreateIncident(true) @@ -463,6 +671,14 @@ public final class AlertRulesCreateOrUpdateSamples { .withGroupByAlertDetails(Arrays.asList(AlertDetail.DISPLAY_NAME)) .withGroupByCustomDetails( Arrays.asList("OperatingSystemType", "OperatingSystemName")))) + .withQuery("Heartbeat") + .withQueryFrequency(Duration.parse("PT1H")) + .withQueryPeriod(Duration.parse("P2DT1H30M")) + .withSeverity(AlertSeverity.HIGH) + .withTriggerOperator(TriggerOperator.GREATER_THAN) + .withTriggerThreshold(0) + .withEventGroupingSettings( + new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)) .withCustomDetails(mapOf("OperatingSystemName", "OSName", "OperatingSystemType", "OSType")) .withEntityMappings( Arrays @@ -486,18 +702,235 @@ public final class AlertRulesCreateOrUpdateSamples { .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")) - .withQueryFrequency(Duration.parse("PT1H")) - .withQueryPeriod(Duration.parse("P2DT1H30M")) - .withTriggerOperator(TriggerOperator.GREATER_THAN) - .withTriggerThreshold(0) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + */ + /** + * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRules() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "myFirstFusionRule", + new FusionAlertRule() + .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") + .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -512,7 +945,30 @@ public final class AlertRulesCreateOrUpdateSamples { "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new NrtAlertRule().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), + new NrtAlertRule() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDescription("") + .withQuery( + "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity =" + + " ComputerIP_Hidden") + .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) + .withDisplayName("Rule2") + .withEnabled(true) + .withSuppressionDuration(Duration.parse("PT1H")) + .withSuppressionEnabled(false) + .withSeverity(AlertSeverity.HIGH) + .withIncidentConfiguration( + new IncidentConfiguration() + .withCreateIncident(true) + .withGroupingConfiguration( + new GroupingConfiguration() + .withEnabled(true) + .withReopenClosedIncident(false) + .withLookbackDuration(Duration.parse("PT5H")) + .withMatchingMethod(MatchingMethod.SELECTED) + .withGroupByEntities( + Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))), Context.NONE); } @@ -537,7 +993,7 @@ import com.azure.core.util.Context; /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -560,7 +1016,7 @@ import com.azure.core.util.Context; /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -575,7 +1031,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -589,7 +1045,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -601,7 +1057,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -625,7 +1081,7 @@ import com.azure.core.util.Context; /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -641,74 +1097,30 @@ public final class AlertRulesListSamples { ### AutomationRules_CreateOrUpdate ```java -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesActionConfiguration; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedOperator; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedProperty; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesCondition; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesConditionProperties; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookActionConfiguration; +import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.TriggersOn; -import com.azure.resourcemanager.securityinsights.models.TriggersWhen; -import java.util.Arrays; +import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/CreateAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an automation rule. + * Sample code: AutomationRules_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnAutomationRule( + public static void automationRulesCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("High severity incidents escalation") - .withOrder(1) - .withTriggeringLogic( - new AutomationRuleTriggeringLogic() - .withIsEnabled(true) - .withTriggersOn(TriggersOn.INCIDENTS) - .withTriggersWhen(TriggersWhen.CREATED) - .withConditions( - Arrays - .asList( - new AutomationRulePropertyValuesCondition() - .withConditionProperties( - new AutomationRulePropertyValuesConditionProperties() - .withPropertyName( - AutomationRulePropertyConditionSupportedProperty - .INCIDENT_RELATED_ANALYTIC_RULE_IDS) - .withOperator(AutomationRulePropertyConditionSupportedOperator.CONTAINS) - .withPropertyValues( - Arrays - .asList( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/fab3d2d4-747f-46a7-8ef0-9c0be8112bf7", - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/8deb8303-e94d-46ff-96e0-5fd94b33df1a")))))) - .withActions( - Arrays - .asList( - new AutomationRuleModifyPropertiesAction() - .withOrder(1) - .withActionConfiguration( - new AutomationRuleModifyPropertiesActionConfiguration() - .withSeverity(IncidentSeverity.HIGH)), - new AutomationRuleRunPlaybookAction() - .withOrder(2) - .withActionConfiguration( - new AutomationRuleRunPlaybookActionConfiguration() - .withLogicAppResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/IncidentPlaybook") - .withTenantId("ee48efaf-50c6-411b-9345-b2bdc3eb4abc")))) + .withDisplayName((String) null) + .withOrder(0) + .withTriggeringLogic((AutomationRuleTriggeringLogic) null) + .withActions((List) null) .create(); } } @@ -722,14 +1134,14 @@ import com.azure.core.util.Context; /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/DeleteAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** - * Sample code: Delete an automation rule. + * Sample code: AutomationRules_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnAutomationRule( + public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() @@ -746,14 +1158,14 @@ import com.azure.core.util.Context; /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/GetAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Get.json */ /** - * Sample code: Get an automation rule. + * Sample code: AutomationRules_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAutomationRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); @@ -769,15 +1181,14 @@ import com.azure.core.util.Context; /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/GetAllAutomationRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_List.json */ /** - * Sample code: Get all automation rules. + * Sample code: AutomationRules_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllAutomationRules( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager.automationRules().list("myRg", "myWorkspace", Context.NONE); } } @@ -794,7 +1205,7 @@ import java.util.UUID; /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. @@ -823,7 +1234,7 @@ public final class BookmarkOperationExpandSamples { /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. @@ -851,7 +1262,7 @@ import com.azure.core.util.Context; /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. @@ -880,7 +1291,7 @@ import com.azure.core.util.Context; /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. @@ -909,7 +1320,7 @@ import com.azure.core.util.Context; /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. @@ -928,6 +1339,9 @@ public final class BookmarkRelationsListSamples { ### Bookmarks_CreateOrUpdate ```java +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; +import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; import java.util.Arrays; @@ -936,7 +1350,7 @@ import java.util.UUID; /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -959,6 +1373,19 @@ public final class BookmarksCreateOrUpdateSamples { .withQueryResult("Security Event query result") .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) .withUpdatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) + .withEntityMappings( + Arrays + .asList( + new BookmarkEntityMappings() + .withEntityType("Account") + .withFieldMappings( + Arrays + .asList( + new EntityFieldMapping() + .withIdentifier("Fullname") + .withValue("johndoe@microsoft.com"))))) + .withTactics(Arrays.asList(AttackTactic.EXECUTION)) + .withTechniques(Arrays.asList("T1609")) .create(); } } @@ -972,7 +1399,7 @@ import com.azure.core.util.Context; /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -995,7 +1422,7 @@ import com.azure.core.util.Context; /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -1018,7 +1445,7 @@ import com.azure.core.util.Context; /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -1045,7 +1472,7 @@ import java.util.Arrays; /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. @@ -1105,11 +1532,17 @@ import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnecto import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; import com.azure.resourcemanager.securityinsights.models.PermissionProviderScope; import com.azure.resourcemanager.securityinsights.models.Permissions; import com.azure.resourcemanager.securityinsights.models.PermissionsCustomsItem; @@ -1131,7 +1564,7 @@ import java.util.Arrays; /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -1159,7 +1592,32 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + */ + /** + * Sample code: Creates or updates an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new OfficePowerBIDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new OfficePowerBIConnectorDataTypes() + .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -1193,7 +1651,7 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -1218,7 +1676,7 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -1245,7 +1703,7 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -1565,7 +2023,32 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Creates or updates an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new Office365ProjectDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new Office365ProjectConnectorDataTypes() + .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. @@ -1718,7 +2201,22 @@ import com.azure.core.util.Context; /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Delete an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -1733,7 +2231,7 @@ public final class DataConnectorsDeleteSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -1748,7 +2246,22 @@ public final class DataConnectorsDeleteSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + */ + /** + * Sample code: Delete an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. @@ -1772,7 +2285,7 @@ import com.azure.core.util.Context; /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. @@ -1796,7 +2309,22 @@ import com.azure.core.util.Context; /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + */ + /** + * Sample code: Get an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -1811,14 +2339,14 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office ATP data connector. + * Sample code: Get an Office ATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeATPDataConnector( + public static void getAnOfficeATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() @@ -1826,7 +2354,22 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetIoTById.json + */ + /** + * Sample code: Get a IoT data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAIoTDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -1841,7 +2384,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -1856,7 +2399,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -1871,7 +2414,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -1886,7 +2429,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -1900,7 +2443,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -1915,7 +2458,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -1930,7 +2473,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -1945,7 +2488,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -1960,52 +2503,52 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office IRM data connector. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeIRMDataConnector( + public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** - * Sample code: Get an AATP data connector. + * Sample code: Get a APIPolling data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAATPDataConnector( + public static void getAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** - * Sample code: Get a APIPolling data connector. + * Sample code: Get an Office IRM data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAAPIPollingDataConnector( + public static void getAnOfficeIRMDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -2020,7 +2563,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -2035,7 +2578,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -2048,6 +2591,21 @@ public final class DataConnectorsGetSamples { .dataConnectors() .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + */ + /** + * Sample code: Get an Office365 PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365PowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } } ``` @@ -2059,7 +2617,7 @@ import com.azure.core.util.Context; /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -2080,18 +2638,21 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; +import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeAtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirements; /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -2106,7 +2667,22 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + */ + /** + * Sample code: Check requirements for Office365Project. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOffice365Project( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json */ /** * Sample code: Check requirements for AAD. @@ -2121,7 +2697,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -2136,7 +2712,26 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + */ + /** + * Sample code: Check requirements for IoT. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForIoT( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -2151,7 +2746,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** * Sample code: Check requirements for AAD - no authorization. @@ -2166,7 +2761,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** * Sample code: Check requirements for ASC. @@ -2185,7 +2780,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -2200,7 +2795,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -2215,7 +2810,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -2230,7 +2825,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -2245,7 +2840,22 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + */ + /** + * Sample code: Check requirements for OfficePowerBI. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOfficePowerBI( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -2260,7 +2870,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** * Sample code: Check requirements for AAD - no license. @@ -2275,7 +2885,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. @@ -2299,7 +2909,7 @@ import com.azure.core.util.Context; /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. @@ -2324,7 +2934,7 @@ import java.util.UUID; /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. @@ -2355,7 +2965,7 @@ import com.azure.core.util.Context; /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -2368,7 +2978,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -2380,7 +2990,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -2392,7 +3002,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -2405,7 +3015,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -2418,7 +3028,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -2430,7 +3040,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -2442,7 +3052,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -2455,7 +3065,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -2467,7 +3077,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -2479,7 +3089,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -2492,7 +3102,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -2504,7 +3114,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -2517,7 +3127,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -2529,7 +3139,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -2542,7 +3152,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -2555,7 +3165,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -2568,7 +3178,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -2581,7 +3191,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -2593,7 +3203,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. @@ -2618,7 +3228,7 @@ import java.util.UUID; /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. @@ -2650,7 +3260,7 @@ import com.azure.core.util.Context; /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. @@ -2672,7 +3282,7 @@ import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. @@ -2702,7 +3312,7 @@ import java.time.OffsetDateTime; /** Samples for EntitiesGetTimeline List. */ public final class EntitiesGetTimelineListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. @@ -2733,7 +3343,7 @@ import com.azure.core.util.Context; /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. @@ -2763,7 +3373,7 @@ import java.util.Map; /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. @@ -2857,7 +3467,7 @@ import com.azure.core.util.Context; /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. @@ -2880,7 +3490,7 @@ import com.azure.core.util.Context; /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -2895,7 +3505,7 @@ public final class EntityQueriesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. @@ -2920,7 +3530,7 @@ import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. @@ -2941,7 +3551,7 @@ import com.azure.core.util.Context; /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. @@ -2961,12 +3571,12 @@ public final class EntityQueryTemplatesGetSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -2975,7 +3585,7 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant69.ACTIVITY, Context.NONE); + manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant73.ACTIVITY, Context.NONE); } } ``` @@ -2988,7 +3598,7 @@ import com.azure.core.util.Context; /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. @@ -3014,7 +3624,7 @@ public final class EntityRelationsGetRelationSamples { /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/CreateIncidentComment.json */ /** * Sample code: Creates or updates an incident comment. @@ -3041,7 +3651,7 @@ import com.azure.core.util.Context; /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/DeleteIncidentComment.json */ /** * Sample code: Delete the incident comment. @@ -3070,7 +3680,7 @@ import com.azure.core.util.Context; /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetIncidentCommentById.json */ /** * Sample code: Get an incident comment. @@ -3099,7 +3709,7 @@ import com.azure.core.util.Context; /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetAllIncidentComments.json */ /** * Sample code: Get all incident comments. @@ -3124,7 +3734,7 @@ import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -3156,7 +3766,7 @@ import com.azure.core.util.Context; /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -3185,7 +3795,7 @@ import com.azure.core.util.Context; /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -3214,7 +3824,7 @@ import com.azure.core.util.Context; /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -3244,7 +3854,7 @@ import java.util.UUID; /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateIncident.json */ /** * Sample code: Creates or updates an incident. @@ -3282,7 +3892,7 @@ import com.azure.resourcemanager.securityinsights.models.TeamProperties; /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateTeam.json */ /** * Sample code: Creates incident teams group. @@ -3311,7 +3921,7 @@ import com.azure.core.util.Context; /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/DeleteIncident.json */ /** * Sample code: Delete an incident. @@ -3334,7 +3944,7 @@ import com.azure.core.util.Context; /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidentById.json */ /** * Sample code: Get an incident. @@ -3357,7 +3967,7 @@ import com.azure.core.util.Context; /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidents.json */ /** * Sample code: Get all incidents. @@ -3378,7 +3988,7 @@ import com.azure.core.util.Context; /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentAlerts.json */ /** * Sample code: Get all incident alerts. @@ -3402,7 +4012,7 @@ import com.azure.core.util.Context; /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentBookmarks.json */ /** * Sample code: Get all incident bookmarks. @@ -3426,7 +4036,7 @@ import com.azure.core.util.Context; /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/entities/GetAllIncidentEntities.json */ /** * Sample code: Gets all incident related entities. @@ -3442,6 +4052,30 @@ public final class IncidentsListEntitiesSamples { } ``` +### Incidents_RunPlaybook + +```java +import com.azure.core.util.Context; + +/** Samples for Incidents RunPlaybook. */ +public final class IncidentsRunPlaybookSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/manualTrigger/AutomationRules_ManualTriggerPlaybook.json + */ + /** + * Sample code: AutomationRules_ManualTriggerPlaybook. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void automationRulesManualTriggerPlaybook( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + } +} +``` + ### IpGeodata_Get ```java @@ -3450,7 +4084,7 @@ import com.azure.core.util.Context; /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. @@ -3482,7 +4116,7 @@ import java.util.Arrays; /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -3548,11 +4182,17 @@ public final class MetadataCreateSamples { .withProviders(Arrays.asList("Amazon", "Microsoft")) .withFirstPublishDate(LocalDate.parse("2021-05-18")) .withLastPublishDate(LocalDate.parse("2021-05-18")) + .withCustomVersion("1.0") + .withContentSchemaVersion("2.0") + .withThreatAnalysisTactics(Arrays.asList("reconnaissance", "commandandcontrol")) + .withThreatAnalysisTechniques(Arrays.asList("T1548", "T1548.001")) + .withPreviewImages(Arrays.asList("firstImage.png", "secondImage.jpeg")) + .withPreviewImagesDark(Arrays.asList("firstImageDark.png", "secondImageDark.jpeg")) .create(); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -3582,7 +4222,7 @@ import com.azure.core.util.Context; /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -3603,7 +4243,7 @@ import com.azure.core.util.Context; /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -3625,7 +4265,7 @@ import com.azure.core.util.Context; /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -3637,7 +4277,7 @@ public final class MetadataListSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -3661,7 +4301,7 @@ import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -3687,7 +4327,7 @@ import com.azure.core.util.Context; /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. @@ -3711,7 +4351,7 @@ import com.azure.core.util.Context; /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. @@ -3734,7 +4374,7 @@ import com.azure.core.util.Context; /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. @@ -3748,6 +4388,27 @@ public final class OfficeConsentsListSamples { } ``` +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/operations/ListOperations.json + */ + /** + * Sample code: Get all operations. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + ### ProductSettings_Delete ```java @@ -3756,7 +4417,7 @@ import com.azure.core.util.Context; /** Samples for ProductSettings Delete. */ public final class ProductSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. @@ -3778,7 +4439,7 @@ import com.azure.core.util.Context; /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. @@ -3799,7 +4460,7 @@ import com.azure.core.util.Context; /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. @@ -3821,7 +4482,7 @@ import com.azure.resourcemanager.securityinsights.models.EyesOn; /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. @@ -3848,7 +4509,7 @@ public final class ProductSettingsUpdateSamples { /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. @@ -3875,7 +4536,7 @@ import com.azure.core.util.Context; /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -3897,7 +4558,7 @@ import com.azure.core.util.Context; /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -3919,7 +4580,7 @@ import com.azure.core.util.Context; /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -3942,7 +4603,7 @@ import com.azure.resourcemanager.securityinsights.models.RepoType; /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. @@ -3967,7 +4628,7 @@ import java.util.Arrays; /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. @@ -4012,7 +4673,7 @@ import com.azure.core.util.Context; /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. @@ -4036,7 +4697,7 @@ import com.azure.core.util.Context; /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. @@ -4059,7 +4720,7 @@ import com.azure.core.util.Context; /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. @@ -4083,7 +4744,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -4108,14 +4769,13 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; +import 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/2021-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -4130,8 +4790,7 @@ public final class ThreatIntelligenceIndicatorCreateSamples { "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) + new ThreatIntelligenceIndicatorModel() .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") @@ -4158,14 +4817,13 @@ public final class ThreatIntelligenceIndicatorCreateSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; +import 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/2021-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -4179,8 +4837,7 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { .createIndicatorWithResponse( "myRg", "myWorkspace", - new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) + new ThreatIntelligenceIndicatorModel() .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") @@ -4211,7 +4868,7 @@ import com.azure.core.util.Context; /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -4235,7 +4892,7 @@ import com.azure.core.util.Context; /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -4263,7 +4920,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -4299,14 +4956,13 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; +import 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/2021-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -4321,8 +4977,7 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) + new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), Context.NONE); @@ -4338,7 +4993,7 @@ import com.azure.core.util.Context; /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -4360,7 +5015,7 @@ import com.azure.core.util.Context; /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -4386,7 +5041,7 @@ import java.io.IOException; /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. @@ -4422,7 +5077,7 @@ import com.azure.core.util.Context; /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. @@ -4447,7 +5102,7 @@ import com.azure.core.util.Context; /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -4471,7 +5126,7 @@ import com.azure.core.util.Context; /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -4480,7 +5135,7 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); } } ``` @@ -4488,12 +5143,12 @@ public final class WatchlistItemsListSamples { ### Watchlists_CreateOrUpdate ```java -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -4509,7 +5164,8 @@ public final class WatchlistsCreateOrUpdateSamples { .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withNumberOfLinesToSkip(1) .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") @@ -4519,7 +5175,7 @@ public final class WatchlistsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. @@ -4535,7 +5191,8 @@ public final class WatchlistsCreateOrUpdateSamples { .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withItemsSearchKey("header1") .create(); @@ -4551,7 +5208,7 @@ import com.azure.core.util.Context; /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -4572,7 +5229,7 @@ import com.azure.core.util.Context; /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -4593,7 +5250,7 @@ import com.azure.core.util.Context; /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -4601,7 +5258,7 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); } } ``` diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml index 722a32c1565f..301510b049b1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for SecurityInsights Management - This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2021-09. + This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java index 278e6696e8f0..382bfa9333f5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java @@ -107,6 +107,8 @@ public final class SecurityInsightsManager { private AutomationRules automationRules; + private Incidents incidents; + private Bookmarks bookmarks; private BookmarkRelations bookmarkRelations; @@ -117,8 +119,6 @@ public final class SecurityInsightsManager { private DomainWhois domainWhois; - private EntityQueries entityQueries; - private Entities entities; private EntitiesGetTimelines entitiesGetTimelines; @@ -127,7 +127,9 @@ public final class SecurityInsightsManager { private EntityRelations entityRelations; - private Incidents incidents; + private EntityQueries entityQueries; + + private EntityQueryTemplates entityQueryTemplates; private IncidentComments incidentComments; @@ -135,6 +137,8 @@ public final class SecurityInsightsManager { private Metadatas metadatas; + private OfficeConsents officeConsents; + private SentinelOnboardingStates sentinelOnboardingStates; private ProductSettings productSettings; @@ -143,6 +147,12 @@ public final class SecurityInsightsManager { private SourceControlsOperations sourceControlsOperations; + private ThreatIntelligenceIndicators threatIntelligenceIndicators; + + private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations; + + private ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics; + private Watchlists watchlists; private WatchlistItems watchlistItems; @@ -151,18 +161,8 @@ public final class SecurityInsightsManager { private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations; - private ThreatIntelligenceIndicators threatIntelligenceIndicators; - - private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations; - - private ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics; - private Operations operations; - private OfficeConsents officeConsents; - - private EntityQueryTemplates entityQueryTemplates; - private final SecurityInsights clientObject; private SecurityInsightsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -201,7 +201,7 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -275,9 +275,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -383,6 +385,14 @@ public AutomationRules automationRules() { return automationRules; } + /** @return Resource collection API of Incidents. */ + public Incidents incidents() { + if (this.incidents == null) { + this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); + } + return incidents; + } + /** @return Resource collection API of Bookmarks. */ public Bookmarks bookmarks() { if (this.bookmarks == null) { @@ -423,14 +433,6 @@ public DomainWhois domainWhois() { return domainWhois; } - /** @return Resource collection API of EntityQueries. */ - public EntityQueries entityQueries() { - if (this.entityQueries == null) { - this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this); - } - return entityQueries; - } - /** @return Resource collection API of Entities. */ public Entities entities() { if (this.entities == null) { @@ -463,12 +465,20 @@ public EntityRelations entityRelations() { return entityRelations; } - /** @return Resource collection API of Incidents. */ - public Incidents incidents() { - if (this.incidents == null) { - this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); + /** @return Resource collection API of EntityQueries. */ + public EntityQueries entityQueries() { + if (this.entityQueries == null) { + this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this); } - return incidents; + return entityQueries; + } + + /** @return Resource collection API of EntityQueryTemplates. */ + public EntityQueryTemplates entityQueryTemplates() { + if (this.entityQueryTemplates == null) { + this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this); + } + return entityQueryTemplates; } /** @return Resource collection API of IncidentComments. */ @@ -495,6 +505,14 @@ public Metadatas metadatas() { return metadatas; } + /** @return Resource collection API of OfficeConsents. */ + public OfficeConsents officeConsents() { + if (this.officeConsents == null) { + this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this); + } + return officeConsents; + } + /** @return Resource collection API of SentinelOnboardingStates. */ public SentinelOnboardingStates sentinelOnboardingStates() { if (this.sentinelOnboardingStates == null) { @@ -529,6 +547,34 @@ public SourceControlsOperations sourceControlsOperations() { return sourceControlsOperations; } + /** @return Resource collection API of ThreatIntelligenceIndicators. */ + public ThreatIntelligenceIndicators threatIntelligenceIndicators() { + if (this.threatIntelligenceIndicators == null) { + this.threatIntelligenceIndicators = + new ThreatIntelligenceIndicatorsImpl(clientObject.getThreatIntelligenceIndicators(), this); + } + return threatIntelligenceIndicators; + } + + /** @return Resource collection API of ThreatIntelligenceIndicatorsOperations. */ + public ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations() { + if (this.threatIntelligenceIndicatorsOperations == null) { + this.threatIntelligenceIndicatorsOperations = + new ThreatIntelligenceIndicatorsOperationsImpl( + clientObject.getThreatIntelligenceIndicatorsOperations(), this); + } + return threatIntelligenceIndicatorsOperations; + } + + /** @return Resource collection API of ThreatIntelligenceIndicatorMetrics. */ + public ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics() { + if (this.threatIntelligenceIndicatorMetrics == null) { + this.threatIntelligenceIndicatorMetrics = + new ThreatIntelligenceIndicatorMetricsImpl(clientObject.getThreatIntelligenceIndicatorMetrics(), this); + } + return threatIntelligenceIndicatorMetrics; + } + /** @return Resource collection API of Watchlists. */ public Watchlists watchlists() { if (this.watchlists == null) { @@ -563,34 +609,6 @@ public DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirements return dataConnectorsCheckRequirementsOperations; } - /** @return Resource collection API of ThreatIntelligenceIndicators. */ - public ThreatIntelligenceIndicators threatIntelligenceIndicators() { - if (this.threatIntelligenceIndicators == null) { - this.threatIntelligenceIndicators = - new ThreatIntelligenceIndicatorsImpl(clientObject.getThreatIntelligenceIndicators(), this); - } - return threatIntelligenceIndicators; - } - - /** @return Resource collection API of ThreatIntelligenceIndicatorsOperations. */ - public ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations() { - if (this.threatIntelligenceIndicatorsOperations == null) { - this.threatIntelligenceIndicatorsOperations = - new ThreatIntelligenceIndicatorsOperationsImpl( - clientObject.getThreatIntelligenceIndicatorsOperations(), this); - } - return threatIntelligenceIndicatorsOperations; - } - - /** @return Resource collection API of ThreatIntelligenceIndicatorMetrics. */ - public ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics() { - if (this.threatIntelligenceIndicatorMetrics == null) { - this.threatIntelligenceIndicatorMetrics = - new ThreatIntelligenceIndicatorMetricsImpl(clientObject.getThreatIntelligenceIndicatorMetrics(), this); - } - return threatIntelligenceIndicatorMetrics; - } - /** @return Resource collection API of Operations. */ public Operations operations() { if (this.operations == null) { @@ -599,22 +617,6 @@ public Operations operations() { return operations; } - /** @return Resource collection API of OfficeConsents. */ - public OfficeConsents officeConsents() { - if (this.officeConsents == null) { - this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this); - } - return officeConsents; - } - - /** @return Resource collection API of EntityQueryTemplates. */ - public EntityQueryTemplates entityQueryTemplates() { - if (this.entityQueryTemplates == null) { - this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this); - } - return entityQueryTemplates; - } - /** * @return Wrapped service client SecurityInsights providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java index b12c368e1059..1679ca2138ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java @@ -23,7 +23,7 @@ public interface ActionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAlertRule(String resourceGroupName, String workspaceName, String ruleId); @@ -38,7 +38,7 @@ public interface ActionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAlertRule( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java index 3a0d28ae7b75..c568ee0f23fe 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java @@ -21,7 +21,7 @@ public interface AlertRuleTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface AlertRuleTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java index 49f5930dfee3..d40ca296e5fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java @@ -21,7 +21,7 @@ public interface AlertRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface AlertRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java index 7548031cd1de..8bdfc546a32d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java @@ -13,33 +13,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public interface AutomationRulesClient { - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** * Gets the automation rule. * @@ -76,15 +49,13 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule); + AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); /** * Creates or updates the automation rule. @@ -92,19 +63,19 @@ AutomationRuleInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. + * @param automationRuleToUpsert The automation rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, - AutomationRuleInner automationRule, + AutomationRuleInner automationRuleToUpsert, Context context); /** @@ -116,9 +87,10 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String automationRuleId); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -130,9 +102,36 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( + Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); + + /** + * Gets all automation rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all automation rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all automation rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all automation rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java index 7c0a3175325a..e644d527b90a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java @@ -22,7 +22,7 @@ public interface BookmarkRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); @@ -43,7 +43,7 @@ public interface BookmarkRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java index 838f53c9e9b8..767fec60845b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java @@ -21,7 +21,7 @@ public interface BookmarksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface BookmarksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java index 2d467c010b58..78d1cc36c200 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java @@ -22,7 +22,7 @@ public interface DataConnectorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -36,7 +36,7 @@ public interface DataConnectorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java index ab94828a4b85..28404013fdcb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java @@ -27,7 +27,7 @@ public interface EntitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -41,7 +41,7 @@ public interface EntitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java index 87e689d8d2ac..10130bd876ab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java @@ -21,7 +21,7 @@ public interface EntitiesRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String entityId); @@ -42,7 +42,7 @@ public interface EntitiesRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java index ef93e7e0a017..68ba3c6be0c3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java @@ -23,7 +23,7 @@ public interface EntityQueriesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -38,7 +38,7 @@ public interface EntityQueriesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java index aaa8ea4813bc..fb6a5304bb07 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java @@ -10,7 +10,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; /** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ public interface EntityQueryTemplatesClient { @@ -22,7 +22,7 @@ public interface EntityQueryTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -37,11 +37,11 @@ public interface EntityQueryTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context); + String resourceGroupName, String workspaceName, Constant73 kind, Context context); /** * Gets an entity query. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java index cf175c6d0278..c8f34adc3578 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java @@ -22,7 +22,7 @@ public interface IncidentCommentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -43,7 +43,7 @@ public interface IncidentCommentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java index 282182e89795..8f2125a0506d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java @@ -22,7 +22,7 @@ public interface IncidentRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -43,7 +43,7 @@ public interface IncidentRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java index 14184afd688f..12e0bda1f5e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java @@ -14,10 +14,46 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; +import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; import com.azure.resourcemanager.securityinsights.models.TeamProperties; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ public interface IncidentsClient { + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); + /** * Gets all incidents. * @@ -26,7 +62,7 @@ public interface IncidentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -46,7 +82,7 @@ public interface IncidentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java index e06c39622eda..a42eaa9112f1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java @@ -22,7 +22,7 @@ public interface MetadatasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -41,7 +41,7 @@ public interface MetadatasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java index 31a46647a64d..09ab2236789b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java @@ -21,7 +21,7 @@ public interface OfficeConsentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface OfficeConsentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java index 86e89630ed8a..c6ad3c2c8036 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java index 05ffac3147e8..89469568f9bb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java @@ -72,6 +72,13 @@ public interface SecurityInsights { */ AutomationRulesClient getAutomationRules(); + /** + * Gets the IncidentsClient object to access its operations. + * + * @return the IncidentsClient object. + */ + IncidentsClient getIncidents(); + /** * Gets the BookmarksClient object to access its operations. * @@ -107,13 +114,6 @@ public interface SecurityInsights { */ DomainWhoisClient getDomainWhois(); - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - EntityQueriesClient getEntityQueries(); - /** * Gets the EntitiesClient object to access its operations. * @@ -143,11 +143,18 @@ public interface SecurityInsights { EntityRelationsClient getEntityRelations(); /** - * Gets the IncidentsClient object to access its operations. + * Gets the EntityQueriesClient object to access its operations. * - * @return the IncidentsClient object. + * @return the EntityQueriesClient object. */ - IncidentsClient getIncidents(); + EntityQueriesClient getEntityQueries(); + + /** + * Gets the EntityQueryTemplatesClient object to access its operations. + * + * @return the EntityQueryTemplatesClient object. + */ + EntityQueryTemplatesClient getEntityQueryTemplates(); /** * Gets the IncidentCommentsClient object to access its operations. @@ -170,6 +177,13 @@ public interface SecurityInsights { */ MetadatasClient getMetadatas(); + /** + * Gets the OfficeConsentsClient object to access its operations. + * + * @return the OfficeConsentsClient object. + */ + OfficeConsentsClient getOfficeConsents(); + /** * Gets the SentinelOnboardingStatesClient object to access its operations. * @@ -199,53 +213,53 @@ public interface SecurityInsights { SourceControlsOperationsClient getSourceControlsOperations(); /** - * Gets the WatchlistsClient object to access its operations. + * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. * - * @return the WatchlistsClient object. + * @return the ThreatIntelligenceIndicatorsClient object. */ - WatchlistsClient getWatchlists(); + ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators(); /** - * Gets the WatchlistItemsClient object to access its operations. + * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. * - * @return the WatchlistItemsClient object. + * @return the ThreatIntelligenceIndicatorsOperationsClient object. */ - WatchlistItemsClient getWatchlistItems(); + ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations(); /** - * Gets the DataConnectorsClient object to access its operations. + * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. * - * @return the DataConnectorsClient object. + * @return the ThreatIntelligenceIndicatorMetricsClient object. */ - DataConnectorsClient getDataConnectors(); + ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics(); /** - * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. + * Gets the WatchlistsClient object to access its operations. * - * @return the DataConnectorsCheckRequirementsOperationsClient object. + * @return the WatchlistsClient object. */ - DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations(); + WatchlistsClient getWatchlists(); /** - * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. + * Gets the WatchlistItemsClient object to access its operations. * - * @return the ThreatIntelligenceIndicatorsClient object. + * @return the WatchlistItemsClient object. */ - ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators(); + WatchlistItemsClient getWatchlistItems(); /** - * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. + * Gets the DataConnectorsClient object to access its operations. * - * @return the ThreatIntelligenceIndicatorsOperationsClient object. + * @return the DataConnectorsClient object. */ - ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations(); + DataConnectorsClient getDataConnectors(); /** - * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. + * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. * - * @return the ThreatIntelligenceIndicatorMetricsClient object. + * @return the DataConnectorsCheckRequirementsOperationsClient object. */ - ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics(); + DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations(); /** * Gets the OperationsClient object to access its operations. @@ -253,18 +267,4 @@ public interface SecurityInsights { * @return the OperationsClient object. */ OperationsClient getOperations(); - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - OfficeConsentsClient getOfficeConsents(); - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. - * - * @return the EntityQueryTemplatesClient object. - */ - EntityQueryTemplatesClient getEntityQueryTemplates(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java index 0f8de1a7b52e..df97d27b4605 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java @@ -22,7 +22,7 @@ public interface SourceControlsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); @@ -37,7 +37,7 @@ public interface SourceControlsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listRepositories( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java index 8f086d310dbe..cbf7109c8ebb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java @@ -21,7 +21,7 @@ public interface SourceControlsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface SourceControlsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java index 6580255eb016..1e34a2b75f05 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 @@ -12,7 +12,7 @@ import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; +import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; /** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ public interface ThreatIntelligenceIndicatorsClient { @@ -29,9 +29,7 @@ public interface ThreatIntelligenceIndicatorsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties); + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Create a new threat intelligence indicator. @@ -49,7 +47,7 @@ ThreatIntelligenceInformationInner createIndicator( Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context); /** @@ -99,7 +97,7 @@ ThreatIntelligenceInformationInner create( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties); + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Update a threat Intelligence indicator. @@ -119,7 +117,7 @@ Response createWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context); /** @@ -159,7 +157,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable queryIndicators( @@ -177,7 +175,7 @@ PagedIterable queryIndicators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable queryIndicators( @@ -242,7 +240,7 @@ ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); /** * Replace tags added to a threat intelligence indicator. @@ -262,6 +260,6 @@ Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java index cd5635505a22..bbb61deb6dee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java @@ -23,7 +23,7 @@ public interface ThreatIntelligenceIndicatorsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -43,7 +43,7 @@ public interface ThreatIntelligenceIndicatorsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java index 33290efc8992..80ba49f0d3be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java @@ -22,7 +22,7 @@ public interface WatchlistItemsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); @@ -33,15 +33,18 @@ public interface WatchlistItemsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java index a87f7d452c58..10b174e1207f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java @@ -10,6 +10,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; +import com.azure.resourcemanager.securityinsights.models.WatchlistsCreateOrUpdateResponse; +import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; /** An instance of this class provides access to all the operations defined in WatchlistsClient. */ public interface WatchlistsClient { @@ -21,7 +23,7 @@ public interface WatchlistsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,14 +33,18 @@ public interface WatchlistsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PagedIterable list( + String resourceGroupName, String workspaceName, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. @@ -93,15 +99,18 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( + WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -117,8 +126,11 @@ WatchlistInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -128,10 +140,10 @@ WatchlistInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java index c2c7dd1915a6..ca6a6d8e19e0 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** AAD (Azure Active Directory) requirements check properties. */ @Fluent public final class AadCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AadCheckRequirementsProperties.class); - /** {@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 9b1df541da98..be85a145cdd0 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AAD (Azure Active Directory) data connector properties. */ @Fluent public final class AadDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AadDataConnectorProperties.class); - /* * 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 322132d7bc14..ee6d93cd9141 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** AATP (Azure Advanced Threat Protection) requirements check properties. */ @Fluent public final class AatpCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AatpCheckRequirementsProperties.class); - /** {@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 f60cdbc90c2f..3a0bdc1ed428 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AATP (Azure Advanced Threat Protection) data connector properties. */ @Fluent public final class AatpDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AatpDataConnectorProperties.class); - /* * 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 ef2d56b41c7e..172a4a2fc854 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** Account entity property bag. */ @Immutable public final class AccountEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountEntityProperties.class); - /* * 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 7686ffdea6da..412a0c40b92e 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 @@ -7,14 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ActionPropertiesBase; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Action property bag. */ @Fluent public final class ActionRequestProperties extends ActionPropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionRequestProperties.class); - /* * Logic App Callback URL for this specific workflow. */ @@ -57,10 +54,12 @@ public ActionRequestProperties withLogicAppResourceId(String logicAppResourceId) public void validate() { super.validate(); if (triggerUri() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property triggerUri in model ActionRequestProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ActionRequestProperties.class); } 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 fb8f86a0bcc6..3122bbedd575 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java @@ -5,16 +5,12 @@ 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.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Action for alert rule. */ @Fluent public final class ActionResponseInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionResponseInner.class); - /* * 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 093f13632019..0661a17d6444 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 @@ -5,16 +5,12 @@ 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.ActionPropertiesBase; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Action property bag. */ @Fluent public final class ActionResponseProperties extends ActionPropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionResponseProperties.class); - /* * 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 4548c723fb1b..91aea4f6b9a5 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 @@ -5,10 +5,8 @@ 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.ActivityEntityQueriesPropertiesQueryDefinitions; import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -18,8 +16,6 @@ /** Describes activity entity query properties. */ @Fluent public final class ActivityEntityQueriesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityEntityQueriesProperties.class); - /* * 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 c12528576def..2f08d6422860 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 @@ -5,11 +5,9 @@ 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.ActivityEntityQueryTemplatePropertiesQueryDefinitions; import com.azure.resourcemanager.securityinsights.models.DataTypeDefinitions; import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -18,8 +16,6 @@ /** Describes activity entity query properties. */ @Fluent public final class ActivityEntityQueryTemplateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityEntityQueryTemplateProperties.class); - /* * 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 523dd6d8394d..f3346f5f0a50 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; import com.azure.resourcemanager.securityinsights.models.MLBehaviorAnalyticsAlertRule; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule; @@ -13,7 +12,6 @@ import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAlertRule; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -37,8 +35,6 @@ }) @Fluent public class AlertRuleInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleInner.class); - /** {@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 e9c422a5a546..73592632fd36 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 @@ -7,14 +7,12 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.FusionAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.MLBehaviorAnalyticsAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.NrtAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAlertRuleTemplate; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -39,8 +37,6 @@ }) @Immutable public class AlertRuleTemplateInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleTemplateInner.class); - /* * Azure Resource Manager metadata containing createdBy and modifiedBy * information. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java index fbb77200af3d..1dbd5f5a9d02 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Anomalies property bag. */ @Immutable public final class AnomaliesSettingsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AnomaliesSettingsProperties.class); - /* * 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/ApiPollingParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java index f3c0f35cd01b..4e31c9709d7d 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 @@ -5,17 +5,13 @@ 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.CodelessConnectorPollingConfigProperties; import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents Codeless API Polling data connector. */ @Fluent public final class ApiPollingParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiPollingParameters.class); - /* * 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 9393a3854e0a..c7755a357b32 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ASC (Azure Security Center) requirements check properties. */ @Fluent public final class AscCheckRequirementsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscCheckRequirementsProperties.class); - /* * 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 ef87905d4515..486d75131f91 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorWithAlertsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ASC (Azure Security Center) data connector properties. */ @Fluent public final class AscDataConnectorProperties extends DataConnectorWithAlertsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscDataConnectorProperties.class); - /* * 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 e10838758cf7..1880bf1f167c 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 @@ -10,21 +10,18 @@ import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; import com.azure.resourcemanager.securityinsights.models.ClientInfo; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** Represents an automation rule. */ +/** The AutomationRule model. */ @Fluent public final class AutomationRuleInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleInner.class); - /* * Automation rule properties */ - @JsonProperty(value = "properties") - private AutomationRuleProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); /** * Get the innerProperties property: Automation rule properties. @@ -70,8 +67,8 @@ public AutomationRuleInner withDisplayName(String displayName) { * * @return the order value. */ - public Integer order() { - return this.innerProperties() == null ? null : this.innerProperties().order(); + public int order() { + return this.innerProperties() == null ? 0 : this.innerProperties().order(); } /** @@ -80,7 +77,7 @@ public Integer order() { * @param order the order value to set. * @return the AutomationRuleInner object itself. */ - public AutomationRuleInner withOrder(Integer order) { + public AutomationRuleInner withOrder(int order) { if (this.innerProperties() == null) { this.innerProperties = new AutomationRuleProperties(); } @@ -89,7 +86,7 @@ public AutomationRuleInner withOrder(Integer order) { } /** - * Get the triggeringLogic property: The triggering logic of the automation rule. + * Get the triggeringLogic property: Describes automation rule triggering logic. * * @return the triggeringLogic value. */ @@ -98,7 +95,7 @@ public AutomationRuleTriggeringLogic triggeringLogic() { } /** - * Set the triggeringLogic property: The triggering logic of the automation rule. + * Set the triggeringLogic property: Describes automation rule triggering logic. * * @param triggeringLogic the triggeringLogic value to set. * @return the AutomationRuleInner object itself. @@ -134,15 +131,6 @@ public AutomationRuleInner withActions(List actions) { return this; } - /** - * Get the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - /** * Get the lastModifiedTimeUtc property: The last time the automation rule was updated. * @@ -153,16 +141,16 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the createdBy property: Describes the client that created the automation rule. + * Get the createdTimeUtc property: The time the automation rule was created. * - * @return the createdBy value. + * @return the createdTimeUtc value. */ - public ClientInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); } /** - * Get the lastModifiedBy property: Describes the client that last updated the automation rule. + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. * * @return the lastModifiedBy value. */ @@ -170,6 +158,15 @@ public ClientInfo lastModifiedBy() { return this.innerProperties() == null ? null : this.innerProperties().lastModifiedBy(); } + /** + * Get the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + public ClientInfo createdBy() { + return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + } + /** * Validates the instance. * @@ -178,8 +175,15 @@ public ClientInfo lastModifiedBy() { @Override public void validate() { super.validate(); - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model AutomationRuleInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AutomationRuleInner.class); } 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 a6c625ec7505..497b32e9ae33 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 @@ -9,18 +9,15 @@ import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** Describes automation rule properties. */ +/** Automation rule properties. */ @Fluent public final class AutomationRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleProperties.class); - /* - * The display name of the automation rule + * The display name of the automation rule */ @JsonProperty(value = "displayName", required = true) private String displayName; @@ -32,7 +29,7 @@ public final class AutomationRuleProperties { private int order; /* - * The triggering logic of the automation rule + * Describes automation rule triggering logic */ @JsonProperty(value = "triggeringLogic", required = true) private AutomationRuleTriggeringLogic triggeringLogic; @@ -43,12 +40,6 @@ public final class AutomationRuleProperties { @JsonProperty(value = "actions", required = true) private List actions; - /* - * The time the automation rule was created - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - /* * The last time the automation rule was updated */ @@ -56,17 +47,23 @@ public final class AutomationRuleProperties { private OffsetDateTime lastModifiedTimeUtc; /* - * Describes the client that created the automation rule + * The time the automation rule was created */ - @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) - private ClientInfo createdBy; + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; /* - * Describes the client that last updated the automation rule + * Information on the client (user or application) that made some action */ @JsonProperty(value = "lastModifiedBy", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo lastModifiedBy; + /* + * Information on the client (user or application) that made some action + */ + @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) + private ClientInfo createdBy; + /** * Get the displayName property: The display name of the automation rule. * @@ -108,7 +105,7 @@ public AutomationRuleProperties withOrder(int order) { } /** - * Get the triggeringLogic property: The triggering logic of the automation rule. + * Get the triggeringLogic property: Describes automation rule triggering logic. * * @return the triggeringLogic value. */ @@ -117,7 +114,7 @@ public AutomationRuleTriggeringLogic triggeringLogic() { } /** - * Set the triggeringLogic property: The triggering logic of the automation rule. + * Set the triggeringLogic property: Describes automation rule triggering logic. * * @param triggeringLogic the triggeringLogic value to set. * @return the AutomationRuleProperties object itself. @@ -147,15 +144,6 @@ public AutomationRuleProperties withActions(List actions) return this; } - /** - * Get the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - /** * Get the lastModifiedTimeUtc property: The last time the automation rule was updated. * @@ -166,16 +154,16 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the createdBy property: Describes the client that created the automation rule. + * Get the createdTimeUtc property: The time the automation rule was created. * - * @return the createdBy value. + * @return the createdTimeUtc value. */ - public ClientInfo createdBy() { - return this.createdBy; + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; } /** - * Get the lastModifiedBy property: Describes the client that last updated the automation rule. + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. * * @return the lastModifiedBy value. */ @@ -183,6 +171,15 @@ public ClientInfo lastModifiedBy() { return this.lastModifiedBy; } + /** + * Get the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + public ClientInfo createdBy() { + return this.createdBy; + } + /** * Validates the instance. * @@ -190,13 +187,13 @@ public ClientInfo lastModifiedBy() { */ public void validate() { if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property displayName in model AutomationRuleProperties")); } if (triggeringLogic() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property triggeringLogic in model AutomationRuleProperties")); @@ -204,18 +201,20 @@ public void validate() { triggeringLogic().validate(); } if (actions() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property actions in model AutomationRuleProperties")); } else { actions().forEach(e -> e.validate()); } - if (createdBy() != null) { - createdBy().validate(); - } if (lastModifiedBy() != null) { lastModifiedBy().validate(); } + if (createdBy() != null) { + createdBy().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(AutomationRuleProperties.class); } 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 537c1e0f95d9..ea55ad5685df 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 @@ -7,14 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AwsCloudTrailDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Amazon Web Services CloudTrail data connector properties. */ @Fluent public final class AwsCloudTrailDataConnectorProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsCloudTrailDataConnectorProperties.class); - /* * The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access * the Aws account. @@ -77,7 +74,7 @@ public AwsCloudTrailDataConnectorProperties withDataTypes(AwsCloudTrailDataConne */ public void validate() { if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model AwsCloudTrailDataConnectorProperties")); @@ -85,4 +82,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AwsCloudTrailDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java index d65550f044fd..fb81e27a8457 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AwsS3DataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Amazon Web Services S3 data connector properties. */ @Fluent public final class AwsS3DataConnectorProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsS3DataConnectorProperties.class); - /* * The logs destination table name in LogAnalytics. */ @@ -127,25 +124,25 @@ public AwsS3DataConnectorProperties withDataTypes(AwsS3DataConnectorDataTypes da */ public void validate() { if (destinationTable() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property destinationTable in model AwsS3DataConnectorProperties")); } if (sqsUrls() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sqsUrls in model AwsS3DataConnectorProperties")); } if (roleArn() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property roleArn in model AwsS3DataConnectorProperties")); } if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model AwsS3DataConnectorProperties")); @@ -153,4 +150,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java index c6a0301e253e..e73dcc2482d4 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AzureResource entity property bag. */ @Immutable public final class AzureResourceEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureResourceEntityProperties.class); - /* * 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 d66395d13aeb..24e6c6ae3a87 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 @@ -5,17 +5,13 @@ 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.BookmarkExpandResponseValue; import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The entity expansion result operation response. */ @Fluent public final class BookmarkExpandResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkExpandResponseInner.class); - /* * 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 31ebe211aed2..5d04c419ecc5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java @@ -5,11 +5,11 @@ 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.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -17,8 +17,6 @@ /** Represents a bookmark in Azure Security Insights. */ @Fluent public final class BookmarkInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkInner.class); - /* * Bookmark properties */ @@ -340,6 +338,75 @@ public BookmarkInner withIncidentInfo(IncidentInfo incidentInfo) { return this; } + /** + * Get the entityMappings property: Describes the entity mappings of the bookmark. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + } + + /** + * Set the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings the entityMappings value to set. + * @return the BookmarkInner object itself. + */ + public BookmarkInner withEntityMappings(List entityMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new BookmarkProperties(); + } + this.innerProperties().withEntityMappings(entityMappings); + return this; + } + + /** + * Get the tactics property: A list of relevant mitre attacks. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: A list of relevant mitre attacks. + * + * @param tactics the tactics value to set. + * @return the BookmarkInner object itself. + */ + public BookmarkInner withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new BookmarkProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: A list of relevant mitre techniques. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: A list of relevant mitre techniques. + * + * @param techniques the techniques value to set. + * @return the BookmarkInner object itself. + */ + public BookmarkInner withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new BookmarkProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java index 3af22d683f78..44be7d59238a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java @@ -6,9 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -16,8 +17,6 @@ /** Describes bookmark properties. */ @Fluent public final class BookmarkProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkProperties.class); - /* * The time the bookmark was created */ @@ -96,6 +95,24 @@ public final class BookmarkProperties { @JsonProperty(value = "incidentInfo") private IncidentInfo incidentInfo; + /* + * Describes the entity mappings of the bookmark + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * A list of relevant mitre attacks + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * A list of relevant mitre techniques + */ + @JsonProperty(value = "techniques") + private List techniques; + /** * Get the created property: The time the bookmark was created. * @@ -356,6 +373,66 @@ public BookmarkProperties withIncidentInfo(IncidentInfo incidentInfo) { return this; } + /** + * Get the entityMappings property: Describes the entity mappings of the bookmark. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; + } + + /** + * Set the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings the entityMappings value to set. + * @return the BookmarkProperties object itself. + */ + public BookmarkProperties withEntityMappings(List entityMappings) { + this.entityMappings = entityMappings; + return this; + } + + /** + * Get the tactics property: A list of relevant mitre attacks. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: A list of relevant mitre attacks. + * + * @param tactics the tactics value to set. + * @return the BookmarkProperties object itself. + */ + public BookmarkProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: A list of relevant mitre techniques. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: A list of relevant mitre techniques. + * + * @param techniques the techniques value to set. + * @return the BookmarkProperties object itself. + */ + public BookmarkProperties withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + /** * Validates the instance. * @@ -366,12 +443,12 @@ public void validate() { createdBy().validate(); } if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property displayName in model BookmarkProperties")); } if (query() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property query in model BookmarkProperties")); } @@ -381,5 +458,10 @@ public void validate() { if (incidentInfo() != null) { incidentInfo().validate(); } + if (entityMappings() != null) { + entityMappings().forEach(e -> e.validate()); + } } + + private static final ClientLogger LOGGER = new ClientLogger(BookmarkProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java index d037691c6a96..1551983c2935 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** CloudApplication entity property bag. */ @Immutable public final class CloudApplicationEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudApplicationEntityProperties.class); - /* * 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 6ebc547ca30f..ec2fa5baa272 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 @@ -5,16 +5,12 @@ 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.CodelessUiConnectorConfigProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents Codeless UI data connector. */ @Fluent public final class CodelessParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessParameters.class); - /* * 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 b5e7cfed64a3..cfec062d1609 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AadDataConnector; import com.azure.resourcemanager.securityinsights.models.AatpDataConnector; import com.azure.resourcemanager.securityinsights.models.AscDataConnector; @@ -14,17 +13,19 @@ import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector; import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector; +import com.azure.resourcemanager.securityinsights.models.IoTDataConnector; import com.azure.resourcemanager.securityinsights.models.McasDataConnector; import com.azure.resourcemanager.securityinsights.models.MdatpDataConnector; import com.azure.resourcemanager.securityinsights.models.MstiDataConnector; import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeAtpDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeIrmDataConnector; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.TIDataConnector; import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -47,18 +48,19 @@ @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasDataConnector.class), @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365DataConnector.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpDataConnector.class), + @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectDataConnector.class), + @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBIDataConnector.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmDataConnector.class), @JsonSubTypes.Type(name = "MicrosoftDefenderAdvancedThreatProtection", value = MdatpDataConnector.class), @JsonSubTypes.Type(name = "Office365", value = OfficeDataConnector.class), @JsonSubTypes.Type(name = "ThreatIntelligence", value = TIDataConnector.class), @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiDataConnector.class), + @JsonSubTypes.Type(name = "IOT", value = IoTDataConnector.class), @JsonSubTypes.Type(name = "GenericUI", value = CodelessUiDataConnector.class), @JsonSubTypes.Type(name = "APIPolling", value = CodelessApiPollingDataConnector.class) }) @Fluent public class DataConnectorInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorInner.class); - /** {@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 3b8481e6604f..6fde14a69e47 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 @@ -5,17 +5,13 @@ 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.DataConnectorAuthorizationState; import com.azure.resourcemanager.securityinsights.models.DataConnectorLicenseState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data connector requirements status. */ @Fluent public final class DataConnectorRequirementsStateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorRequirementsStateInner.class); - /* * 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 a7f34eb0e838..5565c6456bf3 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Dns entity property bag. */ @Immutable public final class DnsEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DnsEntityProperties.class); - /* * 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 03efa6fbcc05..e88e1fce95ed 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Dynamics365 requirements check properties. */ @Fluent public final class Dynamics365CheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dynamics365CheckRequirementsProperties.class); - /** {@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 792da73f8e5b..bde2773bc7c9 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 @@ -8,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Dynamics365 data connector properties. */ @Fluent public final class Dynamics365DataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dynamics365DataConnectorProperties.class); - /* * The available data types for the connector. */ @@ -58,7 +55,7 @@ public Dynamics365DataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model Dynamics365DataConnectorProperties")); @@ -66,4 +63,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(Dynamics365DataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java index 881013f2721a..17b9864df9bb 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 @@ -5,17 +5,13 @@ 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.EnrichmentDomainWhoisDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Whois information for a given domain and associated metadata. */ @Fluent public final class EnrichmentDomainWhoisInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentDomainWhoisInner.class); - /* * 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 26f8e1d135ad..269760e83bd4 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Geodata information for a given IP address. */ @Fluent public final class EnrichmentIpGeodataInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentIpGeodataInner.class); - /* * 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 f75e85c31ec3..0007076e3666 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** EntityAnalytics property bag. */ @Immutable public final class EntityAnalyticsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityAnalyticsProperties.class); - /* * 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/EntityExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java index a7c5592a106c..1526fff102b4 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 @@ -5,17 +5,13 @@ 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.EntityExpandResponseValue; import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The entity expansion result operation response. */ @Fluent public final class EntityExpandResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityExpandResponseInner.class); - /* * 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 c9a7a7c6af8c..0b2543093f8e 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 @@ -5,18 +5,14 @@ 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.EntityInsightItem; import com.azure.resourcemanager.securityinsights.models.GetInsightsResultsMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The Get Insights result operation response. */ @Fluent public final class EntityGetInsightsResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityGetInsightsResponseInner.class); - /* * 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 5db0d30d49cc..94a0b2039e93 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AccountEntity; import com.azure.resourcemanager.securityinsights.models.AzureResourceEntity; import com.azure.resourcemanager.securityinsights.models.CloudApplicationEntity; @@ -29,7 +28,6 @@ import com.azure.resourcemanager.securityinsights.models.SecurityGroupEntity; import com.azure.resourcemanager.securityinsights.models.SubmissionMailEntity; import com.azure.resourcemanager.securityinsights.models.UrlEntity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -67,8 +65,6 @@ }) @Immutable public class EntityInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityInner.class); - /* * 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 991cb8fc90b6..f1bdc7049f0e 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 @@ -5,11 +5,9 @@ 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.ActivityEntityQuery; import com.azure.resourcemanager.securityinsights.models.ExpansionEntityQuery; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -27,8 +25,6 @@ }) @Fluent public class EntityQueryInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryInner.class); - /** {@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 1c528778c846..1fb133a81f5e 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 @@ -7,9 +7,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueryTemplate; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -25,8 +23,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityEntityQueryTemplate.class)}) @Immutable public class EntityQueryTemplateInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryTemplateInner.class); - /* * 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 2e90c4936603..14d25888dac9 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 @@ -5,18 +5,14 @@ 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.EntityTimelineItem; import com.azure.resourcemanager.securityinsights.models.TimelineResultsMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The entity timeline result operation response. */ @Fluent public final class EntityTimelineResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityTimelineResponseInner.class); - /* * 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 a74cf1871f05..3ba5c293f1b6 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 @@ -5,17 +5,13 @@ 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.EntityType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes expansion entity query properties. */ @Fluent public final class ExpansionEntityQueriesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpansionEntityQueriesProperties.class); - /* * 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 4f41ccc769b8..90e3adfec3d7 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** EyesOn property bag. */ @Immutable public final class EyesOnSettingsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EyesOnSettingsProperties.class); - /* * 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 e60d088ab576..7588902fa603 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** File entity property bag. */ @Immutable public final class FileEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileEntityProperties.class); - /* * 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 e9dd370c0118..8ebadc287860 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.FileHashAlgorithm; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** FileHash entity property bag. */ @Immutable public final class FileHashEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileHashEntityProperties.class); - /* * The hash algorithm type. */ 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 595a10752386..3ce589c95ac6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java @@ -8,7 +8,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.securityinsights.models.FusionScenarioExclusionPattern; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -16,8 +17,6 @@ /** Fusion alert rule base property bag. */ @Fluent public final class FusionAlertRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionAlertRuleProperties.class); - /* * The Name of the alert rule template used to create this rule. */ @@ -42,6 +41,18 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "enabled", required = true) private boolean enabled; + /* + * Configuration for all supported source signals in fusion detection. + */ + @JsonProperty(value = "sourceSettings") + private List sourceSettings; + + /* + * Configuration to exclude scenarios in fusion detection. + */ + @JsonProperty(value = "scenarioExclusionPatterns") + private List scenarioExclusionPatterns; + /* * The last time that this alert has been modified. */ @@ -60,6 +71,12 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -118,6 +135,47 @@ public FusionAlertRuleProperties withEnabled(boolean enabled) { return this; } + /** + * Get the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.sourceSettings; + } + + /** + * Set the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRuleProperties object itself. + */ + public FusionAlertRuleProperties withSourceSettings(List sourceSettings) { + this.sourceSettings = sourceSettings; + return this; + } + + /** + * Get the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @return the scenarioExclusionPatterns value. + */ + public List scenarioExclusionPatterns() { + return this.scenarioExclusionPatterns; + } + + /** + * Set the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @param scenarioExclusionPatterns the scenarioExclusionPatterns value to set. + * @return the FusionAlertRuleProperties object itself. + */ + public FusionAlertRuleProperties withScenarioExclusionPatterns( + List scenarioExclusionPatterns) { + this.scenarioExclusionPatterns = scenarioExclusionPatterns; + return this; + } + /** * Get the lastModifiedUtc property: The last time that this alert has been modified. * @@ -145,6 +203,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * @@ -152,10 +219,18 @@ public List tactics() { */ public void validate() { if (alertRuleTemplateName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property alertRuleTemplateName in model FusionAlertRuleProperties")); } + if (sourceSettings() != null) { + sourceSettings().forEach(e -> e.validate()); + } + if (scenarioExclusionPatterns() != null) { + scenarioExclusionPatterns().forEach(e -> e.validate()); + } } + + private static final ClientLogger LOGGER = new ClientLogger(FusionAlertRuleProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java index a493c85ff427..162717edb32f 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 @@ -5,25 +5,64 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.FusionTemplateSourceSetting; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; /** Fusion alert rule template properties. */ @Fluent -public final class FusionAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionAlertRuleTemplateProperties.class); +public final class FusionAlertRuleTemplateProperties { + /* + * the number of alert rules that were created by this template + */ + @JsonProperty(value = "alertRulesCreatedByTemplateCount") + private Integer alertRulesCreatedByTemplateCount; + + /* + * The time that this alert rule template has been added. + */ + @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateUtc; + + /* + * The time that this alert rule template was last updated. + */ + @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdatedDateUtc; + + /* + * The description of the alert rule template. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The display name for alert rule template. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The required data connectors for this template + */ + @JsonProperty(value = "requiredDataConnectors") + private List requiredDataConnectors; + + /* + * The alert rule template status. + */ + @JsonProperty(value = "status") + private TemplateStatus status; /* * The severity for alerts created by this alert rule. */ - @JsonProperty(value = "severity", required = true) + @JsonProperty(value = "severity") private AlertSeverity severity; /* @@ -32,6 +71,138 @@ public final class FusionAlertRuleTemplateProperties extends AlertRuleTemplatePr @JsonProperty(value = "tactics") private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /* + * All supported source signal configurations consumed in fusion detection. + */ + @JsonProperty(value = "sourceSettings") + private List sourceSettings; + + /** + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * + * @return the alertRulesCreatedByTemplateCount value. + */ + public Integer alertRulesCreatedByTemplateCount() { + return this.alertRulesCreatedByTemplateCount; + } + + /** + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { + this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; + return this; + } + + /** + * Get the createdDateUtc property: The time that this alert rule template has been added. + * + * @return the createdDateUtc value. + */ + public OffsetDateTime createdDateUtc() { + return this.createdDateUtc; + } + + /** + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. + * + * @return the lastUpdatedDateUtc value. + */ + public OffsetDateTime lastUpdatedDateUtc() { + return this.lastUpdatedDateUtc; + } + + /** + * Get the description property: The description of the alert rule template. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the alert rule template. + * + * @param description the description value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the displayName property: The display name for alert rule template. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name for alert rule template. + * + * @param displayName the displayName value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the requiredDataConnectors property: The required data connectors for this template. + * + * @return the requiredDataConnectors value. + */ + public List requiredDataConnectors() { + return this.requiredDataConnectors; + } + + /** + * Set the requiredDataConnectors property: The required data connectors for this template. + * + * @param requiredDataConnectors the requiredDataConnectors value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withRequiredDataConnectors( + List requiredDataConnectors) { + this.requiredDataConnectors = requiredDataConnectors; + return this; + } + + /** + * Get the status property: The alert rule template status. + * + * @return the status value. + */ + public TemplateStatus status() { + return this.status; + } + + /** + * Set the status property: The alert rule template status. + * + * @param status the status value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { + this.status = status; + return this; + } + /** * Get the severity property: The severity for alerts created by this alert rule. * @@ -72,40 +243,43 @@ public FusionAlertRuleTemplateProperties withTactics(List tactics) return this; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withTechniques(List techniques) { + this.techniques = techniques; return this; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; + /** + * Get the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.sourceSettings; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); + /** + * Set the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withSourceSettings(List sourceSettings) { + this.sourceSettings = sourceSettings; return this; } @@ -114,14 +288,12 @@ public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); - if (severity() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model FusionAlertRuleTemplateProperties")); + if (requiredDataConnectors() != null) { + requiredDataConnectors().forEach(e -> e.validate()); + } + if (sourceSettings() != null) { + sourceSettings().forEach(e -> e.validate()); } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java index 9e6fd3d5635f..d001a56c976d 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 @@ -5,17 +5,13 @@ 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.EntityQueryItem; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Retrieve queries for entity result operation response. */ @Fluent public final class GetQueriesResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetQueriesResponseInner.class); - /* * 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 eafc793fa804..9dff16714325 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 @@ -5,17 +5,13 @@ 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.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.OSFamily; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Host entity property bag. */ @Fluent public final class HostEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HostEntityProperties.class); - /* * 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 4ab30dc1a759..5be6c7dc4e9b 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 @@ -9,7 +9,6 @@ import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -17,8 +16,6 @@ /** Describes bookmark properties. */ @Fluent public final class HuntingBookmarkProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HuntingBookmarkProperties.class); - /* * The time the bookmark was created */ @@ -317,13 +314,13 @@ public void validate() { createdBy().validate(); } if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property displayName in model HuntingBookmarkProperties")); } if (query() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property query in model HuntingBookmarkProperties")); } @@ -334,4 +331,6 @@ public void validate() { incidentInfo().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(HuntingBookmarkProperties.class); } 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 03ac8b2e3454..18459e1b4f13 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.SecurityAlert; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of incident alerts. */ @Fluent public final class IncidentAlertListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentAlertListInner.class); - /* * Array of incident alerts. */ @@ -49,11 +46,13 @@ public IncidentAlertListInner withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model IncidentAlertListInner")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentAlertListInner.class); } 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 bd3a2a9d225e..aa6aec92f588 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.HuntingBookmark; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of incident bookmarks. */ @Fluent public final class IncidentBookmarkListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentBookmarkListInner.class); - /* * Array of incident bookmarks. */ @@ -49,11 +46,13 @@ public IncidentBookmarkListInner withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model IncidentBookmarkListInner")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentBookmarkListInner.class); } 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 5ee77edb8cab..5bde60b473fa 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 @@ -5,18 +5,14 @@ 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.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Represents an incident comment. */ @Fluent public final class IncidentCommentInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentCommentInner.class); - /* * Incident comment properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java index 0aa8a1fa3e91..6cc4d172a5e2 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ClientInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Incident comment property bag. */ @Fluent public final class IncidentCommentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentCommentProperties.class); - /* * The time the comment was created */ @@ -94,7 +91,7 @@ public ClientInfo author() { */ public void validate() { if (message() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property message in model IncidentCommentProperties")); @@ -103,4 +100,6 @@ public void validate() { author().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentCommentProperties.class); } 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 4868547c91d1..3f6dbe089b16 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java @@ -5,17 +5,13 @@ 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.IncidentEntitiesResultsMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The incident related entities response. */ @Fluent public final class IncidentEntitiesResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentEntitiesResponseInner.class); - /* * 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 395e2d157683..7f44360a2ebd 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; import com.azure.resourcemanager.securityinsights.models.IncidentClassification; import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; @@ -14,7 +13,6 @@ import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; import com.azure.resourcemanager.securityinsights.models.IncidentStatus; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -22,8 +20,6 @@ /** Represents an incident in Azure Security Insights. */ @Fluent public final class IncidentInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentInner.class); - /* * Incident properties */ 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 6d01fec2cdaa..5262e2c3ba58 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 @@ -13,7 +13,6 @@ import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -21,8 +20,6 @@ /** Describes incident properties. */ @Fluent public final class IncidentPropertiesInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentPropertiesInner.class); - /* * Additional data on the incident */ @@ -493,13 +490,13 @@ public void validate() { owner().validate(); } if (severity() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property severity in model IncidentPropertiesInner")); } if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property status in model IncidentPropertiesInner")); } @@ -507,9 +504,11 @@ public void validate() { teamInformation().validate(); } if (title() == null) { - throw logger + 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/IoTCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java new file mode 100644 index 000000000000..63643c5077a2 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IoT requirements check properties. */ +@Fluent +public final class IoTCheckRequirementsProperties { + /* + * The subscription id to connect to, and get the data from. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTCheckRequirementsProperties object itself. + */ + public IoTCheckRequirementsProperties withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java new file mode 100644 index 000000000000..1917add910f9 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; +import com.azure.resourcemanager.securityinsights.models.DataConnectorWithAlertsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IoT data connector properties. */ +@Fluent +public final class IoTDataConnectorProperties extends DataConnectorWithAlertsProperties { + /* + * The subscription id to connect to, and get the data from. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTDataConnectorProperties object itself. + */ + public IoTDataConnectorProperties withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** {@inheritDoc} */ + @Override + public IoTDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + super.withDataTypes(dataTypes); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java index bf3f83db2a18..d5e9ca052de8 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligence; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.UUID; @@ -16,8 +14,6 @@ /** IoTDevice entity property bag. */ @Immutable public final class IoTDeviceEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTDeviceEntityProperties.class); - /* * 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 18a7a844f955..fa6b07dd783f 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 @@ -5,19 +5,15 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.GeoLocation; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligence; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Ip entity property bag. */ @Immutable public final class IpEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpEntityProperties.class); - /* * 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 6959672a8068..423fdf2974b6 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 @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -16,8 +15,6 @@ /** MLBehaviorAnalytics alert rule base property bag. */ @Fluent public final class MLBehaviorAnalyticsAlertRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MLBehaviorAnalyticsAlertRuleProperties.class); - /* * The Name of the alert rule template used to create this rule. */ @@ -60,6 +57,12 @@ public final class MLBehaviorAnalyticsAlertRuleProperties { @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -145,6 +148,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * @@ -152,11 +164,13 @@ public List tactics() { */ public void validate() { if (alertRuleTemplateName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property alertRuleTemplateName in model" + " MLBehaviorAnalyticsAlertRuleProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MLBehaviorAnalyticsAlertRuleProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java index 288c148dc9a3..c048baca3053 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java @@ -7,32 +7,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; +import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** MLBehaviorAnalytics alert rule template properties. */ @Fluent -public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MLBehaviorAnalyticsAlertRuleTemplateProperties.class); - +public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { /* * The severity for alerts created by this alert rule. */ @JsonProperty(value = "severity", required = true) private AlertSeverity severity; - /* - * The tactics of the alert rule template. - */ - @JsonProperty(value = "tactics") - private List tactics; - /** * Get the severity property: The severity for alerts created by this alert rule. * @@ -53,23 +43,17 @@ public MLBehaviorAnalyticsAlertRuleTemplateProperties withSeverity(AlertSeverity return this; } - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; + /** {@inheritDoc} */ + @Override + public MLBehaviorAnalyticsAlertRuleTemplateProperties withTactics(List tactics) { + super.withTactics(tactics); + return this; } - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplateProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; + /** {@inheritDoc} */ + @Override + public MLBehaviorAnalyticsAlertRuleTemplateProperties withTechniques(List techniques) { + super.withTechniques(techniques); return this; } @@ -119,10 +103,12 @@ public MLBehaviorAnalyticsAlertRuleTemplateProperties withStatus(TemplateStatus public void validate() { super.validate(); if (severity() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property severity in model MLBehaviorAnalyticsAlertRuleTemplateProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MLBehaviorAnalyticsAlertRuleTemplateProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java index 637a9c1baab7..62c3cc3aec6a 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 @@ -5,9 +5,7 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -15,8 +13,6 @@ /** Mail cluster entity property bag. */ @Immutable public final class MailClusterEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MailClusterEntityProperties.class); - /* * 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 472408e6c2e9..219cf7882058 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 @@ -5,12 +5,10 @@ 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.AntispamMailDirection; import com.azure.resourcemanager.securityinsights.models.DeliveryAction; import com.azure.resourcemanager.securityinsights.models.DeliveryLocation; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -19,8 +17,6 @@ /** Mail message entity property bag. */ @Fluent public final class MailMessageEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MailMessageEntityProperties.class); - /* * 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 323052891ea4..b3584b9570fb 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** Mailbox entity property bag. */ @Immutable public final class MailboxEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MailboxEntityProperties.class); - /* * 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 a0a57424dcad..ffb6a5f5177a 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Malware entity property bag. */ @Immutable public final class MalwareEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MalwareEntityProperties.class); - /* * 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 8ac513683c89..529764ae709a 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** MCAS (Microsoft Cloud App Security) requirements check properties. */ @Fluent public final class McasCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(McasCheckRequirementsProperties.class); - /** {@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 0bbae456829f..38068dd10782 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 @@ -8,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.McasDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** MCAS (Microsoft Cloud App Security) data connector properties. */ @Fluent public final class McasDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(McasDataConnectorProperties.class); - /* * The available data types for the connector. */ @@ -58,7 +55,7 @@ public McasDataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model McasDataConnectorProperties")); @@ -66,4 +63,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(McasDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java index a3f0661421d2..789441efbf97 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. */ @Fluent public final class MdatpCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MdatpCheckRequirementsProperties.class); - /** {@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 bb14bcbdd994..a1466e451fb0 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. */ @Fluent public final class MdatpDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MdatpDataConnectorProperties.class); - /* * 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 23b926bf7937..25c3b5166242 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; @@ -13,7 +12,6 @@ import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -21,8 +19,6 @@ /** Metadata resource definition. */ @Fluent public final class MetadataModelInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataModelInner.class); - /* * Metadata properties */ @@ -335,6 +331,173 @@ public MetadataModelInner withLastPublishDate(LocalDate lastPublishDate) { return this; } + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.innerProperties() == null ? null : this.innerProperties().customVersion(); + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withCustomVersion(String customVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withCustomVersion(customVersion); + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @return the icon value. + */ + public String icon() { + return this.innerProperties() == null ? null : this.innerProperties().icon(); + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @param icon the icon value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withIcon(icon); + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTechniques(); + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.innerProperties() == null ? null : this.innerProperties().previewImages(); + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withPreviewImages(List previewImages) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withPreviewImages(previewImages); + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.innerProperties() == null ? null : this.innerProperties().previewImagesDark(); + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withPreviewImagesDark(List previewImagesDark) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withPreviewImagesDark(previewImagesDark); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java index 9ac1834dc3fd..3bdd94db38ef 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 @@ -12,7 +12,6 @@ import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -20,8 +19,6 @@ /** Metadata property bag. */ @Fluent public final class MetadataProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataProperties.class); - /* * Static ID for the content. Used to identify dependencies and content * from solutions or community. Hard-coded/static for out of the box @@ -104,6 +101,53 @@ public final class MetadataProperties { @JsonProperty(value = "lastPublishDate") private LocalDate lastPublishDate; + /* + * The custom version of the content. A optional free text + */ + @JsonProperty(value = "customVersion") + private String customVersion; + + /* + * Schema version of the content. Can be used to distinguish between + * different flow based on the schema version + */ + @JsonProperty(value = "contentSchemaVersion") + private String contentSchemaVersion; + + /* + * the icon identifier. this id can later be fetched from the solution + * template + */ + @JsonProperty(value = "icon") + private String icon; + + /* + * the tactics the resource covers + */ + @JsonProperty(value = "threatAnalysisTactics") + private List threatAnalysisTactics; + + /* + * the techniques the resource covers, these have to be aligned with the + * tactics being used + */ + @JsonProperty(value = "threatAnalysisTechniques") + private List threatAnalysisTechniques; + + /* + * preview image file names. These will be taken from the solution + * artifacts + */ + @JsonProperty(value = "previewImages") + private List previewImages; + + /* + * preview image file names. These will be taken from the solution + * artifacts. used for dark theme support + */ + @JsonProperty(value = "previewImagesDark") + private List previewImagesDark; + /** * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the @@ -358,6 +402,152 @@ public MetadataProperties withLastPublishDate(LocalDate lastPublishDate) { return this; } + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.customVersion; + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withCustomVersion(String customVersion) { + this.customVersion = customVersion; + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.contentSchemaVersion; + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @param icon the icon value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.threatAnalysisTactics; + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withThreatAnalysisTactics(List threatAnalysisTactics) { + this.threatAnalysisTactics = threatAnalysisTactics; + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.threatAnalysisTechniques; + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withThreatAnalysisTechniques(List threatAnalysisTechniques) { + this.threatAnalysisTechniques = threatAnalysisTechniques; + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.previewImages; + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withPreviewImages(List previewImages) { + this.previewImages = previewImages; + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.previewImagesDark; + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties withPreviewImagesDark(List previewImagesDark) { + this.previewImagesDark = previewImagesDark; + return this; + } + /** * Validates the instance. * @@ -365,12 +555,12 @@ public MetadataProperties withLastPublishDate(LocalDate lastPublishDate) { */ public void validate() { if (parentId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property parentId in model MetadataProperties")); } if (kind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property kind in model MetadataProperties")); } @@ -390,4 +580,6 @@ public void validate() { categories().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetadataProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java index 1b8e5a26fae1..ffb1e422fed3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java @@ -5,14 +5,12 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -20,8 +18,6 @@ /** Metadata property bag for patch requests. This is the same as the MetadataProperties, but with nothing required. */ @Fluent public final class MetadataPropertiesPatch { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataPropertiesPatch.class); - /* * Static ID for the content. Used to identify dependencies and content * from solutions or community. Hard-coded/static for out of the box @@ -104,6 +100,53 @@ public final class MetadataPropertiesPatch { @JsonProperty(value = "lastPublishDate") private LocalDate lastPublishDate; + /* + * The custom version of the content. A optional free text + */ + @JsonProperty(value = "customVersion") + private String customVersion; + + /* + * Schema version of the content. Can be used to distinguish between + * different flow based on the schema version + */ + @JsonProperty(value = "contentSchemaVersion") + private String contentSchemaVersion; + + /* + * the icon identifier. this id can later be fetched from the solution + * template + */ + @JsonProperty(value = "icon") + private String icon; + + /* + * the tactics the resource covers + */ + @JsonProperty(value = "threatAnalysisTactics") + private List threatAnalysisTactics; + + /* + * the techniques the resource covers, these have to be aligned with the + * tactics being used + */ + @JsonProperty(value = "threatAnalysisTechniques") + private List threatAnalysisTechniques; + + /* + * preview image file names. These will be taken from the solution + * artifacts + */ + @JsonProperty(value = "previewImages") + private List previewImages; + + /* + * preview image file names. These will be taken from the solution + * artifacts. used for dark theme support + */ + @JsonProperty(value = "previewImagesDark") + private List previewImagesDark; + /** * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the @@ -358,6 +401,152 @@ public MetadataPropertiesPatch withLastPublishDate(LocalDate lastPublishDate) { return this; } + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.customVersion; + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withCustomVersion(String customVersion) { + this.customVersion = customVersion; + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.contentSchemaVersion; + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @param icon the icon value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.threatAnalysisTactics; + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withThreatAnalysisTactics(List threatAnalysisTactics) { + this.threatAnalysisTactics = threatAnalysisTactics; + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.threatAnalysisTechniques; + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withThreatAnalysisTechniques(List threatAnalysisTechniques) { + this.threatAnalysisTechniques = threatAnalysisTechniques; + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.previewImages; + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withPreviewImages(List previewImages) { + this.previewImages = previewImages; + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.previewImagesDark; + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withPreviewImagesDark(List previewImagesDark) { + this.previewImagesDark = previewImagesDark; + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java index 390d57cf965a..6c482ad3565a 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 @@ -9,7 +9,6 @@ import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRuleCommonProperties; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -18,9 +17,6 @@ @Fluent public final class MicrosoftSecurityIncidentCreationAlertRuleProperties extends MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleProperties.class); - /* * The Name of the alert rule template used to create this rule. */ @@ -182,11 +178,14 @@ public MicrosoftSecurityIncidentCreationAlertRuleProperties withSeveritiesFilter public void validate() { super.validate(); if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property displayName in model" + " MicrosoftSecurityIncidentCreationAlertRuleProperties")); } } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleProperties.class); } 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 92d23051b625..d5732a0625a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java @@ -5,13 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -19,10 +17,6 @@ @Fluent public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.class); - /* * the alerts' displayNames on which the cases will be generated */ @@ -38,7 +32,7 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties /* * The alerts' productName on which the cases will be generated */ - @JsonProperty(value = "productFilter", required = true) + @JsonProperty(value = "productFilter") private MicrosoftSecurityProductName productFilter; /* @@ -176,12 +170,5 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withStatus(T @Override public void validate() { super.validate(); - if (productFilter() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property productFilter in model" - + " MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties")); - } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java index 777a5a6e27a6..6688b38be2fb 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Microsoft Threat Intelligence requirements check properties. */ @Fluent public final class MstiCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MstiCheckRequirementsProperties.class); - /** {@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 d4b5539349a6..7bef9230fe38 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 @@ -8,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.MstiDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Microsoft Threat Intelligence data connector properties. */ @Fluent public final class MstiDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MstiDataConnectorProperties.class); - /* * The available data types for the connector. */ @@ -58,7 +55,7 @@ public MstiDataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model MstiDataConnectorProperties")); @@ -66,4 +63,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java index 85c531289f3c..68d2ff985a20 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** MTP (Microsoft Threat Protection) requirements check properties. */ @Fluent public final class MtpCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MtpCheckRequirementsProperties.class); - /** {@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 e4e352315287..2399f7dba165 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,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** MTP (Microsoft Threat Protection) data connector properties. */ @Fluent public final class MtpDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MtpDataConnectorProperties.class); - /* * The available data types for the connector. */ @@ -58,7 +55,7 @@ public MtpDataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model MtpDataConnectorProperties")); @@ -66,4 +63,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java index 60491523dceb..671d6dc021dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java @@ -11,112 +11,432 @@ import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; -import com.azure.resourcemanager.securityinsights.models.QueryBasedAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** Nrt alert rule base property bag. */ @Fluent -public final class NrtAlertRuleProperties extends QueryBasedAlertRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NrtAlertRuleProperties.class); +public final class NrtAlertRuleProperties { + /* + * The Name of the alert rule template used to create this rule. + */ + @JsonProperty(value = "alertRuleTemplateName") + private String alertRuleTemplateName; + + /* + * The version of the alert rule template used to create this rule - in + * format , where all are numbers, for example 0 <1.0.2> + */ + @JsonProperty(value = "templateVersion") + private String templateVersion; + + /* + * The description of the alert rule. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The query that creates alerts for this rule. + */ + @JsonProperty(value = "query", required = true) + private String query; + + /* + * The tactics of the alert rule + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /* + * The display name for alerts created by this alert rule. + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * Determines whether this alert rule is enabled or disabled. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * The last time that this alert rule has been modified. + */ + @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedUtc; + + /* + * The suppression (in ISO 8601 duration format) to wait since last time + * this alert rule been triggered. + */ + @JsonProperty(value = "suppressionDuration", required = true) + private Duration suppressionDuration; + + /* + * Determines whether the suppression for this alert rule is enabled or + * disabled. + */ + @JsonProperty(value = "suppressionEnabled", required = true) + private boolean suppressionEnabled; - /** {@inheritDoc} */ - @Override + /* + * The severity for alerts created by this alert rule. + */ + @JsonProperty(value = "severity", required = true) + private AlertSeverity severity; + + /* + * The settings of the incidents that created from alerts triggered by this + * analytics rule + */ + @JsonProperty(value = "incidentConfiguration") + private IncidentConfiguration incidentConfiguration; + + /* + * Dictionary of string key-value pairs of columns to be attached to the + * alert + */ + @JsonProperty(value = "customDetails") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customDetails; + + /* + * Array of the entity mappings of the alert rule + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * The alert details override settings + */ + @JsonProperty(value = "alertDetailsOverride") + private AlertDetailsOverride alertDetailsOverride; + + /** + * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @return the alertRuleTemplateName value. + */ + public String alertRuleTemplateName() { + return this.alertRuleTemplateName; + } + + /** + * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @param alertRuleTemplateName the alertRuleTemplateName value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - super.withAlertRuleTemplateName(alertRuleTemplateName); + this.alertRuleTemplateName = alertRuleTemplateName; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @return the templateVersion value. + */ + public String templateVersion() { + return this.templateVersion; + } + + /** + * Set the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @param templateVersion the templateVersion value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withTemplateVersion(String templateVersion) { - super.withTemplateVersion(templateVersion); + this.templateVersion = templateVersion; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the description property: The description of the alert rule. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the alert rule. + * + * @param description the description value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withDescription(String description) { - super.withDescription(description); + this.description = description; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the query property: The query that creates alerts for this rule. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: The query that creates alerts for this rule. + * + * @param query the query value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withQuery(String query) { - super.withQuery(query); + this.query = query; + return this; + } + + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the NrtAlertRuleProperties object itself. + */ + public NrtAlertRuleProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the NrtAlertRuleProperties object itself. + */ + public NrtAlertRuleProperties withTechniques(List techniques) { + this.techniques = techniques; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the displayName property: The display name for alerts created by this alert rule. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name for alerts created by this alert rule. + * + * @param displayName the displayName value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); + this.displayName = displayName; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @param enabled the enabled value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withEnabled(boolean enabled) { - super.withEnabled(enabled); + this.enabled = enabled; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the lastModifiedUtc property: The last time that this alert rule has been modified. + * + * @return the lastModifiedUtc value. + */ + public OffsetDateTime lastModifiedUtc() { + return this.lastModifiedUtc; + } + + /** + * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @return the suppressionDuration value. + */ + public Duration suppressionDuration() { + return this.suppressionDuration; + } + + /** + * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @param suppressionDuration the suppressionDuration value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withSuppressionDuration(Duration suppressionDuration) { - super.withSuppressionDuration(suppressionDuration); + this.suppressionDuration = suppressionDuration; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @return the suppressionEnabled value. + */ + public boolean suppressionEnabled() { + return this.suppressionEnabled; + } + + /** + * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @param suppressionEnabled the suppressionEnabled value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withSuppressionEnabled(boolean suppressionEnabled) { - super.withSuppressionEnabled(suppressionEnabled); + this.suppressionEnabled = suppressionEnabled; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withSeverity(AlertSeverity severity) { - super.withSeverity(severity); + this.severity = severity; return this; } - /** {@inheritDoc} */ - @Override - public NrtAlertRuleProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; + /** + * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @return the incidentConfiguration value. + */ + public IncidentConfiguration incidentConfiguration() { + return this.incidentConfiguration; } - /** {@inheritDoc} */ - @Override + /** + * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @param incidentConfiguration the incidentConfiguration value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - super.withIncidentConfiguration(incidentConfiguration); + this.incidentConfiguration = incidentConfiguration; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.customDetails; + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withCustomDetails(Map customDetails) { - super.withCustomDetails(customDetails); + this.customDetails = customDetails; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withEntityMappings(List entityMappings) { - super.withEntityMappings(entityMappings); + this.entityMappings = entityMappings; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.alertDetailsOverride; + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - super.withAlertDetailsOverride(alertDetailsOverride); + this.alertDetailsOverride = alertDetailsOverride; return this; } @@ -125,8 +445,39 @@ public NrtAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride aler * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (query() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property query in model NrtAlertRuleProperties")); + } + if (displayName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property displayName in model NrtAlertRuleProperties")); + } + if (suppressionDuration() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property suppressionDuration in model NrtAlertRuleProperties")); + } + if (severity() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property severity in model NrtAlertRuleProperties")); + } + if (incidentConfiguration() != null) { + incidentConfiguration().validate(); + } + if (entityMappings() != null) { + entityMappings().forEach(e -> e.validate()); + } + if (alertDetailsOverride() != null) { + alertDetailsOverride().validate(); + } } + + 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 bd42d5c6f5ab..a638d34bc864 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 @@ -5,15 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; +import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -21,9 +19,7 @@ /** NRT alert rule template properties. */ @Fluent -public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NrtAlertRuleTemplateProperties.class); - +public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { /* * The query that creates alerts for this rule. */ @@ -36,12 +32,6 @@ public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplatePrope @JsonProperty(value = "severity") private AlertSeverity severity; - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - /* * The version of this template - in format , where all are numbers. * For example <1.0.2>. @@ -109,26 +99,6 @@ public NrtAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { return this; } - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - /** * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For * example <1.0.2>. @@ -211,6 +181,20 @@ public NrtAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverr return this; } + /** {@inheritDoc} */ + @Override + public NrtAlertRuleTemplateProperties withTactics(List tactics) { + super.withTactics(tactics); + return this; + } + + /** {@inheritDoc} */ + @Override + public NrtAlertRuleTemplateProperties withTechniques(List techniques) { + super.withTechniques(techniques); + return this; + } + /** {@inheritDoc} */ @Override public NrtAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java new file mode 100644 index 000000000000..e79cb5b7768f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; + +/** Office365 Project requirements check properties. */ +@Fluent +public final class Office365ProjectCheckRequirementsProperties extends DataConnectorTenantId { + /** {@inheritDoc} */ + @Override + public Office365ProjectCheckRequirementsProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java new file mode 100644 index 000000000000..86464533c6a1 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Office Microsoft Project data connector properties. */ +@Fluent +public final class Office365ProjectDataConnectorProperties extends DataConnectorTenantId { + /* + * The available data types for the connector. + */ + @JsonProperty(value = "dataTypes", required = true) + private Office365ProjectConnectorDataTypes dataTypes; + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public Office365ProjectConnectorDataTypes dataTypes() { + return this.dataTypes; + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the Office365ProjectDataConnectorProperties object itself. + */ + public Office365ProjectDataConnectorProperties withDataTypes(Office365ProjectConnectorDataTypes dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + /** {@inheritDoc} */ + @Override + public Office365ProjectDataConnectorProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dataTypes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataTypes in model Office365ProjectDataConnectorProperties")); + } else { + dataTypes().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Office365ProjectDataConnectorProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java index bb3f6a39cdb1..7e6a246d93cb 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. */ @Fluent public final class OfficeAtpCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeAtpCheckRequirementsProperties.class); - /** {@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 536240820222..9a64b134a987 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** OfficeATP (Office 365 Advanced Threat Protection) data connector properties. */ @Fluent public final class OfficeAtpDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeAtpDataConnectorProperties.class); - /* * 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 a9844e53a2bb..2484305bd87f 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 @@ -7,15 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Consent for Office365 tenant that already made. */ @Fluent public final class OfficeConsentInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeConsentInner.class); - /* * 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 4dfdef450dae..ef163ee8eda7 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Consent property bag. */ @Fluent public final class OfficeConsentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeConsentProperties.class); - /* * 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 e27ff4f31230..4b02a823625c 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 @@ -8,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Office data connector properties. */ @Fluent public final class OfficeDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeDataConnectorProperties.class); - /* * The available data types for the connector. */ @@ -58,7 +55,7 @@ public OfficeDataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model OfficeDataConnectorProperties")); @@ -66,4 +63,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(OfficeDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java index 3e2c9081a0c4..5ae6bc407935 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** OfficeIRM (Microsoft Insider Risk Management) requirements check properties. */ @Fluent public final class OfficeIrmCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeIrmCheckRequirementsProperties.class); - /** {@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 d2ec7e3557cf..c3e618acc5a3 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** OfficeIRM (Microsoft Insider Risk Management) data connector properties. */ @Fluent public final class OfficeIrmDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeIrmDataConnectorProperties.class); - /* * 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 new file mode 100644 index 000000000000..b64db3bd6270 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; + +/** Office PowerBI requirements check properties. */ +@Fluent +public final class OfficePowerBICheckRequirementsProperties extends DataConnectorTenantId { + /** {@inheritDoc} */ + @Override + public OfficePowerBICheckRequirementsProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java new file mode 100644 index 000000000000..4f19d046961e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Office Microsoft PowerBI data connector properties. */ +@Fluent +public final class OfficePowerBIDataConnectorProperties extends DataConnectorTenantId { + /* + * The available data types for the connector. + */ + @JsonProperty(value = "dataTypes", required = true) + private OfficePowerBIConnectorDataTypes dataTypes; + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public OfficePowerBIConnectorDataTypes dataTypes() { + return this.dataTypes; + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the OfficePowerBIDataConnectorProperties object itself. + */ + public OfficePowerBIDataConnectorProperties withDataTypes(OfficePowerBIConnectorDataTypes dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + /** {@inheritDoc} */ + @Override + public OfficePowerBIDataConnectorProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dataTypes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataTypes in model OfficePowerBIDataConnectorProperties")); + } else { + dataTypes().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OfficePowerBIDataConnectorProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java index 023f88023ca6..ec5a4d2872bb 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 @@ -5,16 +5,12 @@ 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.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operation provided by provider. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * 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 11d3b3e4f6dd..b1dde6737938 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 @@ -5,18 +5,14 @@ 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.ElevationToken; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Process entity property bag. */ @Fluent public final class ProcessEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessEntityProperties.class); - /* * The account entity id running the processes. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java index d8629a83a945..405ab6789eaf 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.RegistryHive; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** RegistryKey entity property bag. */ @Immutable public final class RegistryKeyEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistryKeyEntityProperties.class); - /* * 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 695da86d26b9..96c8fbb70710 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.RegistryValueKind; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** RegistryValue entity property bag. */ @Immutable public final class RegistryValueEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistryValueEntityProperties.class); - /* * 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 02458bfd9811..40a02c226353 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 @@ -5,16 +5,12 @@ 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.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a relation between two resources. */ @Fluent public final class RelationInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RelationInner.class); - /* * 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 09d0883d8a85..99e3df52c8c1 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Relation property bag. */ @Fluent public final class RelationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RelationProperties.class); - /* * The resource ID of the related resource */ @@ -92,10 +89,12 @@ public String relatedResourceKind() { */ public void validate() { if (relatedResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property relatedResourceId in model RelationProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RelationProperties.class); } 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 d2e01e62edbc..dff64861cae5 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents a repository. */ @Fluent public final class RepoInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RepoInner.class); - /* * 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 18a3698bfaa3..cb14d587da7f 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 @@ -14,8 +14,6 @@ import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleCommonProperties; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -25,8 +23,6 @@ /** Scheduled alert rule base property bag. */ @Fluent public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRuleProperties.class); - /* * The Name of the alert rule template used to create this rule. */ @@ -46,12 +42,6 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "description") private String description; - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - /* * The display name for alerts created by this alert rule. */ @@ -84,18 +74,18 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "suppressionEnabled", required = true) private boolean suppressionEnabled; - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - /* * The tactics of the alert rule */ @JsonProperty(value = "tactics") private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + /* * The settings of the incidents that created from alerts triggered by this * analytics rule @@ -103,26 +93,6 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "incidentConfiguration") private IncidentConfiguration incidentConfiguration; - /* - * Dictionary of string key-value pairs of columns to be attached to the - * alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -185,26 +155,6 @@ public ScheduledAlertRuleProperties withDescription(String description) { return this; } - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withQuery(String query) { - this.query = query; - return this; - } - /** * Get the displayName property: The display name for alerts created by this alert rule. * @@ -299,42 +249,42 @@ public ScheduledAlertRuleProperties withSuppressionEnabled(boolean suppressionEn } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the tactics property: The tactics of the alert rule. * - * @return the severity value. + * @return the tactics value. */ - public AlertSeverity severity() { - return this.severity; + public List tactics() { + return this.tactics; } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Set the tactics property: The tactics of the alert rule. * - * @param severity the severity value to set. + * @param tactics the tactics value to set. * @return the ScheduledAlertRuleProperties object itself. */ - public ScheduledAlertRuleProperties withSeverity(AlertSeverity severity) { - this.severity = severity; + public ScheduledAlertRuleProperties withTactics(List tactics) { + this.tactics = tactics; return this; } /** - * Get the tactics property: The tactics of the alert rule. + * Get the techniques property: The techniques of the alert rule. * - * @return the tactics value. + * @return the techniques value. */ - public List tactics() { - return this.tactics; + public List techniques() { + return this.techniques; } /** - * Set the tactics property: The tactics of the alert rule. + * Set the techniques property: The techniques of the alert rule. * - * @param tactics the tactics value to set. + * @param techniques the techniques value to set. * @return the ScheduledAlertRuleProperties object itself. */ - public ScheduledAlertRuleProperties withTactics(List tactics) { - this.tactics = tactics; + public ScheduledAlertRuleProperties withTechniques(List techniques) { + this.techniques = techniques; return this; } @@ -360,63 +310,10 @@ public ScheduledAlertRuleProperties withIncidentConfiguration(IncidentConfigurat return this; } - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withQuery(String query) { + super.withQuery(query); return this; } @@ -434,6 +331,13 @@ public ScheduledAlertRuleProperties withQueryPeriod(Duration queryPeriod) { return this; } + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withSeverity(AlertSeverity severity) { + super.withSeverity(severity); + return this; + } + /** {@inheritDoc} */ @Override public ScheduledAlertRuleProperties withTriggerOperator(TriggerOperator triggerOperator) { @@ -455,6 +359,27 @@ public ScheduledAlertRuleProperties withEventGroupingSettings(EventGroupingSetti return this; } + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withCustomDetails(Map customDetails) { + super.withCustomDetails(customDetails); + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withEntityMappings(List entityMappings) { + super.withEntityMappings(entityMappings); + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + super.withAlertDetailsOverride(alertDetailsOverride); + return this; + } + /** * Validates the instance. * @@ -464,13 +389,13 @@ public ScheduledAlertRuleProperties withEventGroupingSettings(EventGroupingSetti public void validate() { super.validate(); if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property displayName in model ScheduledAlertRuleProperties")); } if (suppressionDuration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property suppressionDuration in model ScheduledAlertRuleProperties")); @@ -478,11 +403,7 @@ public void validate() { if (incidentConfiguration() != null) { incidentConfiguration().validate(); } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduledAlertRuleProperties.class); } 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 fc9447094d18..85a7b20c4b86 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 @@ -5,72 +5,71 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** Scheduled alert rule template properties. */ @Fluent -public final class ScheduledAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRuleTemplateProperties.class); +public final class ScheduledAlertRuleTemplateProperties { + /* + * the number of alert rules that were created by this template + */ + @JsonProperty(value = "alertRulesCreatedByTemplateCount") + private Integer alertRulesCreatedByTemplateCount; /* - * The query that creates alerts for this rule. + * The time that this alert rule template has been added. */ - @JsonProperty(value = "query") - private String query; + @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateUtc; /* - * The severity for alerts created by this alert rule. + * The time that this alert rule template was last updated. */ - @JsonProperty(value = "severity") - private AlertSeverity severity; + @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdatedDateUtc; /* - * The tactics of the alert rule + * The description of the alert rule template. */ - @JsonProperty(value = "tactics") - private List tactics; + @JsonProperty(value = "description") + private String description; /* - * The version of this template - in format , where all are numbers. - * For example <1.0.2>. + * The display name for alert rule template. */ - @JsonProperty(value = "version") - private String version; + @JsonProperty(value = "displayName") + private String displayName; /* - * Dictionary of string key-value pairs of columns to be attached to the - * alert + * The required data connectors for this template */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; + @JsonProperty(value = "requiredDataConnectors") + private List requiredDataConnectors; /* - * Array of the entity mappings of the alert rule + * The alert rule template status. */ - @JsonProperty(value = "entityMappings") - private List entityMappings; + @JsonProperty(value = "status") + private TemplateStatus status; /* - * The alert details override settings + * The query that creates alerts for this rule. */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; + @JsonProperty(value = "query") + private String query; /* * The frequency (in ISO 8601 duration format) for this alert rule to run. @@ -84,6 +83,12 @@ public final class ScheduledAlertRuleTemplateProperties extends AlertRuleTemplat @JsonProperty(value = "queryPeriod") private Duration queryPeriod; + /* + * The severity for alerts created by this alert rule. + */ + @JsonProperty(value = "severity") + private AlertSeverity severity; + /* * The operation against the threshold that triggers alert rule. */ @@ -96,151 +101,188 @@ public final class ScheduledAlertRuleTemplateProperties extends AlertRuleTemplat @JsonProperty(value = "triggerThreshold") private Integer triggerThreshold; + /* + * The tactics of the alert rule template + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /* + * The version of this template - in format , where all are numbers. + * For example <1.0.2>. + */ + @JsonProperty(value = "version") + private String version; + /* * The event grouping settings. */ @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Dictionary of string key-value pairs of columns to be attached to the + * alert + */ + @JsonProperty(value = "customDetails") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customDetails; + + /* + * Array of the entity mappings of the alert rule + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * The alert details override settings + */ + @JsonProperty(value = "alertDetailsOverride") + private AlertDetailsOverride alertDetailsOverride; + /** - * Get the query property: The query that creates alerts for this rule. + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @return the query value. + * @return the alertRulesCreatedByTemplateCount value. */ - public String query() { - return this.query; + public Integer alertRulesCreatedByTemplateCount() { + return this.alertRulesCreatedByTemplateCount; } /** - * Set the query property: The query that creates alerts for this rule. + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @param query the query value to set. + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withQuery(String query) { - this.query = query; + public ScheduledAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { + this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; return this; } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the severity value. + * @return the createdDateUtc value. */ - public AlertSeverity severity() { - return this.severity; + public OffsetDateTime createdDateUtc() { + return this.createdDateUtc; } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. + * @return the lastUpdatedDateUtc value. */ - public ScheduledAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; + public OffsetDateTime lastUpdatedDateUtc() { + return this.lastUpdatedDateUtc; } /** - * Get the tactics property: The tactics of the alert rule. + * Get the description property: The description of the alert rule template. * - * @return the tactics value. + * @return the description value. */ - public List tactics() { - return this.tactics; + public String description() { + return this.description; } /** - * Set the tactics property: The tactics of the alert rule. + * Set the description property: The description of the alert rule template. * - * @param tactics the tactics value to set. + * @param description the description value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; + public ScheduledAlertRuleTemplateProperties withDescription(String description) { + this.description = description; return this; } /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Get the displayName property: The display name for alert rule template. * - * @return the version value. + * @return the displayName value. */ - public String version() { - return this.version; + public String displayName() { + return this.displayName; } /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Set the displayName property: The display name for alert rule template. * - * @param version the version value to set. + * @param displayName the displayName value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withVersion(String version) { - this.version = version; + public ScheduledAlertRuleTemplateProperties withDisplayName(String displayName) { + this.displayName = displayName; return this; } /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Get the requiredDataConnectors property: The required data connectors for this template. * - * @return the customDetails value. + * @return the requiredDataConnectors value. */ - public Map customDetails() { - return this.customDetails; + public List requiredDataConnectors() { + return this.requiredDataConnectors; } /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Set the requiredDataConnectors property: The required data connectors for this template. * - * @param customDetails the customDetails value to set. + * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; + public ScheduledAlertRuleTemplateProperties withRequiredDataConnectors( + List requiredDataConnectors) { + this.requiredDataConnectors = requiredDataConnectors; return this; } /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. + * Get the status property: The alert rule template status. * - * @return the entityMappings value. + * @return the status value. */ - public List entityMappings() { - return this.entityMappings; + public TemplateStatus status() { + return this.status; } /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. + * Set the status property: The alert rule template status. * - * @param entityMappings the entityMappings value to set. + * @param status the status value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; + public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { + this.status = status; return this; } /** - * Get the alertDetailsOverride property: The alert details override settings. + * Get the query property: The query that creates alerts for this rule. * - * @return the alertDetailsOverride value. + * @return the query value. */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; + public String query() { + return this.query; } /** - * Set the alertDetailsOverride property: The alert details override settings. + * Set the query property: The query that creates alerts for this rule. * - * @param alertDetailsOverride the alertDetailsOverride value to set. + * @param query the query value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; + public ScheduledAlertRuleTemplateProperties withQuery(String query) { + this.query = query; return this; } @@ -284,6 +326,26 @@ public ScheduledAlertRuleTemplateProperties withQueryPeriod(Duration queryPeriod return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { + this.severity = severity; + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -324,6 +386,68 @@ public ScheduledAlertRuleTemplateProperties withTriggerThreshold(Integer trigger return this; } + /** + * Get the tactics property: The tactics of the alert rule template. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: The tactics of the alert rule template. + * + * @param tactics the tactics value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + + /** + * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. + * + * @param version the version value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withVersion(String version) { + this.version = version; + return this; + } + /** * Get the eventGroupingSettings property: The event grouping settings. * @@ -344,40 +468,63 @@ public ScheduledAlertRuleTemplateProperties withEventGroupingSettings(EventGroup return this; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.customDetails; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withCustomDetails(Map customDetails) { + this.customDetails = customDetails; return this; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withEntityMappings(List entityMappings) { + this.entityMappings = entityMappings; return this; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.alertDetailsOverride; + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + this.alertDetailsOverride = alertDetailsOverride; return this; } @@ -386,17 +533,18 @@ public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (requiredDataConnectors() != null) { + requiredDataConnectors().forEach(e -> e.validate()); + } + if (eventGroupingSettings() != null) { + eventGroupingSettings().validate(); + } if (entityMappings() != null) { entityMappings().forEach(e -> e.validate()); } if (alertDetailsOverride() != null) { alertDetailsOverride().validate(); } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java index 55d3fdab26f2..2eb9b9953467 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AlertStatus; import com.azure.resourcemanager.securityinsights.models.AttackTactic; @@ -14,7 +13,6 @@ import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.KillChainIntent; import com.azure.resourcemanager.securityinsights.models.SecurityAlertPropertiesConfidenceReasonsItem; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -22,8 +20,6 @@ /** SecurityAlert entity property bag. */ @Fluent public final class SecurityAlertProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityAlertProperties.class); - /* * 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 882887957775..118bb1fb86f2 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** SecurityGroup entity property bag. */ @Immutable public final class SecurityGroupEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityGroupEntityProperties.class); - /* * The group distinguished name */ 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 993d74cad856..e46fd29c170a 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 @@ -5,16 +5,12 @@ 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.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Sentinel onboarding state. */ @Fluent public final class SentinelOnboardingStateInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SentinelOnboardingStateInner.class); - /* * 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 db843d12eefb..d1067a68a26d 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Sentinel onboarding state properties. */ @Fluent public final class SentinelOnboardingStateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SentinelOnboardingStateProperties.class); - /* * 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 8b302e572fe6..420eae2ca857 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 @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of the Sentinel onboarding states. */ @Fluent public final class SentinelOnboardingStatesListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SentinelOnboardingStatesListInner.class); - /* * Array of Sentinel onboarding states */ @@ -48,7 +45,7 @@ public SentinelOnboardingStatesListInner withValue(List e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(SentinelOnboardingStatesListInner.class); } 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 d9eb032bf917..bc77b021a5b5 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 @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the settings. */ @Fluent public final class SettingListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SettingListInner.class); - /* * Array of settings. */ @@ -48,11 +45,13 @@ public SettingListInner withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model SettingListInner")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(SettingListInner.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java index f6772220dde5..fe11570beafc 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 @@ -5,13 +5,11 @@ 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.Anomalies; import com.azure.resourcemanager.securityinsights.models.EntityAnalytics; import com.azure.resourcemanager.securityinsights.models.EyesOn; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.Ueba; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -31,8 +29,6 @@ }) @Fluent public class SettingsInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SettingsInner.class); - /** {@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 bb38f600bee9..3d9c0096e645 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 @@ -5,20 +5,19 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ContentType; +import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.Repository; +import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.securityinsights.models.Version; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents a SourceControl in Azure Security Insights. */ @Fluent public final class SourceControlInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlInner.class); - /* * source control properties */ @@ -64,6 +63,29 @@ public SourceControlInner withIdPropertiesId(String id) { return this; } + /** + * Get the version property: The version number associated with the source control. + * + * @return the version value. + */ + public Version version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: The version number associated with the source control. + * + * @param version the version value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withVersion(Version version) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + /** * Get the displayName property: The display name of the source control. * @@ -179,6 +201,52 @@ public SourceControlInner withRepository(Repository repository) { return this; } + /** + * Get the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @return the repositoryResourceInfo value. + */ + public RepositoryResourceInfo repositoryResourceInfo() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryResourceInfo(); + } + + /** + * Set the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @param repositoryResourceInfo the repositoryResourceInfo value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withRepositoryResourceInfo(repositoryResourceInfo); + return this; + } + + /** + * Get the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @return the lastDeploymentInfo value. + */ + public DeploymentInfo lastDeploymentInfo() { + return this.innerProperties() == null ? null : this.innerProperties().lastDeploymentInfo(); + } + + /** + * Set the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @param lastDeploymentInfo the lastDeploymentInfo value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withLastDeploymentInfo(lastDeploymentInfo); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java index 9083d5b3fd3f..c7b2417c0cdc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java @@ -7,23 +7,29 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ContentType; +import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.Repository; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; +import com.azure.resourcemanager.securityinsights.models.Version; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes source control properties. */ @Fluent public final class SourceControlProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlProperties.class); - /* * The id (a Guid) of the source control */ @JsonProperty(value = "id") private String id; + /* + * The version number associated with the source control + */ + @JsonProperty(value = "version") + private Version version; + /* * The display name of the source control */ @@ -54,6 +60,18 @@ public final class SourceControlProperties { @JsonProperty(value = "repository", required = true) private Repository repository; + /* + * Information regarding the resources created in user's repository. + */ + @JsonProperty(value = "repositoryResourceInfo") + private RepositoryResourceInfo repositoryResourceInfo; + + /* + * Information regarding the latest deployment for the source control. + */ + @JsonProperty(value = "lastDeploymentInfo") + private DeploymentInfo lastDeploymentInfo; + /** * Get the id property: The id (a Guid) of the source control. * @@ -74,6 +92,26 @@ public SourceControlProperties withId(String id) { return this; } + /** + * Get the version property: The version number associated with the source control. + * + * @return the version value. + */ + public Version version() { + return this.version; + } + + /** + * Set the version property: The version number associated with the source control. + * + * @param version the version value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withVersion(Version version) { + this.version = version; + return this; + } + /** * Get the displayName property: The display name of the source control. * @@ -174,6 +212,46 @@ public SourceControlProperties withRepository(Repository repository) { return this; } + /** + * Get the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @return the repositoryResourceInfo value. + */ + public RepositoryResourceInfo repositoryResourceInfo() { + return this.repositoryResourceInfo; + } + + /** + * Set the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @param repositoryResourceInfo the repositoryResourceInfo value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { + this.repositoryResourceInfo = repositoryResourceInfo; + return this; + } + + /** + * Get the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @return the lastDeploymentInfo value. + */ + public DeploymentInfo lastDeploymentInfo() { + return this.lastDeploymentInfo; + } + + /** + * Set the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @param lastDeploymentInfo the lastDeploymentInfo value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { + this.lastDeploymentInfo = lastDeploymentInfo; + return this; + } + /** * Validates the instance. * @@ -181,30 +259,38 @@ public SourceControlProperties withRepository(Repository repository) { */ public void validate() { if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property displayName in model SourceControlProperties")); } if (repoType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property repoType in model SourceControlProperties")); } if (contentTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property contentTypes in model SourceControlProperties")); } if (repository() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property repository in model SourceControlProperties")); } else { repository().validate(); } + if (repositoryResourceInfo() != null) { + repositoryResourceInfo().validate(); + } + if (lastDeploymentInfo() != null) { + lastDeploymentInfo().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(SourceControlProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java index fc7ea17d9cdf..c890045dca64 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 @@ -5,9 +5,7 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.UUID; @@ -15,8 +13,6 @@ /** Submission mail entity property bag. */ @Immutable public final class SubmissionMailEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubmissionMailEntityProperties.class); - /* * 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 71e773b4e6bf..defd84d01805 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Threat Intelligence Platforms data connector required properties. */ @Fluent public final class TICheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TICheckRequirementsProperties.class); - /** {@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 980ec2e6fed2..62d09af2a1b6 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 @@ -8,15 +8,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** TI (Threat Intelligence) data connector properties. */ @Fluent public final class TIDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TIDataConnectorProperties.class); - /* * The lookback period for the feed to be imported. */ @@ -85,7 +82,7 @@ public TIDataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model TIDataConnectorProperties")); @@ -93,4 +90,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TIDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java index 0b8aa2beb2ce..9054e9c2939e 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Describes team information. */ @Immutable public final class TeamInformationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TeamInformationInner.class); - /* * 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 7e2209e586ae..3118a288a38b 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 @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -16,8 +15,6 @@ /** Threat Intelligence alert rule base property bag. */ @Fluent public final class ThreatIntelligenceAlertRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceAlertRuleProperties.class); - /* * The Name of the alert rule template used to create this rule. */ @@ -60,6 +57,12 @@ public final class ThreatIntelligenceAlertRuleProperties { @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -145,6 +148,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * @@ -152,11 +164,13 @@ public List tactics() { */ public void validate() { if (alertRuleTemplateName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property alertRuleTemplateName in model" + " ThreatIntelligenceAlertRuleProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceAlertRuleProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java index 53fe73ec3dd8..2cabad3ea765 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java @@ -7,32 +7,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; +import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Threat Intelligence alert rule template properties. */ @Fluent -public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ThreatIntelligenceAlertRuleTemplateProperties.class); - +public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { /* * The severity for alerts created by this alert rule. */ @JsonProperty(value = "severity", required = true) private AlertSeverity severity; - /* - * The tactics of the alert rule template - */ - @JsonProperty(value = "tactics") - private List tactics; - /** * Get the severity property: The severity for alerts created by this alert rule. * @@ -53,23 +43,17 @@ public ThreatIntelligenceAlertRuleTemplateProperties withSeverity(AlertSeverity return this; } - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; + /** {@inheritDoc} */ + @Override + public ThreatIntelligenceAlertRuleTemplateProperties withTactics(List tactics) { + super.withTactics(tactics); + return this; } - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the ThreatIntelligenceAlertRuleTemplateProperties object itself. - */ - public ThreatIntelligenceAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; + /** {@inheritDoc} */ + @Override + public ThreatIntelligenceAlertRuleTemplateProperties withTechniques(List techniques) { + super.withTechniques(techniques); return this; } @@ -119,10 +103,12 @@ public ThreatIntelligenceAlertRuleTemplateProperties withStatus(TemplateStatus s public void validate() { super.validate(); if (severity() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property severity in model ThreatIntelligenceAlertRuleTemplateProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceAlertRuleTemplateProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java index eda09a0fc282..94e3ad449679 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 @@ -5,13 +5,11 @@ 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.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceExternalReference; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceGranularMarkingModel; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceKillChainPhase; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceParsedPattern; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -20,8 +18,6 @@ /** Describes threat intelligence entity properties. */ @Fluent public final class ThreatIntelligenceIndicatorProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorProperties.class); - /* * 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 9e5198057412..66c6f53009c5 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 @@ -5,10 +5,8 @@ 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.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -23,8 +21,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModel.class)}) @Fluent public class ThreatIntelligenceInformationInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceInformationInner.class); - /** {@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 5298842e7ff9..fccc6810b44c 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceMetrics; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the threat intelligence metric fields (type/threat type/source). */ @Fluent public final class ThreatIntelligenceMetricsListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceMetricsListInner.class); - /* * Array of threat intelligence metric fields (type/threat type/source). */ @@ -49,7 +46,7 @@ public ThreatIntelligenceMetricsListInner withValue(List e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceMetricsListInner.class); } 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 239515abb74c..e65e280aade2 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Threat Intelligence TAXII data connector required properties. */ @Fluent public final class TiTaxiiCheckRequirementsProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TiTaxiiCheckRequirementsProperties.class); - /** {@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 ac65c43bec6c..2faf94e2db69 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 @@ -9,15 +9,12 @@ import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.PollingFrequency; import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Threat Intelligence TAXII data connector properties. */ @Fluent public final class TiTaxiiDataConnectorProperties extends DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TiTaxiiDataConnectorProperties.class); - /* * The workspace id. */ @@ -268,13 +265,13 @@ public TiTaxiiDataConnectorProperties withTenantId(String tenantId) { public void validate() { super.validate(); if (pollingFrequency() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property pollingFrequency in model TiTaxiiDataConnectorProperties")); } if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model TiTaxiiDataConnectorProperties")); @@ -282,4 +279,6 @@ public void validate() { dataTypes().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TiTaxiiDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java index f0f77ffa8306..9a9c6252b395 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 @@ -5,17 +5,13 @@ 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.UebaDataSources; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Ueba property bag. */ @Fluent public final class UebaProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UebaProperties.class); - /* * 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 2b23c3ec2247..833855a5cdd7 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Url entity property bag. */ @Immutable public final class UrlEntityProperties extends EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UrlEntityProperties.class); - /* * 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 91ebee357d57..14c1ca299bc2 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 @@ -5,11 +5,9 @@ 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.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -18,8 +16,6 @@ /** Represents a Watchlist in Azure Security Insights. */ @Fluent public final class WatchlistInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistInner.class); - /* * Watchlist properties */ @@ -112,21 +108,21 @@ public WatchlistInner withProvider(String provider) { } /** - * Get the source property: The source of the watchlist. + * Get the source property: The filename of the watchlist, called 'source'. * * @return the source value. */ - public Source source() { + public String source() { return this.innerProperties() == null ? null : this.innerProperties().source(); } /** - * Set the source property: The source of the watchlist. + * Set the source property: The filename of the watchlist, called 'source'. * * @param source the source value to set. * @return the WatchlistInner object itself. */ - public WatchlistInner withSource(Source source) { + public WatchlistInner withSource(String source) { if (this.innerProperties() == null) { this.innerProperties = new WatchlistProperties(); } @@ -134,6 +130,29 @@ public WatchlistInner withSource(Source source) { return this; } + /** + * Get the sourceType property: The sourceType of the watchlist. + * + * @return the sourceType value. + */ + public SourceType sourceType() { + return this.innerProperties() == null ? null : this.innerProperties().sourceType(); + } + + /** + * Set the sourceType property: The sourceType of the watchlist. + * + * @param sourceType the sourceType value to set. + * @return the WatchlistInner object itself. + */ + public WatchlistInner withSourceType(SourceType sourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new WatchlistProperties(); + } + this.innerProperties().withSourceType(sourceType); + return this; + } + /** * Get the created property: The time the watchlist was created. * @@ -510,29 +529,6 @@ public WatchlistInner withUploadStatus(String uploadStatus) { return this; } - /** - * Get the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @return the watchlistItemsCount value. - */ - public Integer watchlistItemsCount() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistItemsCount(); - } - - /** - * Set the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount the watchlistItemsCount value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withWatchlistItemsCount(Integer watchlistItemsCount) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withWatchlistItemsCount(watchlistItemsCount); - return this; - } - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java index 228360fa82a8..191e00232be8 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 @@ -5,18 +5,14 @@ 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.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Represents a Watchlist item in Azure Security Insights. */ @Fluent public final class WatchlistItemInner extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistItemInner.class); - /* * 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 91b96606ba8c..61d97fd284b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Describes watchlist item properties. */ @Fluent public final class WatchlistItemProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistItemProperties.class); - /* * The type of the watchlist item */ @@ -289,10 +286,12 @@ public void validate() { updatedBy().validate(); } if (itemsKeyValue() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property itemsKeyValue in model WatchlistItemProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(WatchlistItemProperties.class); } 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 e9024eb000a9..1d8ba4dd9aa8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java @@ -6,9 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -17,8 +16,6 @@ /** Describes watchlist properties. */ @Fluent public final class WatchlistProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistProperties.class); - /* * The id (a Guid) of the watchlist */ @@ -38,10 +35,16 @@ public final class WatchlistProperties { private String provider; /* - * The source of the watchlist + * The filename of the watchlist, called 'source' */ - @JsonProperty(value = "source", required = true) - private Source source; + @JsonProperty(value = "source") + private String source; + + /* + * The sourceType of the watchlist + */ + @JsonProperty(value = "sourceType") + private SourceType sourceType; /* * The time the watchlist was created @@ -146,12 +149,6 @@ public final class WatchlistProperties { @JsonProperty(value = "uploadStatus") private String uploadStatus; - /* - * The number of Watchlist Items in the Watchlist - */ - @JsonProperty(value = "watchlistItemsCount") - private Integer watchlistItemsCount; - /** * Get the watchlistId property: The id (a Guid) of the watchlist. * @@ -213,25 +210,45 @@ public WatchlistProperties withProvider(String provider) { } /** - * Get the source property: The source of the watchlist. + * Get the source property: The filename of the watchlist, called 'source'. * * @return the source value. */ - public Source source() { + public String source() { return this.source; } /** - * Set the source property: The source of the watchlist. + * Set the source property: The filename of the watchlist, called 'source'. * * @param source the source value to set. * @return the WatchlistProperties object itself. */ - public WatchlistProperties withSource(Source source) { + public WatchlistProperties withSource(String source) { this.source = source; return this; } + /** + * Get the sourceType property: The sourceType of the watchlist. + * + * @return the sourceType value. + */ + public SourceType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: The sourceType of the watchlist. + * + * @param sourceType the sourceType value to set. + * @return the WatchlistProperties object itself. + */ + public WatchlistProperties withSourceType(SourceType sourceType) { + this.sourceType = sourceType; + return this; + } + /** * Get the created property: The time the watchlist was created. * @@ -560,26 +577,6 @@ public WatchlistProperties withUploadStatus(String uploadStatus) { return this; } - /** - * Get the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @return the watchlistItemsCount value. - */ - public Integer watchlistItemsCount() { - return this.watchlistItemsCount; - } - - /** - * Set the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount the watchlistItemsCount value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withWatchlistItemsCount(Integer watchlistItemsCount) { - this.watchlistItemsCount = watchlistItemsCount; - return this; - } - /** * Validates the instance. * @@ -587,20 +584,15 @@ public WatchlistProperties withWatchlistItemsCount(Integer watchlistItemsCount) */ public void validate() { if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property displayName in model WatchlistProperties")); } if (provider() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property provider in model WatchlistProperties")); } - if (source() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property source in model WatchlistProperties")); - } if (createdBy() != null) { createdBy().validate(); } @@ -608,10 +600,12 @@ public void validate() { updatedBy().validate(); } if (itemsSearchKey() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property itemsSearchKey in model WatchlistProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(WatchlistProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java index 6af30a5c8ee8..649b3ebed026 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.ActionsClient; import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; import com.azure.resourcemanager.securityinsights.models.ActionRequest; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in ActionsClient. */ public final class ActionsClientImpl implements ActionsClient { - private final ClientLogger logger = new ClientLogger(ActionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ActionsService service; @@ -275,7 +272,7 @@ private Mono> listByAlertRuleSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAlertRuleAsync( @@ -295,7 +292,7 @@ private PagedFlux listByAlertRuleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAlertRuleAsync( @@ -314,7 +311,7 @@ private PagedFlux listByAlertRuleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAlertRule( @@ -332,7 +329,7 @@ public PagedIterable listByAlertRule( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAlertRule( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java index c0627fdc5443..09f8ea57b333 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; import com.azure.resourcemanager.securityinsights.models.ActionResponse; import com.azure.resourcemanager.securityinsights.models.Actions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ActionsImpl implements Actions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ActionsImpl.class); private final ActionsClient innerClient; @@ -78,7 +77,7 @@ public Response deleteWithResponse( public ActionResponse getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -86,21 +85,21 @@ public ActionResponse getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String ruleId = Utils.getValueFromIdByName(id, "alertRules"); if (ruleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); } String actionId = Utils.getValueFromIdByName(id, "actions"); if (actionId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); @@ -111,7 +110,7 @@ public ActionResponse getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -119,21 +118,21 @@ public Response getByIdWithResponse(String id, Context context) } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String ruleId = Utils.getValueFromIdByName(id, "alertRules"); if (ruleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); } String actionId = Utils.getValueFromIdByName(id, "actions"); if (actionId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); @@ -144,7 +143,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -152,21 +151,21 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String ruleId = Utils.getValueFromIdByName(id, "alertRules"); if (ruleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); } String actionId = Utils.getValueFromIdByName(id, "actions"); if (actionId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); @@ -177,7 +176,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -185,21 +184,21 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String ruleId = Utils.getValueFromIdByName(id, "alertRules"); if (ruleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'alertRules'.", id))); } String actionId = Utils.getValueFromIdByName(id, "actions"); if (actionId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'actions'.", id))); 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 9c3dfbb498c9..87f2ee00e957 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatesList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in AlertRuleTemplatesClient. */ public final class AlertRuleTemplatesClientImpl implements AlertRuleTemplatesClient { - private final ClientLogger logger = new ClientLogger(AlertRuleTemplatesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AlertRuleTemplatesService service; @@ -222,7 +219,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -239,7 +236,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -257,7 +254,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -273,7 +270,7 @@ public PagedIterable list(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java index b18d8cb673bc..e5bdc4bc9ffc 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AlertRuleTemplatesImpl implements AlertRuleTemplates { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleTemplatesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AlertRuleTemplatesImpl.class); private final AlertRuleTemplatesClient 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 34d972d74ac2..af17c649ed04 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; import com.azure.resourcemanager.securityinsights.models.AlertRulesList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in AlertRulesClient. */ public final class AlertRulesClientImpl implements AlertRulesClient { - private final ClientLogger logger = new ClientLogger(AlertRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AlertRulesService service; @@ -256,7 +253,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -273,7 +270,7 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -290,7 +287,7 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -306,7 +303,7 @@ public PagedIterable list(String resourceGroupName, String works * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java index b9439a9c3eb2..4f4d06aa4fa9 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; import com.azure.resourcemanager.securityinsights.models.AlertRule; import com.azure.resourcemanager.securityinsights.models.AlertRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AlertRulesImpl implements AlertRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AlertRulesImpl.class); private final AlertRulesClient innerClient; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java index 9f20e40e9d25..799bf683c8a8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java @@ -61,22 +61,22 @@ public List actions() { } } - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - public OffsetDateTime lastModifiedTimeUtc() { return this.innerModel().lastModifiedTimeUtc(); } - public ClientInfo createdBy() { - return this.innerModel().createdBy(); + public OffsetDateTime createdTimeUtc() { + return this.innerModel().createdTimeUtc(); } public ClientInfo lastModifiedBy() { return this.innerModel().lastModifiedBy(); } + public ClientInfo createdBy() { + return this.innerModel().createdBy(); + } + public AutomationRuleInner innerModel() { return this.innerObject; } @@ -181,11 +181,6 @@ public AutomationRule refresh(Context context) { return this; } - public AutomationRuleImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - public AutomationRuleImpl withDisplayName(String displayName) { this.innerModel().withDisplayName(displayName); return this; @@ -205,4 +200,9 @@ public AutomationRuleImpl withActions(List actions) { this.innerModel().withActions(actions); return this; } + + public AutomationRuleImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java index 838c59389f1a..35acdf0a0139 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; import com.azure.resourcemanager.securityinsights.models.AutomationRulesList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public final class AutomationRulesClientImpl implements AutomationRulesClient { - private final ClientLogger logger = new ClientLogger(AutomationRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AutomationRulesService service; @@ -65,64 +62,64 @@ private interface AutomationRulesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("automationRuleId") String automationRuleId, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get( + @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("automationRuleId") String automationRuleId, + @BodyParam("application/json") AutomationRuleInner automationRuleToUpsert, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Put( + @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("automationRuleId") String automationRuleId, - @BodyParam("application/json") AutomationRuleInner automationRule, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Delete( + @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200, 204}) + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("automationRuleId") String automationRuleId, @HeaderParam("Accept") String accept, Context context); @@ -138,18 +135,19 @@ Mono> listNext( } /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -169,45 +167,42 @@ private Mono> listSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + if (automationRuleId == null) { + return Mono + .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( + .get( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + automationRuleId, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -227,107 +222,101 @@ private Mono> listSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + if (automationRuleId == null) { + return Mono + .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .get( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + automationRuleId, accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all automation rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + context); } /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. + * @return the automation rule on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String automationRuleId) { + return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); } /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. + * @return the automation rule. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { + return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); } /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. + * @return the automation rule along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** - * Gets the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param automationRuleToUpsert The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -351,38 +340,47 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } + if (automationRuleToUpsert != null) { + automationRuleToUpsert.validate(); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .get( + .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, + automationRuleToUpsert, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param automationRuleToUpsert The automation rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -406,35 +404,71 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } + if (automationRuleToUpsert != null) { + automationRuleToUpsert.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( + .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, + automationRuleToUpsert, accept, context); } /** - * Gets the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param automationRuleToUpsert The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates the automation rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String automationRuleId) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) + final AutomationRuleInner automationRuleToUpsert = null; + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -446,7 +480,7 @@ private Mono getAsync( } /** - * Gets the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -454,46 +488,53 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { - return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); + public AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId) { + final AutomationRuleInner automationRuleToUpsert = null; + return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert).block(); } /** - * Gets the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param automationRuleToUpsert The automation rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) + .block(); } /** - * Creates or updates the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule along with {@link Response} on successful completion of {@link Mono}. + * @return any object along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule) { + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -517,49 +558,38 @@ private Mono> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } - if (automationRule == null) { - return Mono.error(new IllegalArgumentException("Parameter automationRule is required and cannot be null.")); - } else { - automationRule.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .createOrUpdate( + .delete( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, - automationRule, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule along with {@link Response} on successful completion of {@link Mono}. + * @return any object along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRule, - Context context) { + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -583,44 +613,36 @@ private Mono> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } - if (automationRule == null) { - return Mono.error(new IllegalArgumentException("Parameter automationRule is required and cannot be null.")); - } else { - automationRule.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .createOrUpdate( + .delete( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, - automationRule, accept, context); } /** - * Creates or updates the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule on successful completion of {@link Mono}. + * @return any object on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, automationRule) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String automationRuleId) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -630,62 +652,52 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule) { - return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRule).block(); + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); } /** - * Creates or updates the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRule The automation rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule along with {@link Response}. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRule, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRule, context) - .block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** - * Delete the automation rule. + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -705,42 +717,45 @@ private Mono> deleteWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .delete( + .list( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - automationRuleId, accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the automation rule. + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -760,72 +775,91 @@ private Mono> deleteWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .delete( + .list( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - automationRuleId, accept, - context); + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * Delete the automation rule. + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return all automation rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String automationRuleId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) - .flatMap((Response res) -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Delete the automation rule. + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all automation rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String automationRuleId) { - deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Delete the automation rule. + * Gets all automation rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all automation rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return all automation rules as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); } /** @@ -835,7 +869,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -871,7 +905,7 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java index 1d2b6dd64ef2..90cf494caf3d 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner; import com.azure.resourcemanager.securityinsights.models.AutomationRule; import com.azure.resourcemanager.securityinsights.models.AutomationRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AutomationRulesImpl implements AutomationRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AutomationRulesImpl.class); private final AutomationRulesClient innerClient; @@ -29,16 +28,6 @@ public AutomationRulesImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); - } - public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); if (inner != null) { @@ -63,19 +52,29 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String automationRuleId) { - this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); } - public Response deleteWithResponse( + public Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); + return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); + } + public AutomationRule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -83,14 +82,14 @@ public AutomationRule getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); if (automationRuleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,7 +101,7 @@ public AutomationRule getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -110,14 +109,14 @@ public Response getByIdWithResponse(String id, Context context) } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); if (automationRuleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -126,10 +125,10 @@ public Response getByIdWithResponse(String id, Context context) return this.getWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } - public void deleteById(String id) { + public Object deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -137,26 +136,26 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); if (automationRuleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'automationRules'.", id))); } - this.deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE); + return this.deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); } - public Response deleteByIdWithResponse(String id, Context context) { + public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,14 +163,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String automationRuleId = Utils.getValueFromIdByName(id, "automationRules"); if (automationRuleId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java index ca788723989d..f485c1253468 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java @@ -7,7 +7,9 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.Bookmark; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; @@ -96,6 +98,33 @@ public IncidentInfo incidentInfo() { return this.innerModel().incidentInfo(); } + public List entityMappings() { + List inner = this.innerModel().entityMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List tactics() { + List inner = this.innerModel().tactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List techniques() { + List inner = this.innerModel().techniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public BookmarkInner innerModel() { return this.innerObject; } @@ -266,4 +295,19 @@ public BookmarkImpl withIncidentInfo(IncidentInfo incidentInfo) { this.innerModel().withIncidentInfo(incidentInfo); return this; } + + public BookmarkImpl withEntityMappings(List entityMappings) { + this.innerModel().withEntityMappings(entityMappings); + return this; + } + + public BookmarkImpl withTactics(List tactics) { + this.innerModel().withTactics(tactics); + return this; + } + + public BookmarkImpl withTechniques(List techniques) { + this.innerModel().withTechniques(techniques); + return this; + } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java index 5ce8f7c6c728..c7e960fef590 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 @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in BookmarkOperationsClient. */ public final class BookmarkOperationsClientImpl implements BookmarkOperationsClient { - private final ClientLogger logger = new ClientLogger(BookmarkOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BookmarkOperationsService service; 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 5716710a979d..40b134363e7c 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponse; import com.azure.resourcemanager.securityinsights.models.BookmarkOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BookmarkOperationsImpl implements BookmarkOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BookmarkOperationsImpl.class); private final BookmarkOperationsClient 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 cd0bf4993fc7..7c8a6ec3d8a2 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.RelationList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in BookmarkRelationsClient. */ public final class BookmarkRelationsClientImpl implements BookmarkRelationsClient { - private final ClientLogger logger = new ClientLogger(BookmarkRelationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BookmarkRelationsService service; @@ -318,7 +315,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -343,7 +340,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String bookmarkId) { @@ -372,7 +369,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -400,7 +397,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId) { @@ -428,7 +425,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java index 71286e569efa..0c90dbec0292 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.BookmarkRelations; import com.azure.resourcemanager.securityinsights.models.Relation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BookmarkRelationsImpl implements BookmarkRelations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkRelationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BookmarkRelationsImpl.class); private final BookmarkRelationsClient innerClient; @@ -88,7 +87,7 @@ public Response deleteWithResponse( public Relation getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -96,21 +95,21 @@ public Relation getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); } String relationName = Utils.getValueFromIdByName(id, "relations"); if (relationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); @@ -123,7 +122,7 @@ public Relation getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,21 +130,21 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); } String relationName = Utils.getValueFromIdByName(id, "relations"); if (relationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); @@ -156,7 +155,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,21 +163,21 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); } String relationName = Utils.getValueFromIdByName(id, "relations"); if (relationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); @@ -189,7 +188,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -197,21 +196,21 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); } String relationName = Utils.getValueFromIdByName(id, "relations"); if (relationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); 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 11847a7ceb15..8069a44d7184 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.BookmarksClient; import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; import com.azure.resourcemanager.securityinsights.models.BookmarkList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in BookmarksClient. */ public final class BookmarksClientImpl implements BookmarksClient { - private final ClientLogger logger = new ClientLogger(BookmarksClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BookmarksService service; @@ -256,7 +253,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -273,7 +270,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -290,7 +287,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -306,7 +303,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java index 02010e33a17f..e87053fd5814 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; import com.azure.resourcemanager.securityinsights.models.Bookmark; import com.azure.resourcemanager.securityinsights.models.Bookmarks; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BookmarksImpl implements Bookmarks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarksImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BookmarksImpl.class); private final BookmarksClient innerClient; @@ -75,7 +74,7 @@ public Response deleteWithResponse( public Bookmark getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -83,14 +82,14 @@ public Bookmark getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); @@ -101,7 +100,7 @@ public Bookmark getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,14 +108,14 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); @@ -127,7 +126,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -135,14 +134,14 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); @@ -153,7 +152,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -161,14 +160,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); if (bookmarkId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); 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 4352be0fb6c7..a21cf2f39c47 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 @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; @@ -34,8 +33,6 @@ */ public final class DataConnectorsCheckRequirementsOperationsClientImpl implements DataConnectorsCheckRequirementsOperationsClient { - private final ClientLogger logger = new ClientLogger(DataConnectorsCheckRequirementsOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DataConnectorsCheckRequirementsOperationsService service; 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 6e833a0e8f2a..1c97eca6aff9 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 @@ -13,11 +13,9 @@ import com.azure.resourcemanager.securityinsights.models.DataConnectorRequirementsState; import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DataConnectorsCheckRequirementsOperationsImpl implements DataConnectorsCheckRequirementsOperations { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DataConnectorsCheckRequirementsOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsCheckRequirementsOperationsImpl.class); private final DataConnectorsCheckRequirementsOperationsClient 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 5f5202c17b91..10505546ad3c 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 @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; @@ -38,8 +37,6 @@ /** An instance of this class provides access to all the operations defined in DataConnectorsClient. */ public final class DataConnectorsClientImpl implements DataConnectorsClient { - private final ClientLogger logger = new ClientLogger(DataConnectorsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DataConnectorsService service; @@ -294,7 +291,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -311,7 +308,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -328,7 +325,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -344,7 +341,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java index a59ea0358f07..33b8c30d1247 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 @@ -14,10 +14,9 @@ import com.azure.resourcemanager.securityinsights.models.DataConnector; import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; import com.azure.resourcemanager.securityinsights.models.DataConnectors; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DataConnectorsImpl implements DataConnectors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsImpl.class); private final DataConnectorsClient 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 d5ef642278a4..7b3a8f67d878 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 @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in DomainWhoisClient. */ public final class DomainWhoisClientImpl implements DomainWhoisClient { - private final ClientLogger logger = new ClientLogger(DomainWhoisClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DomainWhoisService service; 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 c1001d44b797..be9939f6abc0 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 @@ -12,10 +12,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; import com.azure.resourcemanager.securityinsights.models.DomainWhois; import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhois; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DomainWhoisImpl implements DomainWhois { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainWhoisImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DomainWhoisImpl.class); private final DomainWhoisClient 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 a204ff2ce412..c28a99edbc78 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 @@ -27,7 +27,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in EntitiesClient. */ public final class EntitiesClientImpl implements EntitiesClient { - private final ClientLogger logger = new ClientLogger(EntitiesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EntitiesService service; @@ -278,7 +275,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -295,7 +292,7 @@ private PagedFlux listAsync(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -312,7 +309,7 @@ private PagedFlux listAsync(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -328,7 +325,7 @@ public PagedIterable list(String resourceGroupName, String workspac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java index 8728f5405d68..1297e2fbfd73 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 @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in EntitiesGetTimelinesClient. */ public final class EntitiesGetTimelinesClientImpl implements EntitiesGetTimelinesClient { - private final ClientLogger logger = new ClientLogger(EntitiesGetTimelinesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EntitiesGetTimelinesService service; 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 5c4607c3fdcb..79b119a109c9 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.models.EntitiesGetTimelines; import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; import com.azure.resourcemanager.securityinsights.models.EntityTimelineResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EntitiesGetTimelinesImpl implements EntitiesGetTimelines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntitiesGetTimelinesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EntitiesGetTimelinesImpl.class); private final EntitiesGetTimelinesClient 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 39ff3bdc95d2..6ce063fd52fe 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 @@ -22,10 +22,9 @@ import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsResponse; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; import com.azure.resourcemanager.securityinsights.models.GetQueriesResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EntitiesImpl implements Entities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntitiesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EntitiesImpl.class); private final EntitiesClient 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 66db6a8634aa..5707bcdc88f8 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.RelationList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in EntitiesRelationsClient. */ public final class EntitiesRelationsClientImpl implements EntitiesRelationsClient { - private final ClientLogger logger = new ClientLogger(EntitiesRelationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EntitiesRelationsService service; @@ -260,7 +257,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -285,7 +282,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String entityId) { @@ -314,7 +311,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -342,7 +339,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String entityId) { @@ -370,7 +367,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java index 697e4ffecf48..328b7929d8aa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.EntitiesRelations; import com.azure.resourcemanager.securityinsights.models.Relation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EntitiesRelationsImpl implements EntitiesRelations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntitiesRelationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EntitiesRelationsImpl.class); private final EntitiesRelationsClient innerClient; 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 4926ffd27037..421fa9a0e5e8 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; @@ -38,8 +37,6 @@ /** An instance of this class provides access to all the operations defined in EntityQueriesClient. */ public final class EntityQueriesClientImpl implements EntityQueriesClient { - private final ClientLogger logger = new ClientLogger(EntityQueriesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EntityQueriesService service; @@ -265,7 +262,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -283,7 +280,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -303,7 +300,7 @@ private PagedFlux listAsync(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -321,7 +318,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -339,7 +336,7 @@ public PagedIterable list(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java index 0ad79e60a736..66f6d4fb5322 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 @@ -15,10 +15,9 @@ import com.azure.resourcemanager.securityinsights.models.EntityQueries; import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; import com.azure.resourcemanager.securityinsights.models.EntityQuery; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EntityQueriesImpl implements EntityQueries { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueriesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EntityQueriesImpl.class); private final EntityQueriesClient 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 0756bf9bf9dc..d9b510226c9e 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 @@ -25,17 +25,14 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplateList; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ public final class EntityQueryTemplatesClientImpl implements EntityQueryTemplatesClient { - private final ClientLogger logger = new ClientLogger(EntityQueryTemplatesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EntityQueryTemplatesService service; @@ -69,7 +66,7 @@ private interface EntityQueryTemplatesService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, - @QueryParam("kind") Constant69 kind, + @QueryParam("kind") Constant73 kind, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -118,7 +115,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant69 kind) { + String resourceGroupName, String workspaceName, Constant73 kind) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -178,7 +175,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -230,11 +227,11 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant69 kind) { + String resourceGroupName, String workspaceName, Constant73 kind) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -248,11 +245,11 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Constant69 kind = null; + final Constant73 kind = null; return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -268,11 +265,11 @@ private PagedFlux listAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -286,11 +283,11 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - final Constant69 kind = null; + final Constant73 kind = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); } @@ -304,11 +301,11 @@ public PagedIterable list(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java index 46d6508ef715..d582d9095b20 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,13 +11,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EntityQueryTemplatesImpl implements EntityQueryTemplates { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryTemplatesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EntityQueryTemplatesImpl.class); private final EntityQueryTemplatesClient innerClient; @@ -36,7 +35,7 @@ public PagedIterable list(String resourceGroupName, String } public PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, kind, context); return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java index 896322cb2eb7..88d3b3718576 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 @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in EntityRelationsClient. */ public final class EntityRelationsClientImpl implements EntityRelationsClient { - private final ClientLogger logger = new ClientLogger(EntityRelationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final EntityRelationsService service; 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 29a66914ca6f..6521f11e7b25 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 @@ -12,10 +12,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.EntityRelations; import com.azure.resourcemanager.securityinsights.models.Relation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class EntityRelationsImpl implements EntityRelations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityRelationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(EntityRelationsImpl.class); private final EntityRelationsClient innerClient; 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 3928b3680b68..c40beb4496cf 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; import com.azure.resourcemanager.securityinsights.models.IncidentCommentList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in IncidentCommentsClient. */ public final class IncidentCommentsClientImpl implements IncidentCommentsClient { - private final ClientLogger logger = new ClientLogger(IncidentCommentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final IncidentCommentsService service; @@ -318,7 +315,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -343,7 +340,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -373,7 +370,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -401,7 +398,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { @@ -429,7 +426,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java index 8e593dde84e3..8092ca8833a5 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; import com.azure.resourcemanager.securityinsights.models.IncidentComment; import com.azure.resourcemanager.securityinsights.models.IncidentComments; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IncidentCommentsImpl implements IncidentComments { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentCommentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IncidentCommentsImpl.class); private final IncidentCommentsClient innerClient; @@ -93,7 +92,7 @@ public Response deleteWithResponse( public IncidentComment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -101,21 +100,21 @@ public IncidentComment getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); } String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); if (incidentCommentId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); @@ -128,7 +127,7 @@ public IncidentComment getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,21 +135,21 @@ public Response getByIdWithResponse(String id, Context context) } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); } String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); if (incidentCommentId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); @@ -161,7 +160,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,21 +168,21 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); } String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); if (incidentCommentId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); @@ -194,7 +193,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -202,21 +201,21 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); } String incidentCommentId = Utils.getValueFromIdByName(id, "comments"); if (incidentCommentId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'comments'.", id))); 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 379c25dfa685..a776a9411fe5 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.RelationList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in IncidentRelationsClient. */ public final class IncidentRelationsClientImpl implements IncidentRelationsClient { - private final ClientLogger logger = new ClientLogger(IncidentRelationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final IncidentRelationsService service; @@ -318,7 +315,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -343,7 +340,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String incidentId) { @@ -372,7 +369,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -400,7 +397,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { @@ -428,7 +425,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java index 2544c3c5fa44..ae14e641b851 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; import com.azure.resourcemanager.securityinsights.models.IncidentRelations; import com.azure.resourcemanager.securityinsights.models.Relation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IncidentRelationsImpl implements IncidentRelations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentRelationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IncidentRelationsImpl.class); private final IncidentRelationsClient innerClient; 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 1f7d1a8f8498..9af2a8d1fc0f 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 @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentAlertListInner; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; @@ -37,13 +36,12 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import com.azure.resourcemanager.securityinsights.models.IncidentList; +import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; import com.azure.resourcemanager.securityinsights.models.TeamProperties; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ public final class IncidentsClientImpl implements IncidentsClient { - private final ClientLogger logger = new ClientLogger(IncidentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final IncidentsService service; @@ -68,6 +66,24 @@ public final class IncidentsClientImpl implements IncidentsClient { @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") private interface IncidentsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}" + + "/runPlaybook") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> runPlaybook( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("incidentIdentifier") String incidentIdentifier, + @BodyParam("application/json") ManualTriggerRequestBody requestBody, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -212,6 +228,224 @@ Mono> listNext( Context context); } + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runPlaybookWithResponseAsync( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentIdentifier == null) { + return Mono + .error(new IllegalArgumentException("Parameter incidentIdentifier is required and cannot be null.")); + } + if (requestBody != null) { + requestBody.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .runPlaybook( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentIdentifier, + requestBody, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runPlaybookWithResponseAsync( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentIdentifier == null) { + return Mono + .error(new IllegalArgumentException("Parameter incidentIdentifier is required and cannot be null.")); + } + if (requestBody != null) { + requestBody.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .runPlaybook( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentIdentifier, + requestBody, + accept, + context); + } + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runPlaybookAsync( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody) { + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String incidentIdentifier) { + final ManualTriggerRequestBody requestBody = null; + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { + final ManualTriggerRequestBody requestBody = null; + return runPlaybookAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody).block(); + } + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context) { + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context) + .block(); + } + /** * Gets all incidents. * @@ -364,7 +598,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -382,7 +616,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -410,7 +644,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -434,7 +668,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -460,7 +694,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java index d833acc50419..a49e1a802a76 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java @@ -20,12 +20,12 @@ import com.azure.resourcemanager.securityinsights.models.IncidentBookmarkList; import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResponse; import com.azure.resourcemanager.securityinsights.models.Incidents; +import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; import com.azure.resourcemanager.securityinsights.models.TeamInformation; import com.azure.resourcemanager.securityinsights.models.TeamProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IncidentsImpl implements Incidents { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IncidentsImpl.class); private final IncidentsClient innerClient; @@ -38,6 +38,21 @@ public IncidentsImpl( this.serviceManager = serviceManager; } + public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { + return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); + } + + public Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context) { + return this + .serviceClient() + .runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); @@ -198,7 +213,7 @@ public Response listEntitiesWithResponse( public Incident getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -206,14 +221,14 @@ public Incident getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); @@ -224,7 +239,7 @@ public Incident getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -232,14 +247,14 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); @@ -250,7 +265,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -258,14 +273,14 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); @@ -276,7 +291,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -284,14 +299,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + 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 + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); 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 c590d22a418b..c1438cb1d3b4 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 @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in IpGeodatasClient. */ public final class IpGeodatasClientImpl implements IpGeodatasClient { - private final ClientLogger logger = new ClientLogger(IpGeodatasClientImpl.class); - /** The proxy service used to perform REST calls. */ private final IpGeodatasService service; 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 855e0c8b8b1f..7afbd00545ef 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 @@ -12,10 +12,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; import com.azure.resourcemanager.securityinsights.models.EnrichmentIpGeodata; import com.azure.resourcemanager.securityinsights.models.IpGeodatas; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IpGeodatasImpl implements IpGeodatas { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpGeodatasImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IpGeodatasImpl.class); private final IpGeodatasClient innerClient; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java index d115fb44a497..453e35ddc1e1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java @@ -97,6 +97,54 @@ public LocalDate lastPublishDate() { return this.innerModel().lastPublishDate(); } + public String customVersion() { + return this.innerModel().customVersion(); + } + + public String contentSchemaVersion() { + return this.innerModel().contentSchemaVersion(); + } + + public String icon() { + return this.innerModel().icon(); + } + + public List threatAnalysisTactics() { + List inner = this.innerModel().threatAnalysisTactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List threatAnalysisTechniques() { + List inner = this.innerModel().threatAnalysisTechniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List previewImages() { + List inner = this.innerModel().previewImages(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List previewImagesDark() { + List inner = this.innerModel().previewImagesDark(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public MetadataModelInner innerModel() { return this.innerObject; } @@ -330,6 +378,76 @@ public MetadataModelImpl withLastPublishDate(LocalDate lastPublishDate) { } } + public MetadataModelImpl withCustomVersion(String customVersion) { + if (isInCreateMode()) { + this.innerModel().withCustomVersion(customVersion); + return this; + } else { + this.updateMetadataPatch.withCustomVersion(customVersion); + return this; + } + } + + public MetadataModelImpl withContentSchemaVersion(String contentSchemaVersion) { + if (isInCreateMode()) { + this.innerModel().withContentSchemaVersion(contentSchemaVersion); + return this; + } else { + this.updateMetadataPatch.withContentSchemaVersion(contentSchemaVersion); + return this; + } + } + + public MetadataModelImpl withIcon(String icon) { + if (isInCreateMode()) { + this.innerModel().withIcon(icon); + return this; + } else { + this.updateMetadataPatch.withIcon(icon); + return this; + } + } + + public MetadataModelImpl withThreatAnalysisTactics(List threatAnalysisTactics) { + if (isInCreateMode()) { + this.innerModel().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } else { + this.updateMetadataPatch.withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + } + + public MetadataModelImpl withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (isInCreateMode()) { + this.innerModel().withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } else { + this.updateMetadataPatch.withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } + } + + public MetadataModelImpl withPreviewImages(List previewImages) { + if (isInCreateMode()) { + this.innerModel().withPreviewImages(previewImages); + return this; + } else { + this.updateMetadataPatch.withPreviewImages(previewImages); + return this; + } + } + + public MetadataModelImpl withPreviewImagesDark(List previewImagesDark) { + if (isInCreateMode()) { + this.innerModel().withPreviewImagesDark(previewImagesDark); + return this; + } else { + this.updateMetadataPatch.withPreviewImagesDark(previewImagesDark); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java index 1d3d858e697c..f0e93cea2ebd 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 @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; import com.azure.resourcemanager.securityinsights.models.MetadataList; @@ -38,8 +37,6 @@ /** An instance of this class provides access to all the operations defined in MetadatasClient. */ public final class MetadatasClientImpl implements MetadatasClient { - private final ClientLogger logger = new ClientLogger(MetadatasClientImpl.class); - /** The proxy service used to perform REST calls. */ private final MetadatasService service; @@ -309,7 +306,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -327,7 +324,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -354,7 +351,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -378,7 +375,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -403,7 +400,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java index c9f6d4c53182..fb795703dad2 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; import com.azure.resourcemanager.securityinsights.models.MetadataModel; import com.azure.resourcemanager.securityinsights.models.Metadatas; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class MetadatasImpl implements Metadatas { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadatasImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MetadatasImpl.class); private final MetadatasClient innerClient; @@ -83,7 +82,7 @@ public Response deleteWithResponse( public MetadataModel getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -91,14 +90,14 @@ public MetadataModel getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String metadataName = Utils.getValueFromIdByName(id, "metadata"); if (metadataName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); @@ -109,7 +108,7 @@ public MetadataModel getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,14 +116,14 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String metadataName = Utils.getValueFromIdByName(id, "metadata"); if (metadataName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); @@ -135,7 +134,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,14 +142,14 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String metadataName = Utils.getValueFromIdByName(id, "metadata"); if (metadataName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); @@ -161,7 +160,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,14 +168,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String metadataName = Utils.getValueFromIdByName(id, "metadata"); if (metadataName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); 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 b7ec797af5a3..875354e6a416 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 @@ -26,7 +26,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; import com.azure.resourcemanager.securityinsights.models.OfficeConsentList; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in OfficeConsentsClient. */ public final class OfficeConsentsClientImpl implements OfficeConsentsClient { - private final ClientLogger logger = new ClientLogger(OfficeConsentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OfficeConsentsService service; @@ -238,7 +235,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -255,7 +252,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -272,7 +269,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -288,7 +285,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java index a01aaf2cbd86..3f6213360a58 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; import com.azure.resourcemanager.securityinsights.models.OfficeConsent; import com.azure.resourcemanager.securityinsights.models.OfficeConsents; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OfficeConsentsImpl implements OfficeConsents { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeConsentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OfficeConsentsImpl.class); private final OfficeConsentsClient 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 4996538af570..ccd851ba7d23 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.OperationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; import com.azure.resourcemanager.securityinsights.models.OperationsList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -150,7 +147,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -164,7 +161,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -177,7 +174,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -191,7 +189,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java index fda7a5628f95..6e11ec19acdb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; import com.azure.resourcemanager.securityinsights.models.Operation; import com.azure.resourcemanager.securityinsights.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; 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 c1f953292ada..dbe9100b1fe8 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 @@ -24,7 +24,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in ProductSettingsClient. */ public final class ProductSettingsClientImpl implements ProductSettingsClient { - private final ClientLogger logger = new ClientLogger(ProductSettingsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ProductSettingsService service; 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 b511cb7a90f8..5596bd0f4aa9 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 @@ -14,10 +14,9 @@ import com.azure.resourcemanager.securityinsights.models.ProductSettings; import com.azure.resourcemanager.securityinsights.models.SettingList; import com.azure.resourcemanager.securityinsights.models.Settings; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ProductSettingsImpl implements ProductSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProductSettingsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ProductSettingsImpl.class); private final ProductSettingsClient innerClient; 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 3c668ed36548..261e4748510d 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 @@ -67,8 +67,6 @@ /** Initializes a new instance of the SecurityInsightsImpl type. */ @ServiceClient(builder = SecurityInsightsBuilder.class) public final class SecurityInsightsImpl implements SecurityInsights { - private final ClientLogger logger = new ClientLogger(SecurityInsightsImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -189,6 +187,18 @@ public AutomationRulesClient getAutomationRules() { return this.automationRules; } + /** The IncidentsClient object to access its operations. */ + private final IncidentsClient incidents; + + /** + * Gets the IncidentsClient object to access its operations. + * + * @return the IncidentsClient object. + */ + public IncidentsClient getIncidents() { + return this.incidents; + } + /** The BookmarksClient object to access its operations. */ private final BookmarksClient bookmarks; @@ -249,18 +259,6 @@ public DomainWhoisClient getDomainWhois() { return this.domainWhois; } - /** The EntityQueriesClient object to access its operations. */ - private final EntityQueriesClient entityQueries; - - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - public EntityQueriesClient getEntityQueries() { - return this.entityQueries; - } - /** The EntitiesClient object to access its operations. */ private final EntitiesClient entities; @@ -309,16 +307,28 @@ public EntityRelationsClient getEntityRelations() { return this.entityRelations; } - /** The IncidentsClient object to access its operations. */ - private final IncidentsClient incidents; + /** The EntityQueriesClient object to access its operations. */ + private final EntityQueriesClient entityQueries; /** - * Gets the IncidentsClient object to access its operations. + * Gets the EntityQueriesClient object to access its operations. * - * @return the IncidentsClient object. + * @return the EntityQueriesClient object. */ - public IncidentsClient getIncidents() { - return this.incidents; + public EntityQueriesClient getEntityQueries() { + return this.entityQueries; + } + + /** The EntityQueryTemplatesClient object to access its operations. */ + private final EntityQueryTemplatesClient entityQueryTemplates; + + /** + * Gets the EntityQueryTemplatesClient object to access its operations. + * + * @return the EntityQueryTemplatesClient object. + */ + public EntityQueryTemplatesClient getEntityQueryTemplates() { + return this.entityQueryTemplates; } /** The IncidentCommentsClient object to access its operations. */ @@ -357,6 +367,18 @@ public MetadatasClient getMetadatas() { return this.metadatas; } + /** The OfficeConsentsClient object to access its operations. */ + private final OfficeConsentsClient officeConsents; + + /** + * Gets the OfficeConsentsClient object to access its operations. + * + * @return the OfficeConsentsClient object. + */ + public OfficeConsentsClient getOfficeConsents() { + return this.officeConsents; + } + /** The SentinelOnboardingStatesClient object to access its operations. */ private final SentinelOnboardingStatesClient sentinelOnboardingStates; @@ -405,6 +427,42 @@ public SourceControlsOperationsClient getSourceControlsOperations() { return this.sourceControlsOperations; } + /** The ThreatIntelligenceIndicatorsClient object to access its operations. */ + private final ThreatIntelligenceIndicatorsClient threatIntelligenceIndicators; + + /** + * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. + * + * @return the ThreatIntelligenceIndicatorsClient object. + */ + public ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators() { + return this.threatIntelligenceIndicators; + } + + /** The ThreatIntelligenceIndicatorsOperationsClient object to access its operations. */ + private final ThreatIntelligenceIndicatorsOperationsClient threatIntelligenceIndicatorsOperations; + + /** + * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. + * + * @return the ThreatIntelligenceIndicatorsOperationsClient object. + */ + public ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations() { + return this.threatIntelligenceIndicatorsOperations; + } + + /** The ThreatIntelligenceIndicatorMetricsClient object to access its operations. */ + private final ThreatIntelligenceIndicatorMetricsClient threatIntelligenceIndicatorMetrics; + + /** + * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. + * + * @return the ThreatIntelligenceIndicatorMetricsClient object. + */ + public ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics() { + return this.threatIntelligenceIndicatorMetrics; + } + /** The WatchlistsClient object to access its operations. */ private final WatchlistsClient watchlists; @@ -453,42 +511,6 @@ public DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckReq return this.dataConnectorsCheckRequirementsOperations; } - /** The ThreatIntelligenceIndicatorsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorsClient threatIntelligenceIndicators; - - /** - * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsClient object. - */ - public ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators() { - return this.threatIntelligenceIndicators; - } - - /** The ThreatIntelligenceIndicatorsOperationsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorsOperationsClient threatIntelligenceIndicatorsOperations; - - /** - * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsOperationsClient object. - */ - public ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations() { - return this.threatIntelligenceIndicatorsOperations; - } - - /** The ThreatIntelligenceIndicatorMetricsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorMetricsClient threatIntelligenceIndicatorMetrics; - - /** - * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorMetricsClient object. - */ - public ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics() { - return this.threatIntelligenceIndicatorMetrics; - } - /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -501,30 +523,6 @@ public OperationsClient getOperations() { return this.operations; } - /** The OfficeConsentsClient object to access its operations. */ - private final OfficeConsentsClient officeConsents; - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - public OfficeConsentsClient getOfficeConsents() { - return this.officeConsents; - } - - /** The EntityQueryTemplatesClient object to access its operations. */ - private final EntityQueryTemplatesClient entityQueryTemplates; - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. - * - * @return the EntityQueryTemplatesClient object. - */ - public EntityQueryTemplatesClient getEntityQueryTemplates() { - return this.entityQueryTemplates; - } - /** * Initializes an instance of SecurityInsights client. * @@ -547,39 +545,39 @@ public EntityQueryTemplatesClient getEntityQueryTemplates() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-01-preview"; + this.apiVersion = "2022-01-01-preview"; this.alertRules = new AlertRulesClientImpl(this); this.actions = new ActionsClientImpl(this); this.alertRuleTemplates = new AlertRuleTemplatesClientImpl(this); this.automationRules = new AutomationRulesClientImpl(this); + this.incidents = new IncidentsClientImpl(this); this.bookmarks = new BookmarksClientImpl(this); this.bookmarkRelations = new BookmarkRelationsClientImpl(this); this.bookmarkOperations = new BookmarkOperationsClientImpl(this); this.ipGeodatas = new IpGeodatasClientImpl(this); this.domainWhois = new DomainWhoisClientImpl(this); - this.entityQueries = new EntityQueriesClientImpl(this); this.entities = new EntitiesClientImpl(this); this.entitiesGetTimelines = new EntitiesGetTimelinesClientImpl(this); this.entitiesRelations = new EntitiesRelationsClientImpl(this); this.entityRelations = new EntityRelationsClientImpl(this); - this.incidents = new IncidentsClientImpl(this); + this.entityQueries = new EntityQueriesClientImpl(this); + this.entityQueryTemplates = new EntityQueryTemplatesClientImpl(this); this.incidentComments = new IncidentCommentsClientImpl(this); this.incidentRelations = new IncidentRelationsClientImpl(this); this.metadatas = new MetadatasClientImpl(this); + this.officeConsents = new OfficeConsentsClientImpl(this); this.sentinelOnboardingStates = new SentinelOnboardingStatesClientImpl(this); this.productSettings = new ProductSettingsClientImpl(this); this.sourceControls = new SourceControlsClientImpl(this); this.sourceControlsOperations = new SourceControlsOperationsClientImpl(this); + this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsClientImpl(this); + this.threatIntelligenceIndicatorsOperations = new ThreatIntelligenceIndicatorsOperationsClientImpl(this); + this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsClientImpl(this); this.watchlists = new WatchlistsClientImpl(this); this.watchlistItems = new WatchlistItemsClientImpl(this); this.dataConnectors = new DataConnectorsClientImpl(this); this.dataConnectorsCheckRequirementsOperations = new DataConnectorsCheckRequirementsOperationsClientImpl(this); - this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsClientImpl(this); - this.threatIntelligenceIndicatorsOperations = new ThreatIntelligenceIndicatorsOperationsClientImpl(this); - this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsClientImpl(this); this.operations = new OperationsClientImpl(this); - this.officeConsents = new OfficeConsentsClientImpl(this); - this.entityQueryTemplates = new EntityQueryTemplatesClientImpl(this); } /** @@ -665,7 +663,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -724,4 +722,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityInsightsImpl.class); } 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 6ec6f38ee3fd..9c696d1a6b5a 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 @@ -24,7 +24,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.SentinelOnboardingStatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStateInner; import com.azure.resourcemanager.securityinsights.fluent.models.SentinelOnboardingStatesListInner; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ public final class SentinelOnboardingStatesClientImpl implements SentinelOnboardingStatesClient { - private final ClientLogger logger = new ClientLogger(SentinelOnboardingStatesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SentinelOnboardingStatesService service; 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 c05f55baa4ad..805ce3714bf1 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 @@ -14,10 +14,9 @@ import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingState; import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates; import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStatesList; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SentinelOnboardingStatesImpl implements SentinelOnboardingStates { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SentinelOnboardingStatesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SentinelOnboardingStatesImpl.class); private final SentinelOnboardingStatesClient innerClient; @@ -96,7 +95,7 @@ public Response listWithResponse( public SentinelOnboardingState getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -104,14 +103,14 @@ public SentinelOnboardingState getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); if (sentinelOnboardingStateName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -126,7 +125,7 @@ public SentinelOnboardingState getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,14 +133,14 @@ public Response getByIdWithResponse(String id, Context } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); if (sentinelOnboardingStateName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -154,7 +153,7 @@ public Response getByIdWithResponse(String id, Context public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,14 +161,14 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); if (sentinelOnboardingStateName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -182,7 +181,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -190,14 +189,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sentinelOnboardingStateName = Utils.getValueFromIdByName(id, "onboardingStates"); if (sentinelOnboardingStateName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java index 34f3f44ce222..8923bdc0d8b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java @@ -8,9 +8,12 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; import com.azure.resourcemanager.securityinsights.models.ContentType; +import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.Repository; +import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; import com.azure.resourcemanager.securityinsights.models.SourceControl; +import com.azure.resourcemanager.securityinsights.models.Version; import java.util.Collections; import java.util.List; @@ -50,6 +53,10 @@ public String idPropertiesId() { return this.innerModel().idPropertiesId(); } + public Version version() { + return this.innerModel().version(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -75,6 +82,14 @@ public Repository repository() { return this.innerModel().repository(); } + public RepositoryResourceInfo repositoryResourceInfo() { + return this.innerModel().repositoryResourceInfo(); + } + + public DeploymentInfo lastDeploymentInfo() { + return this.innerModel().lastDeploymentInfo(); + } + public SourceControlInner innerModel() { return this.innerObject; } @@ -151,6 +166,11 @@ public SourceControlImpl withIdPropertiesId(String idPropertiesId) { return this; } + public SourceControlImpl withVersion(Version version) { + this.innerModel().withVersion(version); + return this; + } + public SourceControlImpl withDisplayName(String displayName) { this.innerModel().withDisplayName(displayName); return this; @@ -175,4 +195,14 @@ public SourceControlImpl withRepository(Repository repository) { this.innerModel().withRepository(repository); return this; } + + public SourceControlImpl withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { + this.innerModel().withRepositoryResourceInfo(repositoryResourceInfo); + return this; + } + + public SourceControlImpl withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { + this.innerModel().withLastDeploymentInfo(lastDeploymentInfo); + return this; + } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java index 139dbcdcc670..f2e7b233f15a 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 @@ -27,7 +27,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; import com.azure.resourcemanager.securityinsights.models.RepoList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in SourceControlsClient. */ public final class SourceControlsClientImpl implements SourceControlsClient { - private final ClientLogger logger = new ClientLogger(SourceControlsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SourceControlsService service; @@ -222,7 +219,7 @@ private Mono> listRepositoriesSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listRepositoriesAsync( @@ -242,7 +239,7 @@ private PagedFlux listRepositoriesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listRepositoriesAsync( @@ -261,7 +258,7 @@ private PagedFlux listRepositoriesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRepositories( @@ -279,7 +276,7 @@ public PagedIterable listRepositories( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRepositories( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java index 823580c2ee83..bb8376e2af85 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.securityinsights.models.Repo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.SourceControls; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SourceControlsImpl implements SourceControls { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SourceControlsImpl.class); private final SourceControlsClient innerClient; 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 964f227ab703..eb57c5d05e1a 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; import com.azure.resourcemanager.securityinsights.models.SourceControlList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in SourceControlsOperationsClient. */ public final class SourceControlsOperationsClientImpl implements SourceControlsOperationsClient { - private final ClientLogger logger = new ClientLogger(SourceControlsOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SourceControlsOperationsService service; @@ -260,7 +257,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -277,7 +274,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -294,7 +291,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -310,7 +307,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java index bcf11d2c1e6c..467e637cf289 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; import com.azure.resourcemanager.securityinsights.models.SourceControl; import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SourceControlsOperationsImpl implements SourceControlsOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlsOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SourceControlsOperationsImpl.class); private final SourceControlsOperationsClient innerClient; @@ -75,7 +74,7 @@ public Response deleteWithResponse( public SourceControl getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -83,14 +82,14 @@ public SourceControl getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,7 +101,7 @@ public SourceControl getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -110,14 +109,14 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -129,7 +128,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -137,14 +136,14 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -156,7 +155,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,14 +163,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 9fec3d0b9a2e..0b01d1a6347c 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 @@ -21,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; import reactor.core.publisher.Mono; @@ -30,8 +29,6 @@ * An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorMetricsClient. */ public final class ThreatIntelligenceIndicatorMetricsClientImpl implements ThreatIntelligenceIndicatorMetricsClient { - private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorMetricsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ThreatIntelligenceIndicatorMetricsService service; 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 4627c6d01693..a89b3041bc58 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 @@ -12,10 +12,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceMetricsListInner; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceMetricsList; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ThreatIntelligenceIndicatorMetricsImpl implements ThreatIntelligenceIndicatorMetrics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorMetricsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceIndicatorMetricsImpl.class); private final ThreatIntelligenceIndicatorMetricsClient 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 b43c7bcb3c6a..7349093bee70 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 @@ -29,19 +29,16 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; +import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformationList; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ public final class ThreatIntelligenceIndicatorsClientImpl implements ThreatIntelligenceIndicatorsClient { - private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ThreatIntelligenceIndicatorsService service; @@ -81,7 +78,7 @@ Mono> createIndicator( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + @BodyParam("application/json") ThreatIntelligenceIndicatorModel threatIntelligenceProperties, @HeaderParam("Accept") String accept, Context context); @@ -116,7 +113,7 @@ Mono> create( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, - @BodyParam("application/json") ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + @BodyParam("application/json") ThreatIntelligenceIndicatorModel threatIntelligenceProperties, @HeaderParam("Accept") String accept, Context context); @@ -186,7 +183,7 @@ Mono> replaceTags( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, - @BodyParam("application/json") ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags, + @BodyParam("application/json") ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, @HeaderParam("Accept") String accept, Context context); @@ -215,9 +212,7 @@ Mono> queryIndicatorsNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createIndicatorWithResponseAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -279,7 +274,7 @@ private Mono> createIndicatorWithRe private Mono> createIndicatorWithResponseAsync( String resourceGroupName, String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -335,9 +330,7 @@ private Mono> createIndicatorWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createIndicatorAsync( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties) .flatMap( (Response res) -> { @@ -362,9 +355,7 @@ private Mono createIndicatorAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { return createIndicatorAsync(resourceGroupName, workspaceName, threatIntelligenceProperties).block(); } @@ -384,7 +375,7 @@ public ThreatIntelligenceInformationInner createIndicator( public Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context) { return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties, context) .block(); @@ -573,7 +564,7 @@ private Mono> createWithResponseAsy String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -641,7 +632,7 @@ private Mono> createWithResponseAsy String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -705,7 +696,7 @@ private Mono createAsync( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties) .flatMap( (Response res) -> { @@ -734,7 +725,7 @@ public ThreatIntelligenceInformationInner create( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { return createAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties).block(); } @@ -756,7 +747,7 @@ public Response createWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context) { return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context) .block(); @@ -1063,7 +1054,7 @@ private Mono> queryIndicatorsS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux queryIndicatorsAsync( @@ -1085,7 +1076,7 @@ private PagedFlux queryIndicatorsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux queryIndicatorsAsync( @@ -1109,7 +1100,7 @@ private PagedFlux queryIndicatorsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable queryIndicators( @@ -1130,7 +1121,7 @@ public PagedIterable queryIndicators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable queryIndicators( @@ -1358,7 +1349,7 @@ private Mono> replaceTagsWithRespon String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags) { + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1426,7 +1417,7 @@ private Mono> replaceTagsWithRespon String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1490,7 +1481,7 @@ private Mono replaceTagsAsync( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags) { + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { return replaceTagsWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags) .flatMap( (Response res) -> { @@ -1519,7 +1510,7 @@ public ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags) { + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { return replaceTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags).block(); } @@ -1541,7 +1532,7 @@ public Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, Context context) { return replaceTagsWithResponseAsync( resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context) 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 5577d3c1e3d3..ad629fc04fc9 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 @@ -13,13 +13,12 @@ import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; +import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ThreatIntelligenceIndicatorsImpl implements ThreatIntelligenceIndicators { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceIndicatorsImpl.class); private final ThreatIntelligenceIndicatorsClient innerClient; @@ -33,9 +32,7 @@ public ThreatIntelligenceIndicatorsImpl( } public ThreatIntelligenceInformation createIndicator( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { ThreatIntelligenceInformationInner inner = this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); if (inner != null) { @@ -48,7 +45,7 @@ public ThreatIntelligenceInformation createIndicator( public Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context) { Response inner = this @@ -93,7 +90,7 @@ public ThreatIntelligenceInformation create( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties) { + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { ThreatIntelligenceInformationInner inner = this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); if (inner != null) { @@ -107,7 +104,7 @@ public Response createWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context) { Response inner = this @@ -177,7 +174,7 @@ public ThreatIntelligenceInformation replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags) { + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { ThreatIntelligenceInformationInner inner = this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); if (inner != null) { @@ -191,7 +188,7 @@ public Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, Context context) { Response inner = this 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 25a63690b003..cf4dada43815 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformationList; @@ -37,8 +36,6 @@ */ public final class ThreatIntelligenceIndicatorsOperationsClientImpl implements ThreatIntelligenceIndicatorsOperationsClient { - private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorsOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ThreatIntelligenceIndicatorsOperationsService service; @@ -251,7 +248,7 @@ private Mono> listSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -269,7 +266,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -297,7 +294,7 @@ private PagedFlux listAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -321,7 +318,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -347,7 +344,7 @@ public PagedIterable list(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java index fd55c414be8f..df68b9a281d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceInformation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ThreatIntelligenceIndicatorsOperationsImpl implements ThreatIntelligenceIndicatorsOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorsOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceIndicatorsOperationsImpl.class); private final ThreatIntelligenceIndicatorsOperationsClient innerClient; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java index 5b1862258674..077a857d33e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java @@ -7,7 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.azure.resourcemanager.securityinsights.models.Watchlist; import java.time.Duration; @@ -52,10 +52,14 @@ public String provider() { return this.innerModel().provider(); } - public Source source() { + public String source() { return this.innerModel().source(); } + public SourceType sourceType() { + return this.innerModel().sourceType(); + } + public OffsetDateTime created() { return this.innerModel().created(); } @@ -125,10 +129,6 @@ public String uploadStatus() { return this.innerModel().uploadStatus(); } - public Integer watchlistItemsCount() { - return this.innerModel().watchlistItemsCount(); - } - public WatchlistInner innerModel() { return this.innerObject; } @@ -252,11 +252,16 @@ public WatchlistImpl withProvider(String provider) { return this; } - public WatchlistImpl withSource(Source source) { + public WatchlistImpl withSource(String source) { this.innerModel().withSource(source); return this; } + public WatchlistImpl withSourceType(SourceType sourceType) { + this.innerModel().withSourceType(sourceType); + return this; + } + public WatchlistImpl withCreated(OffsetDateTime created) { this.innerModel().withCreated(created); return this; @@ -336,9 +341,4 @@ public WatchlistImpl withUploadStatus(String uploadStatus) { this.innerModel().withUploadStatus(uploadStatus); return this; } - - public WatchlistImpl withWatchlistItemsCount(Integer watchlistItemsCount) { - this.innerModel().withWatchlistItemsCount(watchlistItemsCount); - return this; - } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java index 1aa777a13af1..41f82e24b036 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 @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.WatchlistItemsClient; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; import com.azure.resourcemanager.securityinsights.models.WatchlistItemList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in WatchlistItemsClient. */ public final class WatchlistItemsClientImpl implements WatchlistItemsClient { - private final ClientLogger logger = new ClientLogger(WatchlistItemsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WatchlistItemsService service; @@ -75,6 +72,7 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("$skipToken") String skipToken, @PathParam("watchlistAlias") String watchlistAlias, @HeaderParam("Accept") String accept, Context context); @@ -151,6 +149,9 @@ Mono> listNext( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -158,7 +159,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String watchlistAlias) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -192,6 +193,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, watchlistAlias, accept, context)) @@ -213,6 +215,9 @@ private Mono> listSinglePageAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -221,7 +226,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -253,6 +258,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, watchlistAlias, accept, context) @@ -267,6 +273,28 @@ private Mono> listSinglePageAsync( null)); } + /** + * Gets all watchlist Items. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all watchlist Items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * Gets all watchlist Items. * @@ -276,13 +304,14 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( String resourceGroupName, String workspaceName, String watchlistAlias) { + final String skipToken = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias), + () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -292,17 +321,20 @@ private PagedFlux listAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, context), + () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -315,12 +347,13 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( String resourceGroupName, String workspaceName, String watchlistAlias) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias)); + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken)); } /** @@ -329,16 +362,19 @@ public PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, context)); + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, context)); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java index 92310d61d5de..fc1cb65f0917 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; import com.azure.resourcemanager.securityinsights.models.WatchlistItem; import com.azure.resourcemanager.securityinsights.models.WatchlistItems; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WatchlistItemsImpl implements WatchlistItems { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistItemsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WatchlistItemsImpl.class); private final WatchlistItemsClient innerClient; @@ -36,9 +35,9 @@ public PagedIterable list(String resourceGroupName, String worksp } public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, watchlistAlias, context); + this.serviceClient().list(resourceGroupName, workspaceName, watchlistAlias, skipToken, context); return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); } @@ -92,7 +91,7 @@ public Response deleteWithResponse( public WatchlistItem getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -100,21 +99,21 @@ public WatchlistItem getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); } String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); if (watchlistItemId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -128,7 +127,7 @@ public WatchlistItem getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,21 +135,21 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); } String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); if (watchlistItemId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,7 +161,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,21 +169,21 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); } String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); if (watchlistItemId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -196,7 +195,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -204,21 +203,21 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); } String watchlistItemId = Utils.getValueFromIdByName(id, "watchlistItems"); if (watchlistItemId == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 8b22d8352493..d7332c3ffdf1 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 @@ -28,16 +28,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; import com.azure.resourcemanager.securityinsights.models.WatchlistList; +import com.azure.resourcemanager.securityinsights.models.WatchlistsCreateOrUpdateResponse; +import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in WatchlistsClient. */ public final class WatchlistsClientImpl implements WatchlistsClient { - private final ClientLogger logger = new ClientLogger(WatchlistsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WatchlistsService service; @@ -74,6 +73,7 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @@ -99,7 +99,7 @@ Mono> get( + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -115,7 +115,7 @@ Mono> delete( + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -142,6 +142,9 @@ Mono> listNext( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -149,7 +152,8 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skipToken) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -180,6 +184,7 @@ private Mono> listSinglePageAsync(String resourceG this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, accept, context)) .>map( @@ -199,6 +204,9 @@ private Mono> listSinglePageAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -208,7 +216,7 @@ private Mono> listSinglePageAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + String resourceGroupName, String workspaceName, String skipToken, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -237,6 +245,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, accept, context) .map( @@ -255,15 +264,37 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all watchlists, without watchlist items. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skipToken = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -271,16 +302,20 @@ private PagedFlux listAsync(String resourceGroupName, String wor * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skipToken, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -292,11 +327,12 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skipToken)); } /** @@ -304,15 +340,19 @@ public PagedIterable list(String resourceGroupName, String works * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + public PagedIterable list( + String resourceGroupName, String workspaceName, String skipToken, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skipToken, context)); } /** @@ -488,10 +528,10 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( + private Mono deleteWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias) { if (this.client.getEndpoint() == null) { return Mono @@ -542,10 +582,10 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( + private Mono deleteWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -597,7 +637,7 @@ private Mono> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String watchlistAlias) { return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias) - .flatMap((Response res) -> Mono.empty()); + .flatMap((WatchlistsDeleteResponse res) -> Mono.empty()); } /** @@ -625,17 +665,20 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( + public WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -644,11 +687,10 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { if (this.client.getEndpoint() == null) { return Mono @@ -696,8 +738,11 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -707,11 +752,10 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, @@ -760,8 +804,11 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -777,7 +824,7 @@ private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist) .flatMap( - (Response res) -> { + (WatchlistsCreateOrUpdateResponse res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -787,8 +834,11 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -806,8 +856,11 @@ public WatchlistInner createOrUpdate( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -817,10 +870,10 @@ public WatchlistInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java index 02594b305e8d..139a0477f33f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java @@ -13,10 +13,10 @@ import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; import com.azure.resourcemanager.securityinsights.models.Watchlist; import com.azure.resourcemanager.securityinsights.models.Watchlists; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; public final class WatchlistsImpl implements Watchlists { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WatchlistsImpl.class); private final WatchlistsClient innerClient; @@ -34,8 +34,10 @@ public PagedIterable list(String resourceGroupName, String workspaceN return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); + public PagedIterable list( + String resourceGroupName, String workspaceName, String skipToken, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skipToken, context); return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } @@ -67,7 +69,7 @@ public void delete(String resourceGroupName, String workspaceName, String watchl this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); } - public Response deleteWithResponse( + public WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); } @@ -75,7 +77,7 @@ public Response deleteWithResponse( public Watchlist getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -83,14 +85,14 @@ public Watchlist getById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); @@ -101,7 +103,7 @@ public Watchlist getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,14 +111,14 @@ public Response getByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); @@ -127,7 +129,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -135,14 +137,14 @@ public void deleteById(String id) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); @@ -150,10 +152,10 @@ public void deleteById(String id) { this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -161,14 +163,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } String watchlistAlias = Utils.getValueFromIdByName(id, "watchlists"); if (watchlistAlias == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'watchlists'.", id))); 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 aa548471f32e..bf95fed22e28 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 @@ -5,9 +5,7 @@ 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.AadCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("AzureActiveDirectory") @Fluent public final class AadCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AadCheckRequirements.class); - /* * AAD (Azure Active Directory) requirements check properties. */ 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 7e57c4b281aa..2c2d4b0f24aa 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 @@ -5,10 +5,8 @@ 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.AadDataConnectorProperties; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("AzureActiveDirectory") @Fluent public final class AadDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AadDataConnector.class); - /* * 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 4ec8c3071e8a..45cdb56dc88a 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 @@ -5,9 +5,7 @@ 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.AatpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("AzureAdvancedThreatProtection") @Fluent public final class AatpCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AatpCheckRequirements.class); - /* * AATP (Azure Advanced Threat Protection) requirements check properties. */ 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 d8716b26271d..25261e2030c4 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 @@ -5,10 +5,8 @@ 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.AatpDataConnectorProperties; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("AzureAdvancedThreatProtection") @Fluent public final class AatpDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AatpDataConnector.class); - /* * 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 46baf97509c4..d662cdb888ec 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java @@ -5,10 +5,8 @@ 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.AccountEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Account") @Fluent public final class AccountEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountEntity.class); - /* * 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 536a8e46859f..385e767940bd 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Action property bag base. */ @Fluent public class ActionPropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionPropertiesBase.class); - /* * Logic App Resource Id, * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. @@ -50,10 +47,12 @@ public ActionPropertiesBase withLogicAppResourceId(String logicAppResourceId) { */ public void validate() { if (logicAppResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property logicAppResourceId in model ActionPropertiesBase")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ActionPropertiesBase.class); } 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 895da6b6de43..ccc8692cff41 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 @@ -5,16 +5,12 @@ 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.ActionRequestProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Action for alert rule. */ @Fluent public final class ActionRequest extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionRequest.class); - /* * 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 new file mode 100644 index 000000000000..773b24e3825c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ActionType. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value ModifyProperties for ActionType. */ + public static final ActionType MODIFY_PROPERTIES = fromString("ModifyProperties"); + + /** Static value RunPlaybook for ActionType. */ + public static final ActionType RUN_PLAYBOOK = fromString("RunPlaybook"); + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** @return known ActionType values. */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java index da00cf5da30b..97de0d03303b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java @@ -19,7 +19,7 @@ public interface Actions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ PagedIterable listByAlertRule(String resourceGroupName, String workspaceName, String ruleId); @@ -33,7 +33,7 @@ public interface Actions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ PagedIterable listByAlertRule( String resourceGroupName, String workspaceName, String ruleId, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java index 7edbb2c3f659..4f7ecdd353b9 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.ActionResponseInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the actions. */ @Fluent public final class ActionsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActionsList.class); - /* * URL to fetch the next set of actions. */ @@ -64,11 +61,13 @@ public ActionsList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model ActionsList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ActionsList.class); } 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 acc4093b435d..e010a8c88c2a 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 @@ -5,9 +5,7 @@ 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.ActivityEntityQueriesProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Activity") @Fluent public final class ActivityCustomEntityQuery extends CustomEntityQuery { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityCustomEntityQuery.class); - /* * 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 5e6d1ae330cd..610d4eff8d46 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 @@ -5,16 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Activity query definitions. */ @Fluent public final class ActivityEntityQueriesPropertiesQueryDefinitions { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ActivityEntityQueriesPropertiesQueryDefinitions.class); - /* * 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 33610aedf4a0..7aadce92dcd4 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 @@ -5,10 +5,8 @@ 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.ActivityEntityQueriesProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("Activity") @Fluent public final class ActivityEntityQuery extends EntityQueryInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityEntityQuery.class); - /* * 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 653d2b31784a..9066b404574c 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 @@ -5,10 +5,8 @@ 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.ActivityEntityQueryTemplateProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Activity") @Fluent public final class ActivityEntityQueryTemplate extends EntityQueryTemplateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityEntityQueryTemplate.class); - /* * 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 4b3f2e0c3736..9848b1bf5c82 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 @@ -5,16 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Activity query definitions. */ @Fluent public final class ActivityEntityQueryTemplatePropertiesQueryDefinitions { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ActivityEntityQueryTemplatePropertiesQueryDefinitions.class); - /* * 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 eaf3e78c2b27..1e6b52c71395 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("Activity") @Fluent public final class ActivityTimelineItem extends EntityTimelineItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityTimelineItem.class); - /* * The activity query id. */ @@ -210,43 +207,45 @@ public ActivityTimelineItem withTitle(String title) { public void validate() { super.validate(); if (queryId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property queryId in model ActivityTimelineItem")); } if (bucketStartTimeUtc() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property bucketStartTimeUtc in model ActivityTimelineItem")); } if (bucketEndTimeUtc() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property bucketEndTimeUtc in model ActivityTimelineItem")); } if (firstActivityTimeUtc() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property firstActivityTimeUtc in model ActivityTimelineItem")); } if (lastActivityTimeUtc() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property lastActivityTimeUtc in model ActivityTimelineItem")); } if (content() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property content in model ActivityTimelineItem")); } if (title() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property title in model ActivityTimelineItem")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ActivityTimelineItem.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java index 1265dc150277..6abe8f54b47d 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Settings for how to dynamically override alert static details. */ @Fluent public final class AlertDetailsOverride { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertDetailsOverride.class); - /* * the format containing columns name(s) to override the alert name */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java index 5d050149811a..a8705467713b 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** alert rule template data sources. */ @Fluent public final class AlertRuleTemplateDataSource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleTemplateDataSource.class); - /* * 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 fae4bc272fa7..9ec04325df71 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,8 +12,6 @@ /** Base alert rule template property bag. */ @Fluent public class AlertRuleTemplatePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleTemplatePropertiesBase.class); - /* * 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 new file mode 100644 index 000000000000..7ab1567de6d3 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Alert rule template with MITRE property bag. */ +@Fluent +public class AlertRuleTemplateWithMitreProperties extends AlertRuleTemplatePropertiesBase { + /* + * The tactics of the alert rule + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the AlertRuleTemplateWithMitreProperties object itself. + */ + public AlertRuleTemplateWithMitreProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the AlertRuleTemplateWithMitreProperties object itself. + */ + public AlertRuleTemplateWithMitreProperties withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { + super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withRequiredDataConnectors( + List requiredDataConnectors) { + super.withRequiredDataConnectors(requiredDataConnectors); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withStatus(TemplateStatus status) { + super.withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java index dd0bfea870dc..6c1e23964aae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java @@ -18,7 +18,7 @@ public interface AlertRuleTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface AlertRuleTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java index fbcb460383ab..8292bf9e3852 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the alert rule templates. */ @Fluent public final class AlertRuleTemplatesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleTemplatesList.class); - /* * URL to fetch the next set of alert rule templates. */ @@ -64,11 +61,13 @@ public AlertRuleTemplatesList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model AlertRuleTemplatesList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(AlertRuleTemplatesList.class); } 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 5759a8329e30..4ce770f0de66 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java @@ -19,7 +19,7 @@ public interface AlertRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,7 +32,7 @@ public interface AlertRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java index 733dc17b308b..c758bd659a27 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the alert rules. */ @Fluent public final class AlertRulesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRulesList.class); - /* * URL to fetch the next set of alert rules. */ @@ -64,11 +61,13 @@ public AlertRulesList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model AlertRulesList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(AlertRulesList.class); } 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 b30fedace230..2b9ea1a54378 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Alerts data type for data connectors. */ @Fluent public class AlertsDataTypeOfDataConnector { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertsDataTypeOfDataConnector.class); - /* * Alerts data type connection. */ @@ -47,7 +44,7 @@ public AlertsDataTypeOfDataConnector withAlerts(DataConnectorDataTypeCommon aler */ public void validate() { if (alerts() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property alerts in model AlertsDataTypeOfDataConnector")); @@ -55,4 +52,6 @@ public void validate() { alerts().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AlertsDataTypeOfDataConnector.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java index 95476d5b4491..a06d6aea9018 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 @@ -5,10 +5,8 @@ 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.AnomaliesSettingsProperties; import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("Anomalies") @Fluent public final class Anomalies extends SettingsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Anomalies.class); - /* * Anomalies properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java index 47cdd0e006a2..836a4a6fdd8f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java @@ -5,9 +5,7 @@ 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.AscCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("AzureSecurityCenter") @Fluent public final class AscCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscCheckRequirements.class); - /* * ASC (Azure Security Center) requirements check properties. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java index aa5578a8a0b9..683d6beac5b1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java @@ -5,10 +5,8 @@ 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.AscDataConnectorProperties; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("AzureSecurityCenter") @Fluent public final class AscDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscDataConnector.class); - /* * ASC (Azure Security Center) data connector properties. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java index 3c44b68e78f6..8b1d10dd7be9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java @@ -10,6 +10,12 @@ /** Defines values for AttackTactic. */ public final class AttackTactic extends ExpandableStringEnum { + /** Static value Reconnaissance for AttackTactic. */ + public static final AttackTactic RECONNAISSANCE = fromString("Reconnaissance"); + + /** Static value ResourceDevelopment for AttackTactic. */ + public static final AttackTactic RESOURCE_DEVELOPMENT = fromString("ResourceDevelopment"); + /** Static value InitialAccess for AttackTactic. */ public static final AttackTactic INITIAL_ACCESS = fromString("InitialAccess"); @@ -49,6 +55,12 @@ public final class AttackTactic extends ExpandableStringEnum { /** Static value PreAttack for AttackTactic. */ public static final AttackTactic PRE_ATTACK = fromString("PreAttack"); + /** Static value ImpairProcessControl for AttackTactic. */ + public static final AttackTactic IMPAIR_PROCESS_CONTROL = fromString("ImpairProcessControl"); + + /** Static value InhibitResponseFunction for AttackTactic. */ + public static final AttackTactic INHIBIT_RESPONSE_FUNCTION = fromString("InhibitResponseFunction"); + /** * Creates or finds a AttackTactic from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java index b4c4a35c7712..a796b4e57a04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java @@ -62,7 +62,7 @@ public interface AutomationRule { int order(); /** - * Gets the triggeringLogic property: The triggering logic of the automation rule. + * Gets the triggeringLogic property: Describes automation rule triggering logic. * * @return the triggeringLogic value. */ @@ -75,13 +75,6 @@ public interface AutomationRule { */ List actions(); - /** - * Gets the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - /** * Gets the lastModifiedTimeUtc property: The last time the automation rule was updated. * @@ -90,19 +83,26 @@ public interface AutomationRule { OffsetDateTime lastModifiedTimeUtc(); /** - * Gets the createdBy property: Describes the client that created the automation rule. + * Gets the createdTimeUtc property: The time the automation rule was created. * - * @return the createdBy value. + * @return the createdTimeUtc value. */ - ClientInfo createdBy(); + OffsetDateTime createdTimeUtc(); /** - * Gets the lastModifiedBy property: Describes the client that last updated the automation rule. + * Gets the lastModifiedBy property: Information on the client (user or application) that made some action. * * @return the lastModifiedBy value. */ ClientInfo lastModifiedBy(); + /** + * Gets the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + ClientInfo createdBy(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner object. * @@ -112,7 +112,13 @@ public interface AutomationRule { /** The entirety of the AutomationRule definition. */ interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithDisplayName, + DefinitionStages.WithOrder, + DefinitionStages.WithTriggeringLogic, + DefinitionStages.WithActions, + DefinitionStages.WithCreate { } /** The AutomationRule definition stages. */ interface DefinitionStages { @@ -128,42 +134,7 @@ interface WithParentResource { * @param workspaceName The name of the workspace. * @return the next definition stage. */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the AutomationRule definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithEtag, - DefinitionStages.WithDisplayName, - DefinitionStages.WithOrder, - DefinitionStages.WithTriggeringLogic, - DefinitionStages.WithActions { - /** - * Executes the create request. - * - * @return the created resource. - */ - AutomationRule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AutomationRule create(Context context); - } - /** The stage of the AutomationRule definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); + WithDisplayName withExistingWorkspace(String resourceGroupName, String workspaceName); } /** The stage of the AutomationRule definition allowing to specify displayName. */ interface WithDisplayName { @@ -173,7 +144,7 @@ interface WithDisplayName { * @param displayName The display name of the automation rule. * @return the next definition stage. */ - WithCreate withDisplayName(String displayName); + WithOrder withDisplayName(String displayName); } /** The stage of the AutomationRule definition allowing to specify order. */ interface WithOrder { @@ -183,17 +154,17 @@ interface WithOrder { * @param order The order of execution of the automation rule. * @return the next definition stage. */ - WithCreate withOrder(int order); + WithTriggeringLogic withOrder(int order); } /** The stage of the AutomationRule definition allowing to specify triggeringLogic. */ interface WithTriggeringLogic { /** - * Specifies the triggeringLogic property: The triggering logic of the automation rule. + * Specifies the triggeringLogic property: Describes automation rule triggering logic. * - * @param triggeringLogic The triggering logic of the automation rule. + * @param triggeringLogic Describes automation rule triggering logic. * @return the next definition stage. */ - WithCreate withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); + WithActions withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); } /** The stage of the AutomationRule definition allowing to specify actions. */ interface WithActions { @@ -205,6 +176,36 @@ interface WithActions { */ WithCreate withActions(List actions); } + /** + * The stage of the AutomationRule definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithEtag { + /** + * Executes the create request. + * + * @return the created resource. + */ + AutomationRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AutomationRule create(Context context); + } + /** The stage of the AutomationRule definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: Etag of the azure resource. + * + * @param etag Etag of the azure resource. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } } /** * Begins update for the AutomationRule resource. @@ -270,9 +271,9 @@ interface WithOrder { /** The stage of the AutomationRule update allowing to specify triggeringLogic. */ interface WithTriggeringLogic { /** - * Specifies the triggeringLogic property: The triggering logic of the automation rule. + * Specifies the triggeringLogic property: Describes automation rule triggering logic. * - * @param triggeringLogic The triggering logic of the automation rule. + * @param triggeringLogic Describes automation rule triggering logic. * @return the next definition stage. */ Update withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java index aa2f770d00b3..3ff1bf1a59fe 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -20,21 +18,19 @@ defaultImpl = AutomationRuleAction.class) @JsonTypeName("AutomationRuleAction") @JsonSubTypes({ - @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class), - @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class) + @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class), + @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class) }) @Fluent public class AutomationRuleAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleAction.class); - /* - * The order of execution of the automation rule action + * The order property. */ @JsonProperty(value = "order", required = true) private int order; /** - * Get the order property: The order of execution of the automation rule action. + * Get the order property: The order property. * * @return the order value. */ @@ -43,7 +39,7 @@ public int order() { } /** - * Set the order property: The order of execution of the automation rule action. + * Set the order property: The order property. * * @param order the order value to set. * @return the AutomationRuleAction object itself. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java deleted file mode 100644 index 547b7c53a00b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AutomationRuleActionType. */ -public final class AutomationRuleActionType extends ExpandableStringEnum { - /** Static value ModifyProperties for AutomationRuleActionType. */ - public static final AutomationRuleActionType MODIFY_PROPERTIES = fromString("ModifyProperties"); - - /** Static value RunPlaybook for AutomationRuleActionType. */ - public static final AutomationRuleActionType RUN_PLAYBOOK = fromString("RunPlaybook"); - - /** - * Creates or finds a AutomationRuleActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRuleActionType. - */ - @JsonCreator - public static AutomationRuleActionType fromString(String name) { - return fromString(name, AutomationRuleActionType.class); - } - - /** @return known AutomationRuleActionType values. */ - public static Collection values() { - return values(AutomationRuleActionType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java index ed9426bdab97..4fdc0a0ee4d1 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,11 +16,9 @@ property = "conditionType", defaultImpl = AutomationRuleCondition.class) @JsonTypeName("AutomationRuleCondition") -@JsonSubTypes({@JsonSubTypes.Type(name = "Property", value = AutomationRulePropertyValuesCondition.class)}) +@JsonSubTypes({@JsonSubTypes.Type(name = "Property", value = PropertyConditionProperties.class)}) @Immutable public class AutomationRuleCondition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleCondition.class); - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java deleted file mode 100644 index 4d7c437eafed..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AutomationRuleConditionType. */ -public final class AutomationRuleConditionType extends ExpandableStringEnum { - /** Static value Property for AutomationRuleConditionType. */ - public static final AutomationRuleConditionType PROPERTY = fromString("Property"); - - /** - * Creates or finds a AutomationRuleConditionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRuleConditionType. - */ - @JsonCreator - public static AutomationRuleConditionType fromString(String name) { - return fromString(name, AutomationRuleConditionType.class); - } - - /** @return known AutomationRuleConditionType values. */ - public static Collection values() { - return values(AutomationRuleConditionType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java index 1560e1ebf27f..0f56b3772f36 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,31 +14,28 @@ @JsonTypeName("ModifyProperties") @Fluent public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleModifyPropertiesAction.class); - /* - * The configuration of the modify properties automation rule action + * The actionConfiguration property. */ - @JsonProperty(value = "actionConfiguration", required = true) - private AutomationRuleModifyPropertiesActionConfiguration actionConfiguration; + @JsonProperty(value = "actionConfiguration") + private IncidentPropertiesAction actionConfiguration; /** - * Get the actionConfiguration property: The configuration of the modify properties automation rule action. + * Get the actionConfiguration property: The actionConfiguration property. * * @return the actionConfiguration value. */ - public AutomationRuleModifyPropertiesActionConfiguration actionConfiguration() { + public IncidentPropertiesAction actionConfiguration() { return this.actionConfiguration; } /** - * Set the actionConfiguration property: The configuration of the modify properties automation rule action. + * Set the actionConfiguration property: The actionConfiguration property. * * @param actionConfiguration the actionConfiguration value to set. * @return the AutomationRuleModifyPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesAction withActionConfiguration( - AutomationRuleModifyPropertiesActionConfiguration actionConfiguration) { + public AutomationRuleModifyPropertiesAction withActionConfiguration(IncidentPropertiesAction actionConfiguration) { this.actionConfiguration = actionConfiguration; return this; } @@ -60,12 +55,7 @@ public AutomationRuleModifyPropertiesAction withOrder(int order) { @Override public void validate() { super.validate(); - if (actionConfiguration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property actionConfiguration in model AutomationRuleModifyPropertiesAction")); - } else { + if (actionConfiguration() != null) { actionConfiguration().validate(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java index 0b7ef101a6e7..55dc7f5cf6e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java @@ -25,13 +25,16 @@ public final class AutomationRulePropertyConditionSupportedProperty /** Static value IncidentStatus for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_STATUS = fromString("IncidentStatus"); + /** Static value IncidentRelatedAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ + public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_RELATED_ANALYTIC_RULE_IDS = + fromString("IncidentRelatedAnalyticRuleIds"); + /** Static value IncidentTactics for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_TACTICS = fromString("IncidentTactics"); - /** Static value IncidentRelatedAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_RELATED_ANALYTIC_RULE_IDS = - fromString("IncidentRelatedAnalyticRuleIds"); + /** Static value IncidentLabel for AutomationRulePropertyConditionSupportedProperty. */ + public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_LABEL = fromString("IncidentLabel"); /** Static value IncidentProviderName for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_PROVIDER_NAME = @@ -66,6 +69,10 @@ public final class AutomationRulePropertyConditionSupportedProperty public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_UPNSUFFIX = fromString("AccountUPNSuffix"); + /** Static value AlertProductNames for AutomationRulePropertyConditionSupportedProperty. */ + public static final AutomationRulePropertyConditionSupportedProperty ALERT_PRODUCT_NAMES = + fromString("AlertProductNames"); + /** Static value AzureResourceResourceId for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty AZURE_RESOURCE_RESOURCE_ID = fromString("AzureResourceResourceId"); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java index 008987e3f74d..59d65b5af679 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 @@ -5,43 +5,89 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** Describes an automation rule condition that evaluates a property's value. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("Property") +/** The AutomationRulePropertyValuesCondition model. */ @Fluent -public final class AutomationRulePropertyValuesCondition extends AutomationRuleCondition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRulePropertyValuesCondition.class); +public final class AutomationRulePropertyValuesCondition { + /* + * The property to evaluate in an automation rule property condition + */ + @JsonProperty(value = "propertyName") + private AutomationRulePropertyConditionSupportedProperty propertyName; + + /* + * The operator property. + */ + @JsonProperty(value = "operator") + private AutomationRulePropertyConditionSupportedOperator operator; /* - * The configuration of the automation rule condition + * The propertyValues property. + */ + @JsonProperty(value = "propertyValues") + private List propertyValues; + + /** + * Get the propertyName property: The property to evaluate in an automation rule property condition. + * + * @return the propertyName value. + */ + public AutomationRulePropertyConditionSupportedProperty propertyName() { + return this.propertyName; + } + + /** + * Set the propertyName property: The property to evaluate in an automation rule property condition. + * + * @param propertyName the propertyName value to set. + * @return the AutomationRulePropertyValuesCondition object itself. */ - @JsonProperty(value = "conditionProperties", required = true) - private AutomationRulePropertyValuesConditionProperties conditionProperties; + public AutomationRulePropertyValuesCondition withPropertyName( + AutomationRulePropertyConditionSupportedProperty propertyName) { + this.propertyName = propertyName; + return this; + } + + /** + * Get the operator property: The operator property. + * + * @return the operator value. + */ + public AutomationRulePropertyConditionSupportedOperator operator() { + return this.operator; + } + + /** + * Set the operator property: The operator property. + * + * @param operator the operator value to set. + * @return the AutomationRulePropertyValuesCondition object itself. + */ + public AutomationRulePropertyValuesCondition withOperator( + AutomationRulePropertyConditionSupportedOperator operator) { + this.operator = operator; + return this; + } /** - * Get the conditionProperties property: The configuration of the automation rule condition. + * Get the propertyValues property: The propertyValues property. * - * @return the conditionProperties value. + * @return the propertyValues value. */ - public AutomationRulePropertyValuesConditionProperties conditionProperties() { - return this.conditionProperties; + public List propertyValues() { + return this.propertyValues; } /** - * Set the conditionProperties property: The configuration of the automation rule condition. + * Set the propertyValues property: The propertyValues property. * - * @param conditionProperties the conditionProperties value to set. + * @param propertyValues the propertyValues value to set. * @return the AutomationRulePropertyValuesCondition object itself. */ - public AutomationRulePropertyValuesCondition withConditionProperties( - AutomationRulePropertyValuesConditionProperties conditionProperties) { - this.conditionProperties = conditionProperties; + public AutomationRulePropertyValuesCondition withPropertyValues(List propertyValues) { + this.propertyValues = propertyValues; return this; } @@ -50,17 +96,6 @@ public AutomationRulePropertyValuesCondition withConditionProperties( * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); - if (conditionProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property conditionProperties in model" - + " AutomationRulePropertyValuesCondition")); - } else { - conditionProperties().validate(); - } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java deleted file mode 100644 index b6875a560ebb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration of the automation rule condition. */ -@Fluent -public final class AutomationRulePropertyValuesConditionProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutomationRulePropertyValuesConditionProperties.class); - - /* - * The property to evaluate - */ - @JsonProperty(value = "propertyName") - private AutomationRulePropertyConditionSupportedProperty propertyName; - - /* - * The operator to use for evaluation the condition - */ - @JsonProperty(value = "operator") - private AutomationRulePropertyConditionSupportedOperator operator; - - /* - * The values to use for evaluating the condition - */ - @JsonProperty(value = "propertyValues") - private List propertyValues; - - /** - * Get the propertyName property: The property to evaluate. - * - * @return the propertyName value. - */ - public AutomationRulePropertyConditionSupportedProperty propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The property to evaluate. - * - * @param propertyName the propertyName value to set. - * @return the AutomationRulePropertyValuesConditionProperties object itself. - */ - public AutomationRulePropertyValuesConditionProperties withPropertyName( - AutomationRulePropertyConditionSupportedProperty propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the operator property: The operator to use for evaluation the condition. - * - * @return the operator value. - */ - public AutomationRulePropertyConditionSupportedOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The operator to use for evaluation the condition. - * - * @param operator the operator value to set. - * @return the AutomationRulePropertyValuesConditionProperties object itself. - */ - public AutomationRulePropertyValuesConditionProperties withOperator( - AutomationRulePropertyConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the propertyValues property: The values to use for evaluating the condition. - * - * @return the propertyValues value. - */ - public List propertyValues() { - return this.propertyValues; - } - - /** - * Set the propertyValues property: The values to use for evaluating the condition. - * - * @param propertyValues the propertyValues value to set. - * @return the AutomationRulePropertyValuesConditionProperties object itself. - */ - public AutomationRulePropertyValuesConditionProperties withPropertyValues(List propertyValues) { - this.propertyValues = propertyValues; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java index c9601a8f9693..f2b367315f61 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,31 +14,28 @@ @JsonTypeName("RunPlaybook") @Fluent public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleRunPlaybookAction.class); - /* - * The configuration of the run playbook automation rule action + * The actionConfiguration property. */ - @JsonProperty(value = "actionConfiguration", required = true) - private AutomationRuleRunPlaybookActionConfiguration actionConfiguration; + @JsonProperty(value = "actionConfiguration") + private PlaybookActionProperties actionConfiguration; /** - * Get the actionConfiguration property: The configuration of the run playbook automation rule action. + * Get the actionConfiguration property: The actionConfiguration property. * * @return the actionConfiguration value. */ - public AutomationRuleRunPlaybookActionConfiguration actionConfiguration() { + public PlaybookActionProperties actionConfiguration() { return this.actionConfiguration; } /** - * Set the actionConfiguration property: The configuration of the run playbook automation rule action. + * Set the actionConfiguration property: The actionConfiguration property. * * @param actionConfiguration the actionConfiguration value to set. * @return the AutomationRuleRunPlaybookAction object itself. */ - public AutomationRuleRunPlaybookAction withActionConfiguration( - AutomationRuleRunPlaybookActionConfiguration actionConfiguration) { + public AutomationRuleRunPlaybookAction withActionConfiguration(PlaybookActionProperties actionConfiguration) { this.actionConfiguration = actionConfiguration; return this; } @@ -60,12 +55,7 @@ public AutomationRuleRunPlaybookAction withOrder(int order) { @Override public void validate() { super.validate(); - if (actionConfiguration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property actionConfiguration in model AutomationRuleRunPlaybookAction")); - } else { + if (actionConfiguration() != null) { actionConfiguration().validate(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java index 94162fd712ac..89dc618ffc64 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,10 +13,8 @@ /** Describes automation rule triggering logic. */ @Fluent public final class AutomationRuleTriggeringLogic { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleTriggeringLogic.class); - /* - * Determines whether the automation rule is enabled or disabled. + * Determines whether the automation rule is enabled or disabled */ @JsonProperty(value = "isEnabled", required = true) private boolean isEnabled; @@ -30,13 +27,13 @@ public final class AutomationRuleTriggeringLogic { private OffsetDateTime expirationTimeUtc; /* - * The type of object the automation rule triggers on + * The triggersOn property. */ @JsonProperty(value = "triggersOn", required = true) private TriggersOn triggersOn; /* - * The type of event the automation rule triggers on + * The triggersWhen property. */ @JsonProperty(value = "triggersWhen", required = true) private TriggersWhen triggersWhen; @@ -91,7 +88,7 @@ public AutomationRuleTriggeringLogic withExpirationTimeUtc(OffsetDateTime expira } /** - * Get the triggersOn property: The type of object the automation rule triggers on. + * Get the triggersOn property: The triggersOn property. * * @return the triggersOn value. */ @@ -100,7 +97,7 @@ public TriggersOn triggersOn() { } /** - * Set the triggersOn property: The type of object the automation rule triggers on. + * Set the triggersOn property: The triggersOn property. * * @param triggersOn the triggersOn value to set. * @return the AutomationRuleTriggeringLogic object itself. @@ -111,7 +108,7 @@ public AutomationRuleTriggeringLogic withTriggersOn(TriggersOn triggersOn) { } /** - * Get the triggersWhen property: The type of event the automation rule triggers on. + * Get the triggersWhen property: The triggersWhen property. * * @return the triggersWhen value. */ @@ -120,7 +117,7 @@ public TriggersWhen triggersWhen() { } /** - * Set the triggersWhen property: The type of event the automation rule triggers on. + * Set the triggersWhen property: The triggersWhen property. * * @param triggersWhen the triggersWhen value to set. * @return the AutomationRuleTriggeringLogic object itself. @@ -159,13 +156,13 @@ public AutomationRuleTriggeringLogic withConditions(List e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(AutomationRuleTriggeringLogic.class); } 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 43b638ece23d..157bf09eeafd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java @@ -11,32 +11,35 @@ /** Resource collection API of AutomationRules. */ public interface AutomationRules { /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. + * @return the automation rule. */ - PagedIterable list(String resourceGroupName, String workspaceName); + AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); /** - * Gets all automation rules. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all automation rules. + * @return the automation rule along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Gets the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -44,12 +47,12 @@ public interface AutomationRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return any object. */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** - * Gets the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -58,37 +61,35 @@ public interface AutomationRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return any object along with {@link Response}. */ - Response getWithResponse( + Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Delete the automation rule. + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all automation rules as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String workspaceName, String automationRuleId); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Delete the automation rule. + * Gets all automation rules. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return all automation rules as paginated response with {@link PagedIterable}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** * Gets the automation rule. @@ -120,8 +121,9 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object along with {@link Response}. */ - void deleteById(String id); + Object deleteById(String id); /** * Delete the automation rule. @@ -131,9 +133,9 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return any object along with {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + Response deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new AutomationRule resource. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java index 6baa6f31448a..ca0dc3474b77 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 @@ -5,40 +5,27 @@ 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.AutomationRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List all the automation rules. */ +/** The AutomationRulesList model. */ @Fluent public final class AutomationRulesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRulesList.class); - /* - * URL to fetch the next set of automation rules. + * The value property. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of automation rules. - */ - @JsonProperty(value = "value", required = true) + @JsonProperty(value = "value") private List value; - /** - * Get the nextLink property: URL to fetch the next set of automation rules. - * - * @return the nextLink value. + /* + * The nextLink property. */ - public String nextLink() { - return this.nextLink; - } + @JsonProperty(value = "nextLink") + private String nextLink; /** - * Get the value property: Array of automation rules. + * Get the value property: The value property. * * @return the value value. */ @@ -47,7 +34,7 @@ public List value() { } /** - * Set the value property: Array of automation rules. + * Set the value property: The value property. * * @param value the value value to set. * @return the AutomationRulesList object itself. @@ -57,17 +44,33 @@ public AutomationRulesList withValue(List value) { return this; } + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the AutomationRulesList object itself. + */ + public AutomationRulesList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AutomationRulesList")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java index 8ba720f8a9ef..30665983543b 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Connector Availability Status. */ @Fluent public final class Availability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Availability.class); - /* * 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 8d51c007318f..047f80cbc5a1 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("AmazonWebServicesCloudTrail") @Immutable public final class AwsCloudTrailCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsCloudTrailCheckRequirements.class); - /** * 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 657bf58d8b0a..85fed62b4c13 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 @@ -5,10 +5,8 @@ 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.AwsCloudTrailDataConnectorProperties; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("AmazonWebServicesCloudTrail") @Fluent public final class AwsCloudTrailDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsCloudTrailDataConnector.class); - /* * 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 b06e4313e891..019e54161be6 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Amazon Web Services CloudTrail data connector. */ @Fluent public final class AwsCloudTrailDataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsCloudTrailDataConnectorDataTypes.class); - /* * Logs data type. */ @@ -47,7 +44,7 @@ public AwsCloudTrailDataConnectorDataTypes withLogs(AwsCloudTrailDataConnectorDa */ public void validate() { if (logs() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property logs in model AwsCloudTrailDataConnectorDataTypes")); @@ -55,4 +52,6 @@ public void validate() { logs().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AwsCloudTrailDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java index 981c716f9566..f11d9c72a1d9 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Logs data type. */ @Fluent public final class AwsCloudTrailDataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsCloudTrailDataConnectorDataTypesLogs.class); - /** {@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 d9ef1517907e..ddfb6f7d40c1 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("AmazonWebServicesS3") @Immutable public final class AwsS3CheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsS3CheckRequirements.class); - /** * 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 90e7adf43915..3739b6ccb523 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 @@ -5,10 +5,8 @@ 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.AwsS3DataConnectorProperties; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("AmazonWebServicesS3") @Fluent public final class AwsS3DataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsS3DataConnector.class); - /* * 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 8f8cd6f91d1b..14c7a6754785 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Amazon Web Services S3 data connector. */ @Fluent public final class AwsS3DataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsS3DataConnectorDataTypes.class); - /* * Logs data type. */ @@ -47,7 +44,7 @@ public AwsS3DataConnectorDataTypes withLogs(AwsS3DataConnectorDataTypesLogs logs */ public void validate() { if (logs() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property logs in model AwsS3DataConnectorDataTypes")); @@ -55,4 +52,6 @@ public void validate() { logs().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java index fd2c160e5e00..dd24d8ad6de3 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Logs data type. */ @Fluent public final class AwsS3DataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AwsS3DataConnectorDataTypesLogs.class); - /** {@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 new file mode 100644 index 000000000000..4c8ea0212461 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.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.fasterxml.jackson.annotation.JsonProperty; + +/** Resources created in Azure DevOps repository. */ +@Fluent +public final class AzureDevOpsResourceInfo { + /* + * Id of the pipeline created for the source-control. + */ + @JsonProperty(value = "pipelineId") + private String pipelineId; + + /* + * Id of the service-connection created for the source-control. + */ + @JsonProperty(value = "serviceConnectionId") + private String serviceConnectionId; + + /** + * Get the pipelineId property: Id of the pipeline created for the source-control. + * + * @return the pipelineId value. + */ + public String pipelineId() { + return this.pipelineId; + } + + /** + * Set the pipelineId property: Id of the pipeline created for the source-control. + * + * @param pipelineId the pipelineId value to set. + * @return the AzureDevOpsResourceInfo object itself. + */ + public AzureDevOpsResourceInfo withPipelineId(String pipelineId) { + this.pipelineId = pipelineId; + return this; + } + + /** + * Get the serviceConnectionId property: Id of the service-connection created for the source-control. + * + * @return the serviceConnectionId value. + */ + public String serviceConnectionId() { + return this.serviceConnectionId; + } + + /** + * Set the serviceConnectionId property: Id of the service-connection created for the source-control. + * + * @param serviceConnectionId the serviceConnectionId value to set. + * @return the AzureDevOpsResourceInfo object itself. + */ + public AzureDevOpsResourceInfo withServiceConnectionId(String serviceConnectionId) { + this.serviceConnectionId = serviceConnectionId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java index c59fa3574e21..64b4871d5cf4 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 @@ -5,10 +5,8 @@ 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.AzureResourceEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("AzureResource") @Fluent public final class AzureResourceEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureResourceEntity.class); - /* * AzureResource entity properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java index a007b44cfe36..a9e30a649b26 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java @@ -138,6 +138,27 @@ public interface Bookmark { */ IncidentInfo incidentInfo(); + /** + * Gets the entityMappings property: Describes the entity mappings of the bookmark. + * + * @return the entityMappings value. + */ + List entityMappings(); + + /** + * Gets the tactics property: A list of relevant mitre attacks. + * + * @return the tactics value. + */ + List tactics(); + + /** + * Gets the techniques property: A list of relevant mitre techniques. + * + * @return the techniques value. + */ + List techniques(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner object. * @@ -183,7 +204,10 @@ interface WithCreate DefinitionStages.WithEventTime, DefinitionStages.WithQueryStartTime, DefinitionStages.WithQueryEndTime, - DefinitionStages.WithIncidentInfo { + DefinitionStages.WithIncidentInfo, + DefinitionStages.WithEntityMappings, + DefinitionStages.WithTactics, + DefinitionStages.WithTechniques { /** * Executes the create request. * @@ -339,6 +363,36 @@ interface WithIncidentInfo { */ WithCreate withIncidentInfo(IncidentInfo incidentInfo); } + /** The stage of the Bookmark definition allowing to specify entityMappings. */ + interface WithEntityMappings { + /** + * Specifies the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings Describes the entity mappings of the bookmark. + * @return the next definition stage. + */ + WithCreate withEntityMappings(List entityMappings); + } + /** The stage of the Bookmark definition allowing to specify tactics. */ + interface WithTactics { + /** + * Specifies the tactics property: A list of relevant mitre attacks. + * + * @param tactics A list of relevant mitre attacks. + * @return the next definition stage. + */ + WithCreate withTactics(List tactics); + } + /** The stage of the Bookmark definition allowing to specify techniques. */ + interface WithTechniques { + /** + * Specifies the techniques property: A list of relevant mitre techniques. + * + * @param techniques A list of relevant mitre techniques. + * @return the next definition stage. + */ + WithCreate withTechniques(List techniques); + } } /** * Begins update for the Bookmark resource. @@ -362,7 +416,10 @@ interface Update UpdateStages.WithEventTime, UpdateStages.WithQueryStartTime, UpdateStages.WithQueryEndTime, - UpdateStages.WithIncidentInfo { + UpdateStages.WithIncidentInfo, + UpdateStages.WithEntityMappings, + UpdateStages.WithTactics, + UpdateStages.WithTechniques { /** * Executes the update request. * @@ -520,6 +577,36 @@ interface WithIncidentInfo { */ Update withIncidentInfo(IncidentInfo incidentInfo); } + /** The stage of the Bookmark update allowing to specify entityMappings. */ + interface WithEntityMappings { + /** + * Specifies the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings Describes the entity mappings of the bookmark. + * @return the next definition stage. + */ + Update withEntityMappings(List entityMappings); + } + /** The stage of the Bookmark update allowing to specify tactics. */ + interface WithTactics { + /** + * Specifies the tactics property: A list of relevant mitre attacks. + * + * @param tactics A list of relevant mitre attacks. + * @return the next definition stage. + */ + Update withTactics(List tactics); + } + /** The stage of the Bookmark update allowing to specify techniques. */ + interface WithTechniques { + /** + * Specifies the techniques property: A list of relevant mitre techniques. + * + * @param techniques A list of relevant mitre techniques. + * @return the next definition stage. + */ + Update withTechniques(List techniques); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java new file mode 100644 index 000000000000..b46a2d88c95d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.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; +import java.util.List; + +/** Describes the entity mappings of a single entity. */ +@Fluent +public final class BookmarkEntityMappings { + /* + * The entity type + */ + @JsonProperty(value = "entityType") + private String entityType; + + /* + * Array of fields mapping for that entity type + */ + @JsonProperty(value = "fieldMappings") + private List fieldMappings; + + /** + * Get the entityType property: The entity type. + * + * @return the entityType value. + */ + public String entityType() { + return this.entityType; + } + + /** + * Set the entityType property: The entity type. + * + * @param entityType the entityType value to set. + * @return the BookmarkEntityMappings object itself. + */ + public BookmarkEntityMappings withEntityType(String entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get the fieldMappings property: Array of fields mapping for that entity type. + * + * @return the fieldMappings value. + */ + public List fieldMappings() { + return this.fieldMappings; + } + + /** + * Set the fieldMappings property: Array of fields mapping for that entity type. + * + * @param fieldMappings the fieldMappings value to set. + * @return the BookmarkEntityMappings object itself. + */ + public BookmarkEntityMappings withFieldMappings(List fieldMappings) { + this.fieldMappings = fieldMappings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fieldMappings() != null) { + fieldMappings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java index 6394e9a4b192..13ab7b9e3d5b 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.UUID; @@ -14,8 +12,6 @@ /** The parameters required to execute an expand operation on the given bookmark. */ @Fluent public final class BookmarkExpandParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkExpandParameters.class); - /* * 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 cc4026d97464..b9b48339a131 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The expansion result values. */ @Fluent public final class BookmarkExpandResponseValue { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkExpandResponseValue.class); - /* * 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 1c935bdd4dcc..f89890b19242 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 @@ -7,17 +7,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the bookmarks. */ @Fluent public final class BookmarkList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkList.class); - /* - * URL to fetch the next set of cases. + * URL to fetch the next set of bookmarks. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; @@ -29,7 +26,7 @@ public final class BookmarkList { private List value; /** - * Get the nextLink property: URL to fetch the next set of cases. + * Get the nextLink property: URL to fetch the next set of bookmarks. * * @return the nextLink value. */ @@ -64,11 +61,13 @@ public BookmarkList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model BookmarkList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(BookmarkList.class); } 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 9ffbdd90c658..e1db491640d0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java @@ -19,7 +19,7 @@ public interface BookmarkRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); @@ -39,7 +39,7 @@ public interface BookmarkRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java index c41519f7c33f..bfad411f1ce6 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +17,6 @@ @JsonTypeName("Bookmark") @Fluent public final class BookmarkTimelineItem extends EntityTimelineItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkTimelineItem.class); - /* * The bookmark azure resource id. */ @@ -237,7 +234,7 @@ public BookmarkTimelineItem withLabels(List labels) { public void validate() { super.validate(); if (azureResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property azureResourceId in model BookmarkTimelineItem")); @@ -246,4 +243,6 @@ public void validate() { createdBy().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(BookmarkTimelineItem.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java index 50d94e95df2b..3b3706f36fd8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java @@ -18,7 +18,7 @@ public interface Bookmarks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface Bookmarks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java index 7c4ef8aa342b..9d6d5e61b586 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** Information on the client (user or application) that made some action. */ @Fluent public final class ClientInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientInfo.class); - /* * 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 06ed9fbfcf2e..2d0908e927da 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 @@ -5,10 +5,8 @@ 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.CloudApplicationEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("CloudApplication") @Fluent public final class CloudApplicationEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudApplicationEntity.class); - /* * 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 ac48b50e2400..396d69282da3 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 @@ -5,10 +5,8 @@ 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.ApiPollingParameters; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("APIPolling") @Fluent public final class CodelessApiPollingDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessApiPollingDataConnector.class); - /* * 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 bb0169d8621b..f29d2c7ffe6e 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describe the authentication properties needed to successfully authenticate with the server. */ @Fluent public final class CodelessConnectorPollingAuthProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessConnectorPollingAuthProperties.class); - /* * The authentication type */ @@ -372,10 +369,12 @@ public CodelessConnectorPollingAuthProperties withScope(String scope) { */ public void validate() { if (authType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property authType in model CodelessConnectorPollingAuthProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingAuthProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java index 8e73a80125b9..b1040c30de77 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Config to describe the polling config for API poller connector. */ @Fluent public final class CodelessConnectorPollingConfigProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessConnectorPollingConfigProperties.class); - /* * The poller active status */ @@ -151,7 +148,7 @@ public CodelessConnectorPollingConfigProperties withResponse(CodelessConnectorPo */ public void validate() { if (auth() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property auth in model CodelessConnectorPollingConfigProperties")); @@ -159,7 +156,7 @@ public void validate() { auth().validate(); } if (request() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property request in model CodelessConnectorPollingConfigProperties")); @@ -173,4 +170,6 @@ public void validate() { response().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingConfigProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java index 541021643968..5a864be2a257 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describe the properties needed to make a pagination call. */ @Fluent public final class CodelessConnectorPollingPagingProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessConnectorPollingPagingProperties.class); - /* * Describes the type. could be 'None', 'PageToken', 'PageCount', * 'TimeStamp' @@ -261,10 +258,12 @@ public CodelessConnectorPollingPagingProperties withPageSize(Integer pageSize) { */ public void validate() { if (pagingType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property pagingType in model CodelessConnectorPollingPagingProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingPagingProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java index a9c77c56c090..de636907d6d8 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describe the request properties needed to successfully pull from the server. */ @Fluent public final class CodelessConnectorPollingRequestProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessConnectorPollingRequestProperties.class); - /* * Describe the endpoint we should pull the data from */ @@ -337,23 +334,25 @@ public CodelessConnectorPollingRequestProperties withEndTimeAttributeName(String */ public void validate() { if (apiEndpoint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property apiEndpoint in model CodelessConnectorPollingRequestProperties")); } if (httpMethod() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property httpMethod in model CodelessConnectorPollingRequestProperties")); } if (queryTimeFormat() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property queryTimeFormat in model" + " CodelessConnectorPollingRequestProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingRequestProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java index 8234ebca97f0..561f409ee82f 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 @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes the response from the external server. */ @Fluent public final class CodelessConnectorPollingResponseProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessConnectorPollingResponseProperties.class); - /* * Describes the path we should extract the data in the response */ @@ -126,11 +123,13 @@ public CodelessConnectorPollingResponseProperties withIsGzipCompressed(Boolean i */ public void validate() { if (eventsJsonPaths() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property eventsJsonPaths in model" + " CodelessConnectorPollingResponseProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingResponseProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java index 1acd5395f87f..1543c1d84d3f 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 @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Config to describe the instructions blade. */ @Fluent public final class CodelessUiConnectorConfigProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessUiConnectorConfigProperties.class); - /* * Connector blade title */ @@ -342,32 +339,32 @@ public CodelessUiConnectorConfigProperties withInstructionSteps( */ public void validate() { if (title() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property title in model CodelessUiConnectorConfigProperties")); } if (publisher() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property publisher in model CodelessUiConnectorConfigProperties")); } if (descriptionMarkdown() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property descriptionMarkdown in model CodelessUiConnectorConfigProperties")); } if (graphQueriesTableName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property graphQueriesTableName in model" + " CodelessUiConnectorConfigProperties")); } if (graphQueries() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property graphQueries in model CodelessUiConnectorConfigProperties")); @@ -375,7 +372,7 @@ public void validate() { graphQueries().forEach(e -> e.validate()); } if (sampleQueries() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sampleQueries in model CodelessUiConnectorConfigProperties")); @@ -383,7 +380,7 @@ public void validate() { sampleQueries().forEach(e -> e.validate()); } if (dataTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataTypes in model CodelessUiConnectorConfigProperties")); @@ -391,7 +388,7 @@ public void validate() { dataTypes().forEach(e -> e.validate()); } if (connectivityCriteria() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property connectivityCriteria in model CodelessUiConnectorConfigProperties")); @@ -399,7 +396,7 @@ public void validate() { connectivityCriteria().forEach(e -> e.validate()); } if (availability() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property availability in model CodelessUiConnectorConfigProperties")); @@ -407,7 +404,7 @@ public void validate() { availability().validate(); } if (permissions() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property permissions in model CodelessUiConnectorConfigProperties")); @@ -415,7 +412,7 @@ public void validate() { permissions().validate(); } if (instructionSteps() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property instructionSteps in model CodelessUiConnectorConfigProperties")); @@ -423,4 +420,6 @@ public void validate() { instructionSteps().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(CodelessUiConnectorConfigProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java index 91d181434244..c57fe3ddde43 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 @@ -5,17 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; /** The CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem extends ConnectivityCriteria { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.class); - /** {@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 3319c584d824..1f9a8f78eb43 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 @@ -5,15 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** The CodelessUiConnectorConfigPropertiesDataTypesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesDataTypesItem extends LastDataReceivedDataType { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CodelessUiConnectorConfigPropertiesDataTypesItem.class); - /** {@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 525c0ddbe198..80ff447db0ad 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 @@ -5,15 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** The CodelessUiConnectorConfigPropertiesGraphQueriesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesGraphQueriesItem extends GraphQueries { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CodelessUiConnectorConfigPropertiesGraphQueriesItem.class); - /** {@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 32db5a96ec89..187727984833 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 @@ -5,16 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; /** The CodelessUiConnectorConfigPropertiesInstructionStepsItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesInstructionStepsItem extends InstructionSteps { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CodelessUiConnectorConfigPropertiesInstructionStepsItem.class); - /** {@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 1703a5ced55c..288bd8d550f8 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 @@ -5,15 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** The CodelessUiConnectorConfigPropertiesSampleQueriesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesSampleQueriesItem extends SampleQueries { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CodelessUiConnectorConfigPropertiesSampleQueriesItem.class); - /** {@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 b09c9063abbd..06cd156687bb 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 @@ -5,10 +5,8 @@ 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.CodelessParameters; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("GenericUI") @Fluent public final class CodelessUiDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CodelessUiDataConnector.class); - /* * 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 new file mode 100644 index 000000000000..3b52ea2c69dd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ConditionType. */ +public final class ConditionType extends ExpandableStringEnum { + /** Static value Property for ConditionType. */ + public static final ConditionType PROPERTY = fromString("Property"); + + /** + * Creates or finds a ConditionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConditionType. + */ + @JsonCreator + public static ConditionType fromString(String name) { + return fromString(name, ConditionType.class); + } + + /** @return known ConditionType values. */ + public static Collection values() { + return values(ConditionType.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java index e1b132581129..655facb3559a 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Expansion result connected entities. */ @Fluent public final class ConnectedEntity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectedEntity.class); - /* * 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 54db68763e91..da5f0724d422 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Setting for the connector check connectivity. */ @Fluent public class ConnectivityCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectivityCriteria.class); - /* * type of connectivity */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java index bc3fe32b297d..c710b1b251e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Instruction step details. */ @Fluent public class ConnectorInstructionModelBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectorInstructionModelBase.class); - /* * The parameters for the setting */ @@ -73,10 +70,12 @@ public ConnectorInstructionModelBase withType(SettingType type) { */ public void validate() { if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property type in model ConnectorInstructionModelBase")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectorInstructionModelBase.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant69.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant73.java similarity index 64% rename from sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant69.java rename to sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant73.java index 11021b609e3f..e92b0ae62ec0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant69.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant73.java @@ -7,28 +7,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for Constant69. */ -public enum Constant69 { +/** Defines values for Constant73. */ +public enum Constant73 { /** Enum value Activity. */ ACTIVITY("Activity"); - /** The actual serialized value for a Constant69 instance. */ + /** The actual serialized value for a Constant73 instance. */ private final String value; - Constant69(String value) { + Constant73(String value) { this.value = value; } /** - * Parses a serialized value to a Constant69 instance. + * Parses a serialized value to a Constant73 instance. * * @param value the serialized value to parse. - * @return the parsed Constant69 object, or null if unable to parse. + * @return the parsed Constant73 object, or null if unable to parse. */ @JsonCreator - public static Constant69 fromString(String value) { - Constant69[] items = Constant69.values(); - for (Constant69 item : items) { + public static Constant73 fromString(String value) { + Constant73[] items = Constant73.values(); + for (Constant73 item : items) { if (item.toString().equalsIgnoreCase(value)) { return item; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java index db0d69707c9f..55e4aa0cd259 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The mapping of content type to a repo path. */ @Fluent public final class ContentPathMap { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentPathMap.class); - /* * Content type. */ 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 94aa5c93e748..76169a7542b0 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityCustomEntityQuery.class)}) @Fluent public class CustomEntityQuery extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomEntityQuery.class); - /** {@inheritDoc} */ @Override public CustomEntityQuery withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java index 067060e61288..9507f46b98de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Customs permissions required for the connector. */ @Fluent public class Customs extends CustomsPermission { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Customs.class); - /** {@inheritDoc} */ @Override public Customs withName(String name) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java index 2a56d0f96d38..a7ade225346b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Customs permissions required for the connector. */ @Fluent public class CustomsPermission { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomsPermission.class); - /* * Customs permissions name */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java index fc595f40cca9..135d3be8f655 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents Codeless API Polling data connector. */ @Fluent public final class DataConnectorConnectBody { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorConnectBody.class); - /* * 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 504fb007d290..936cd58c9114 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Common field for data type in data connectors. */ @Fluent public class DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorDataTypeCommon.class); - /* * Describe whether this data type connection is enabled or not. */ @@ -47,10 +44,12 @@ public DataConnectorDataTypeCommon withState(DataTypeState state) { */ public void validate() { if (state() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property state in model DataConnectorDataTypeCommon")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorDataTypeCommon.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java index fc0fac4fb2e0..52d976920e48 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java @@ -34,6 +34,12 @@ public final class DataConnectorKind extends ExpandableStringEnum value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model DataConnectorList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorList.class); } 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 d9cee5747ccd..36d4914ce98b 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties data connector on tenant level. */ @Fluent public class DataConnectorTenantId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorTenantId.class); - /* * The tenant id to connect to, and get the data from. */ @@ -47,9 +44,11 @@ public DataConnectorTenantId withTenantId(String tenantId) { */ public void validate() { if (tenantId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property tenantId in model DataConnectorTenantId")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorTenantId.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java index 9bce8ed56d5a..e0bbbf5d0334 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data connector properties. */ @Fluent public class DataConnectorWithAlertsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorWithAlertsProperties.class); - /* * 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 5eb14ca94bd7..f80628152117 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 @@ -19,7 +19,7 @@ public interface DataConnectors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,7 +32,7 @@ public interface DataConnectors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java index 781543f16485..57317f6ffc3c 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -31,13 +29,14 @@ @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmCheckRequirements.class), + @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectCheckRequirements.class), + @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBICheckRequirements.class), @JsonSubTypes.Type(name = "ThreatIntelligence", value = TICheckRequirements.class), - @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiCheckRequirements.class) + @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiCheckRequirements.class), + @JsonSubTypes.Type(name = "IOT", value = IoTCheckRequirements.class) }) @Immutable public class DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectorsCheckRequirements.class); - /** * Validates the instance. * 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 e1dca2075efc..419ceca40540 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The data type definition. */ @Fluent public final class DataTypeDefinitions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataTypeDefinitions.class); - /* * The data type name */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java new file mode 100644 index 000000000000..f500a22a553e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Description about a deployment. */ +@Fluent +public final class Deployment { + /* + * Deployment identifier. + */ + @JsonProperty(value = "deploymentId") + private String deploymentId; + + /* + * Current status of the deployment. + */ + @JsonProperty(value = "deploymentState") + private DeploymentState deploymentState; + + /* + * The outcome of the deployment. + */ + @JsonProperty(value = "deploymentResult") + private DeploymentResult deploymentResult; + + /* + * The time when the deployment finished. + */ + @JsonProperty(value = "deploymentTime") + private OffsetDateTime deploymentTime; + + /* + * Url to access repository action logs. + */ + @JsonProperty(value = "deploymentLogsUrl") + private String deploymentLogsUrl; + + /** + * Get the deploymentId property: Deployment identifier. + * + * @return the deploymentId value. + */ + public String deploymentId() { + return this.deploymentId; + } + + /** + * Set the deploymentId property: Deployment identifier. + * + * @param deploymentId the deploymentId value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + return this; + } + + /** + * Get the deploymentState property: Current status of the deployment. + * + * @return the deploymentState value. + */ + public DeploymentState deploymentState() { + return this.deploymentState; + } + + /** + * Set the deploymentState property: Current status of the deployment. + * + * @param deploymentState the deploymentState value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentState(DeploymentState deploymentState) { + this.deploymentState = deploymentState; + return this; + } + + /** + * Get the deploymentResult property: The outcome of the deployment. + * + * @return the deploymentResult value. + */ + public DeploymentResult deploymentResult() { + return this.deploymentResult; + } + + /** + * Set the deploymentResult property: The outcome of the deployment. + * + * @param deploymentResult the deploymentResult value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentResult(DeploymentResult deploymentResult) { + this.deploymentResult = deploymentResult; + return this; + } + + /** + * Get the deploymentTime property: The time when the deployment finished. + * + * @return the deploymentTime value. + */ + public OffsetDateTime deploymentTime() { + return this.deploymentTime; + } + + /** + * Set the deploymentTime property: The time when the deployment finished. + * + * @param deploymentTime the deploymentTime value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentTime(OffsetDateTime deploymentTime) { + this.deploymentTime = deploymentTime; + return this; + } + + /** + * Get the deploymentLogsUrl property: Url to access repository action logs. + * + * @return the deploymentLogsUrl value. + */ + public String deploymentLogsUrl() { + return this.deploymentLogsUrl; + } + + /** + * Set the deploymentLogsUrl property: Url to access repository action logs. + * + * @param deploymentLogsUrl the deploymentLogsUrl value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentLogsUrl(String deploymentLogsUrl) { + this.deploymentLogsUrl = deploymentLogsUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java new file mode 100644 index 000000000000..e88a29f0d670 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DeploymentFetchStatus. */ +public final class DeploymentFetchStatus extends ExpandableStringEnum { + /** Static value Success for DeploymentFetchStatus. */ + public static final DeploymentFetchStatus SUCCESS = fromString("Success"); + + /** Static value Unauthorized for DeploymentFetchStatus. */ + public static final DeploymentFetchStatus UNAUTHORIZED = fromString("Unauthorized"); + + /** Static value NotFound for DeploymentFetchStatus. */ + public static final DeploymentFetchStatus NOT_FOUND = fromString("NotFound"); + + /** + * Creates or finds a DeploymentFetchStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentFetchStatus. + */ + @JsonCreator + public static DeploymentFetchStatus fromString(String name) { + return fromString(name, DeploymentFetchStatus.class); + } + + /** @return known DeploymentFetchStatus values. */ + public static Collection values() { + return values(DeploymentFetchStatus.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java new file mode 100644 index 000000000000..6f8b486f4c2e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information regarding a deployment. */ +@Fluent +public final class DeploymentInfo { + /* + * Status while fetching the last deployment. + */ + @JsonProperty(value = "deploymentFetchStatus") + private DeploymentFetchStatus deploymentFetchStatus; + + /* + * Deployment information. + */ + @JsonProperty(value = "deployment") + private Deployment deployment; + + /* + * Additional details about the deployment that can be shown to the user. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the deploymentFetchStatus property: Status while fetching the last deployment. + * + * @return the deploymentFetchStatus value. + */ + public DeploymentFetchStatus deploymentFetchStatus() { + return this.deploymentFetchStatus; + } + + /** + * Set the deploymentFetchStatus property: Status while fetching the last deployment. + * + * @param deploymentFetchStatus the deploymentFetchStatus value to set. + * @return the DeploymentInfo object itself. + */ + public DeploymentInfo withDeploymentFetchStatus(DeploymentFetchStatus deploymentFetchStatus) { + this.deploymentFetchStatus = deploymentFetchStatus; + return this; + } + + /** + * Get the deployment property: Deployment information. + * + * @return the deployment value. + */ + public Deployment deployment() { + return this.deployment; + } + + /** + * Set the deployment property: Deployment information. + * + * @param deployment the deployment value to set. + * @return the DeploymentInfo object itself. + */ + public DeploymentInfo withDeployment(Deployment deployment) { + this.deployment = deployment; + return this; + } + + /** + * Get the message property: Additional details about the deployment that can be shown to the user. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Additional details about the deployment that can be shown to the user. + * + * @param message the message value to set. + * @return the DeploymentInfo object itself. + */ + public DeploymentInfo withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deployment() != null) { + deployment().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java new file mode 100644 index 000000000000..723ac5fda827 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DeploymentResult. */ +public final class DeploymentResult extends ExpandableStringEnum { + /** Static value Success for DeploymentResult. */ + public static final DeploymentResult SUCCESS = fromString("Success"); + + /** Static value Canceled for DeploymentResult. */ + public static final DeploymentResult CANCELED = fromString("Canceled"); + + /** Static value Failed for DeploymentResult. */ + public static final DeploymentResult FAILED = fromString("Failed"); + + /** + * Creates or finds a DeploymentResult from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentResult. + */ + @JsonCreator + public static DeploymentResult fromString(String name) { + return fromString(name, DeploymentResult.class); + } + + /** @return known DeploymentResult values. */ + public static Collection values() { + return values(DeploymentResult.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java new file mode 100644 index 000000000000..8298199aa271 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DeploymentState. */ +public final class DeploymentState extends ExpandableStringEnum { + /** Static value In_Progress for DeploymentState. */ + public static final DeploymentState IN_PROGRESS = fromString("In_Progress"); + + /** Static value Completed for DeploymentState. */ + public static final DeploymentState COMPLETED = fromString("Completed"); + + /** Static value Queued for DeploymentState. */ + public static final DeploymentState QUEUED = fromString("Queued"); + + /** Static value Canceling for DeploymentState. */ + public static final DeploymentState CANCELING = fromString("Canceling"); + + /** + * Creates or finds a DeploymentState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentState. + */ + @JsonCreator + public static DeploymentState fromString(String name) { + return fromString(name, DeploymentState.class); + } + + /** @return known DeploymentState values. */ + public static Collection values() { + return values(DeploymentState.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java index 97c8006170ed..ed3969162e66 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java @@ -5,10 +5,8 @@ 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.DnsEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("DnsResolution") @Fluent public final class DnsEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DnsEntity.class); - /* * Dns entity properties */ 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 72b533edc489..eaa3c125f567 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 @@ -5,9 +5,7 @@ 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.Dynamics365CheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("Dynamics365") @Fluent public final class Dynamics365CheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dynamics365CheckRequirements.class); - /* * Dynamics365 requirements check properties. */ 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 804f35d5ce4f..653d886600c3 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.Dynamics365DataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("Dynamics365") @Fluent public final class Dynamics365DataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dynamics365DataConnector.class); - /* * 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 1b935488d321..0df0a2723965 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Dynamics365 data connector. */ @Fluent public final class Dynamics365DataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dynamics365DataConnectorDataTypes.class); - /* * Common Data Service data type connection. */ @@ -48,7 +45,7 @@ public Dynamics365DataConnectorDataTypes withDynamics365CdsActivities( */ public void validate() { if (dynamics365CdsActivities() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dynamics365CdsActivities in model" @@ -57,4 +54,6 @@ public void validate() { dynamics365CdsActivities().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(Dynamics365DataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java index 09a23cddd4e3..d1ed289fd67c 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 @@ -5,16 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Common Data Service data type connection. */ @Fluent public final class Dynamics365DataConnectorDataTypesDynamics365CdsActivities extends DataConnectorDataTypeCommon { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(Dynamics365DataConnectorDataTypesDynamics365CdsActivities.class); - /** {@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 732134bf3e9a..d75c0f24e472 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An individual contact associated with this domain. */ @Fluent public final class EnrichmentDomainWhoisContact { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentDomainWhoisContact.class); - /* * 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 1ed53add22a1..869d7a774b30 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The set of contacts associated with this domain. */ @Fluent public final class EnrichmentDomainWhoisContacts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentDomainWhoisContacts.class); - /* * 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 2a942c945800..7a22dff870a6 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The whois record for a given domain. */ @Fluent public final class EnrichmentDomainWhoisDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentDomainWhoisDetails.class); - /* * 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 24ac38d4d0cf..545f2a28b66b 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The registrar associated with this domain. */ @Fluent public final class EnrichmentDomainWhoisRegistrarDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentDomainWhoisRegistrarDetails.class); - /* * 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 2030a199ee30..182172f2a926 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java @@ -18,7 +18,7 @@ public interface Entities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface Entities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities. + * @return all entities as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java index 8cee4f709b9d..aa1daf59c56e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java @@ -18,7 +18,7 @@ public interface EntitiesRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String entityId); @@ -38,7 +38,7 @@ public interface EntitiesRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java index 6246284ebcb0..8bb1c3f3934d 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 @@ -5,10 +5,8 @@ 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.EntityAnalyticsProperties; import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("EntityAnalytics") @Fluent public final class EntityAnalytics extends SettingsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityAnalytics.class); - /* * 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 518293c9886e..5c131c46fe76 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Entity common property bag. */ @Immutable public class EntityCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityCommonProperties.class); - /* * 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 f517e0fa2432..abd7aa68eac1 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The edge that connects the entity to the other entity. */ @Fluent public final class EntityEdges { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityEdges.class); - /* * 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 2de4c811db32..c2e487c0cb52 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.UUID; @@ -14,8 +12,6 @@ /** The parameters required to execute an expand operation on the given entity. */ @Fluent public final class EntityExpandParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityExpandParameters.class); - /* * 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 b843e7bb156f..f8558de18c34 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The expansion result values. */ @Fluent public final class EntityExpandResponseValue { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityExpandResponseValue.class); - /* * 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 new file mode 100644 index 000000000000..0d2682840793 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.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.fasterxml.jackson.annotation.JsonProperty; + +/** Map identifiers of a single entity. */ +@Fluent +public final class EntityFieldMapping { + /* + * Alert V3 identifier + */ + @JsonProperty(value = "identifier") + private String identifier; + + /* + * The value of the identifier + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the identifier property: Alert V3 identifier. + * + * @return the identifier value. + */ + public String identifier() { + return this.identifier; + } + + /** + * Set the identifier property: Alert V3 identifier. + * + * @param identifier the identifier value to set. + * @return the EntityFieldMapping object itself. + */ + public EntityFieldMapping withIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the value property: The value of the identifier. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the identifier. + * + * @param value the value value to set. + * @return the EntityFieldMapping object itself. + */ + public EntityFieldMapping withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java index 9f8a1b3bf66a..3182270cff50 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -15,8 +14,6 @@ /** The parameters required to execute insights operation on the given entity. */ @Fluent public final class EntityGetInsightsParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityGetInsightsParameters.class); - /* * The start timeline date, so the results returned are after this date. */ @@ -134,16 +131,18 @@ public EntityGetInsightsParameters withInsightQueryIds(List insightQueryId */ public void validate() { if (startTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property startTime in model EntityGetInsightsParameters")); } if (endTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property endTime in model EntityGetInsightsParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(EntityGetInsightsParameters.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java index 098117d63751..15d19b7473a9 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Entity insight Item. */ @Fluent public final class EntityInsightItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityInsightItem.class); - /* * 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 ec72cadb22ae..e04c157d5dc6 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The Time interval that the query actually executed on. */ @Fluent public final class EntityInsightItemQueryTimeInterval { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityInsightItemQueryTimeInterval.class); - /* * Insight query start time */ 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 70dc8eb442f3..0e160998fea5 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the entities. */ @Fluent public final class EntityList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityList.class); - /* * URL to fetch the next set of entities. */ @@ -64,11 +61,13 @@ public EntityList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model EntityList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(EntityList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java index 077f53e9b35e..b5081a9937a3 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Single entity mapping for the alert rule. */ @Fluent public final class EntityMapping { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityMapping.class); - /* * The V3 type of the mapped entity */ 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 50d839a5b6ee..d0f22a8e74b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java @@ -18,7 +18,7 @@ public interface EntityQueries { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,7 +32,7 @@ public interface EntityQueries { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java index f8c323c276c4..edd51be3360f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -22,8 +20,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Insight", value = InsightQueryItem.class)}) @Fluent public class EntityQueryItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryItem.class); - /* * Query Template ARM ID */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java index 069a9d1884e4..b1a3ce1e859b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An properties abstract Query item for entity. */ @Fluent public class EntityQueryItemProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryItemProperties.class); - /* * Data types for template */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java index 6a78ec9aba67..f5b1c7988945 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The EntityQueryItemPropertiesDataTypesItem model. */ @Fluent public final class EntityQueryItemPropertiesDataTypesItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryItemPropertiesDataTypesItem.class); - /* * Data type name */ 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 32d4eb730848..28db9eb06460 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the entity queries. */ @Fluent public final class EntityQueryList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryList.class); - /* * URL to fetch the next set of entity queries. */ @@ -64,11 +61,13 @@ public EntityQueryList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model EntityQueryList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(EntityQueryList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java index e82c1b7044a1..a767e8fea94d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the entity query templates. */ @Fluent public final class EntityQueryTemplateList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityQueryTemplateList.class); - /* * URL to fetch the next set of entity query templates. */ @@ -64,11 +61,13 @@ public EntityQueryTemplateList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model EntityQueryTemplateList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(EntityQueryTemplateList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java index 76bb341cc968..2d5356f7af94 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java @@ -18,7 +18,7 @@ public interface EntityQueryTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,10 +32,10 @@ public interface EntityQueryTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context); + String resourceGroupName, String workspaceName, Constant73 kind, Context context); /** * Gets an entity query. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java index 1c1d7a1e0633..0ba13feaa844 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -25,8 +23,6 @@ }) @Immutable public class EntityTimelineItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityTimelineItem.class); - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java index 034984cf6be8..5f024f5132c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,8 +13,6 @@ /** The parameters required to execute s timeline operation on the given entity. */ @Fluent public final class EntityTimelineParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityTimelineParameters.class); - /* * Array of timeline Item kinds. */ @@ -127,16 +124,18 @@ public EntityTimelineParameters withNumberOfBucket(Integer numberOfBucket) { */ public void validate() { if (startTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property startTime in model EntityTimelineParameters")); } if (endTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property endTime in model EntityTimelineParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(EntityTimelineParameters.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java index ff9cb25ed525..ed1b01e323bc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Event grouping settings property bag. */ @Fluent public final class EventGroupingSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventGroupingSettings.class); - /* * The event grouping aggregation kinds */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java index c974f4f3b2a4..368b2563e16c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; import com.azure.resourcemanager.securityinsights.fluent.models.ExpansionEntityQueriesProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("Expansion") @Fluent public final class ExpansionEntityQuery extends EntityQueryInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpansionEntityQuery.class); - /* * Expansion entity query properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java index 48d48953572a..efbe948a2a04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information of a specific aggregation in the expansion result. */ @Fluent public final class ExpansionResultAggregation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpansionResultAggregation.class); - /* * The common type of the aggregation. (for e.g. entity field name) */ @@ -128,10 +125,12 @@ public ExpansionResultAggregation withEntityKind(EntityKind entityKind) { */ public void validate() { if (entityKind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property entityKind in model ExpansionResultAggregation")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ExpansionResultAggregation.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java index eb231730e4c2..79231d5f4fcd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Expansion result metadata. */ @Fluent public final class ExpansionResultsMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpansionResultsMetadata.class); - /* * 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 68abbd7d0edf..05d0db1cba99 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 @@ -5,10 +5,8 @@ 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.EyesOnSettingsProperties; import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("EyesOn") @Fluent public final class EyesOn extends SettingsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EyesOn.class); - /* * 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 a241c73b4275..d01e4fca5f25 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A single field mapping of the mapped entity. */ @Fluent public final class FieldMapping { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FieldMapping.class); - /* * 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 22d7de5bc119..7cfc51143dbb 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.FileEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("File") @Fluent public final class FileEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileEntity.class); - /* * File entity properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java index 5f6cb69abbad..d6252ed9ffe6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.FileHashEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("FileHash") @Fluent public final class FileHashEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileHashEntity.class); - /* * FileHash entity properties */ 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 fb5a2c11ea87..792e517d8d10 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 @@ -5,10 +5,8 @@ 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.AlertRuleInner; import com.azure.resourcemanager.securityinsights.fluent.models.FusionAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Fusion") @Fluent public final class FusionAlertRule extends AlertRuleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionAlertRule.class); - /* * Fusion alert rule properties */ @@ -108,6 +104,53 @@ public FusionAlertRule withEnabled(Boolean enabled) { return this; } + /** + * Get the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.innerProperties() == null ? null : this.innerProperties().sourceSettings(); + } + + /** + * Set the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRule object itself. + */ + public FusionAlertRule withSourceSettings(List sourceSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleProperties(); + } + this.innerProperties().withSourceSettings(sourceSettings); + return this; + } + + /** + * Get the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @return the scenarioExclusionPatterns value. + */ + public List scenarioExclusionPatterns() { + return this.innerProperties() == null ? null : this.innerProperties().scenarioExclusionPatterns(); + } + + /** + * Set the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @param scenarioExclusionPatterns the scenarioExclusionPatterns value to set. + * @return the FusionAlertRule object itself. + */ + public FusionAlertRule withScenarioExclusionPatterns( + List scenarioExclusionPatterns) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleProperties(); + } + this.innerProperties().withScenarioExclusionPatterns(scenarioExclusionPatterns); + return this; + } + /** * Get the lastModifiedUtc property: The last time that this alert has been modified. * @@ -135,6 +178,15 @@ public List tactics() { return this.innerProperties() == null ? null : this.innerProperties().tactics(); } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java index 77ae4505b164..ce4da38707f0 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 @@ -5,10 +5,8 @@ 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.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.fluent.models.FusionAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Fusion") @Fluent public final class FusionAlertRuleTemplate extends AlertRuleTemplateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionAlertRuleTemplate.class); - /* * Fusion alert rule template properties */ @@ -37,52 +33,6 @@ private FusionAlertRuleTemplateProperties innerProperties() { return this.innerProperties; } - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * @@ -107,21 +57,21 @@ public FusionAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer aler } /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the lastUpdatedDateUtc value. + * @return the createdDateUtc value. */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); + public OffsetDateTime createdDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); } /** - * Get the createdDateUtc property: The time that this alert rule template has been added. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @return the createdDateUtc value. + * @return the lastUpdatedDateUtc value. */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); + public OffsetDateTime lastUpdatedDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); } /** @@ -171,7 +121,7 @@ public FusionAlertRuleTemplate withDisplayName(String displayName) { } /** - * Get the requiredDataConnectors property: The required data sources for this template. + * Get the requiredDataConnectors property: The required data connectors for this template. * * @return the requiredDataConnectors value. */ @@ -180,7 +130,7 @@ public List requiredDataConnectors() { } /** - * Set the requiredDataConnectors property: The required data sources for this template. + * Set the requiredDataConnectors property: The required data connectors for this template. * * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the FusionAlertRuleTemplate object itself. @@ -217,6 +167,98 @@ public FusionAlertRuleTemplate withStatus(TemplateStatus status) { return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + + /** + * Get the tactics property: The tactics of the alert rule template. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: The tactics of the alert rule template. + * + * @param tactics the tactics value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + + /** + * Get the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.innerProperties() == null ? null : this.innerProperties().sourceSettings(); + } + + /** + * Set the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withSourceSettings(List sourceSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withSourceSettings(sourceSettings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java new file mode 100644 index 000000000000..018fafeb7256 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a Fusion scenario exclusion patterns in Fusion detection. */ +@Fluent +public final class FusionScenarioExclusionPattern { + /* + * Scenario exclusion pattern. + */ + @JsonProperty(value = "exclusionPattern", required = true) + private String exclusionPattern; + + /* + * DateTime when scenario exclusion pattern is added in UTC. + */ + @JsonProperty(value = "dateAddedInUTC", required = true) + private String dateAddedInUtc; + + /** + * Get the exclusionPattern property: Scenario exclusion pattern. + * + * @return the exclusionPattern value. + */ + public String exclusionPattern() { + return this.exclusionPattern; + } + + /** + * Set the exclusionPattern property: Scenario exclusion pattern. + * + * @param exclusionPattern the exclusionPattern value to set. + * @return the FusionScenarioExclusionPattern object itself. + */ + public FusionScenarioExclusionPattern withExclusionPattern(String exclusionPattern) { + this.exclusionPattern = exclusionPattern; + return this; + } + + /** + * Get the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC. + * + * @return the dateAddedInUtc value. + */ + public String dateAddedInUtc() { + return this.dateAddedInUtc; + } + + /** + * Set the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC. + * + * @param dateAddedInUtc the dateAddedInUtc value to set. + * @return the FusionScenarioExclusionPattern object itself. + */ + public FusionScenarioExclusionPattern withDateAddedInUtc(String dateAddedInUtc) { + this.dateAddedInUtc = dateAddedInUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exclusionPattern() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property exclusionPattern in model FusionScenarioExclusionPattern")); + } + if (dateAddedInUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dateAddedInUtc in model FusionScenarioExclusionPattern")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FusionScenarioExclusionPattern.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java new file mode 100644 index 000000000000..c7b6d4360313 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.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; +import java.util.List; + +/** Represents a supported source signal configuration in Fusion detection. */ +@Fluent +public final class FusionSourceSettings { + /* + * Determines whether this source signal is enabled or disabled in Fusion + * detection. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Name of the Fusion source signal. Refer to Fusion alert rule template + * for supported values. + */ + @JsonProperty(value = "sourceName", required = true) + private String sourceName; + + /* + * Configuration for all source subtypes under this source signal consumed + * in fusion detection. + */ + @JsonProperty(value = "sourceSubTypes") + private List sourceSubTypes; + + /** + * Get the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. + * + * @param enabled the enabled value to set. + * @return the FusionSourceSettings object itself. + */ + public FusionSourceSettings withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the sourceName property: Name of the Fusion source signal. Refer to Fusion alert rule template for supported + * values. + * + * @return the sourceName value. + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Set the sourceName property: Name of the Fusion source signal. Refer to Fusion alert rule template for supported + * values. + * + * @param sourceName the sourceName value to set. + * @return the FusionSourceSettings object itself. + */ + public FusionSourceSettings withSourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + + /** + * Get the sourceSubTypes property: Configuration for all source subtypes under this source signal consumed in + * fusion detection. + * + * @return the sourceSubTypes value. + */ + public List sourceSubTypes() { + return this.sourceSubTypes; + } + + /** + * Set the sourceSubTypes property: Configuration for all source subtypes under this source signal consumed in + * fusion detection. + * + * @param sourceSubTypes the sourceSubTypes value to set. + * @return the FusionSourceSettings object itself. + */ + public FusionSourceSettings withSourceSubTypes(List sourceSubTypes) { + this.sourceSubTypes = sourceSubTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property sourceName in model FusionSourceSettings")); + } + if (sourceSubTypes() != null) { + sourceSubTypes().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FusionSourceSettings.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java new file mode 100644 index 000000000000..fa3de1276200 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a supported source subtype configuration under a source signal in Fusion detection. */ +@Fluent +public final class FusionSourceSubTypeSetting { + /* + * Determines whether this source subtype under source signal is enabled or + * disabled in Fusion detection. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * The Name of the source subtype under a given source signal in Fusion + * detection. Refer to Fusion alert rule template for supported values. + */ + @JsonProperty(value = "sourceSubTypeName", required = true) + private String sourceSubTypeName; + + /* + * The display name of source subtype under a source signal consumed in + * Fusion detection. + */ + @JsonProperty(value = "sourceSubTypeDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceSubTypeDisplayName; + + /* + * Severity configuration for a source subtype consumed in fusion + * detection. + */ + @JsonProperty(value = "severityFilters", required = true) + private FusionSubTypeSeverityFilter severityFilters; + + /** + * Get the enabled property: Determines whether this source subtype under source signal is enabled or disabled in + * Fusion detection. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this source subtype under source signal is enabled or disabled in + * Fusion detection. + * + * @param enabled the enabled value to set. + * @return the FusionSourceSubTypeSetting object itself. + */ + public FusionSourceSubTypeSetting withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the sourceSubTypeName property: The Name of the source subtype under a given source signal in Fusion + * detection. Refer to Fusion alert rule template for supported values. + * + * @return the sourceSubTypeName value. + */ + public String sourceSubTypeName() { + return this.sourceSubTypeName; + } + + /** + * Set the sourceSubTypeName property: The Name of the source subtype under a given source signal in Fusion + * detection. Refer to Fusion alert rule template for supported values. + * + * @param sourceSubTypeName the sourceSubTypeName value to set. + * @return the FusionSourceSubTypeSetting object itself. + */ + public FusionSourceSubTypeSetting withSourceSubTypeName(String sourceSubTypeName) { + this.sourceSubTypeName = sourceSubTypeName; + return this; + } + + /** + * Get the sourceSubTypeDisplayName property: The display name of source subtype under a source signal consumed in + * Fusion detection. + * + * @return the sourceSubTypeDisplayName value. + */ + public String sourceSubTypeDisplayName() { + return this.sourceSubTypeDisplayName; + } + + /** + * Get the severityFilters property: Severity configuration for a source subtype consumed in fusion detection. + * + * @return the severityFilters value. + */ + public FusionSubTypeSeverityFilter severityFilters() { + return this.severityFilters; + } + + /** + * Set the severityFilters property: Severity configuration for a source subtype consumed in fusion detection. + * + * @param severityFilters the severityFilters value to set. + * @return the FusionSourceSubTypeSetting object itself. + */ + public FusionSourceSubTypeSetting withSeverityFilters(FusionSubTypeSeverityFilter severityFilters) { + this.severityFilters = severityFilters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceSubTypeName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceSubTypeName in model FusionSourceSubTypeSetting")); + } + if (severityFilters() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property severityFilters in model FusionSourceSubTypeSetting")); + } else { + severityFilters().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FusionSourceSubTypeSetting.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java new file mode 100644 index 000000000000..066981b39ad6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents severity configuration for a source subtype consumed in Fusion detection. */ +@Fluent +public final class FusionSubTypeSeverityFilter { + /* + * Determines whether this source subtype supports severity configuration + * or not. + */ + @JsonProperty(value = "isSupported", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isSupported; + + /* + * Individual Severity configuration settings for a given source subtype + * consumed in Fusion detection. + */ + @JsonProperty(value = "filters") + private List filters; + + /** + * Get the isSupported property: Determines whether this source subtype supports severity configuration or not. + * + * @return the isSupported value. + */ + public Boolean isSupported() { + return this.isSupported; + } + + /** + * Get the filters property: Individual Severity configuration settings for a given source subtype consumed in + * Fusion detection. + * + * @return the filters value. + */ + public List filters() { + return this.filters; + } + + /** + * Set the filters property: Individual Severity configuration settings for a given source subtype consumed in + * Fusion detection. + * + * @param filters the filters value to set. + * @return the FusionSubTypeSeverityFilter object itself. + */ + public FusionSubTypeSeverityFilter withFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filters() != null) { + filters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java new file mode 100644 index 000000000000..f40d0ea5c263 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a Severity filter setting for a given source subtype consumed in Fusion detection. */ +@Fluent +public final class FusionSubTypeSeverityFiltersItem { + /* + * The Severity for a given source subtype consumed in Fusion detection. + */ + @JsonProperty(value = "severity", required = true) + private AlertSeverity severity; + + /* + * Determines whether this severity is enabled or disabled for this source + * subtype consumed in Fusion detection. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * Get the severity property: The Severity for a given source subtype consumed in Fusion detection. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The Severity for a given source subtype consumed in Fusion detection. + * + * @param severity the severity value to set. + * @return the FusionSubTypeSeverityFiltersItem object itself. + */ + public FusionSubTypeSeverityFiltersItem withSeverity(AlertSeverity severity) { + this.severity = severity; + return this; + } + + /** + * Get the enabled property: Determines whether this severity is enabled or disabled for this source subtype + * consumed in Fusion detection. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this severity is enabled or disabled for this source subtype + * consumed in Fusion detection. + * + * @param enabled the enabled value to set. + * @return the FusionSubTypeSeverityFiltersItem object itself. + */ + public FusionSubTypeSeverityFiltersItem withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (severity() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property severity in model FusionSubTypeSeverityFiltersItem")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FusionSubTypeSeverityFiltersItem.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java new file mode 100644 index 000000000000..fe0515d35e95 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents a source signal consumed in Fusion detection. */ +@Fluent +public final class FusionTemplateSourceSetting { + /* + * The name of a source signal consumed in Fusion detection. + */ + @JsonProperty(value = "sourceName", required = true) + private String sourceName; + + /* + * All supported source subtypes under this source signal consumed in + * fusion detection. + */ + @JsonProperty(value = "sourceSubTypes") + private List sourceSubTypes; + + /** + * Get the sourceName property: The name of a source signal consumed in Fusion detection. + * + * @return the sourceName value. + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Set the sourceName property: The name of a source signal consumed in Fusion detection. + * + * @param sourceName the sourceName value to set. + * @return the FusionTemplateSourceSetting object itself. + */ + public FusionTemplateSourceSetting withSourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + + /** + * Get the sourceSubTypes property: All supported source subtypes under this source signal consumed in fusion + * detection. + * + * @return the sourceSubTypes value. + */ + public List sourceSubTypes() { + return this.sourceSubTypes; + } + + /** + * Set the sourceSubTypes property: All supported source subtypes under this source signal consumed in fusion + * detection. + * + * @param sourceSubTypes the sourceSubTypes value to set. + * @return the FusionTemplateSourceSetting object itself. + */ + public FusionTemplateSourceSetting withSourceSubTypes(List sourceSubTypes) { + this.sourceSubTypes = sourceSubTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceName in model FusionTemplateSourceSetting")); + } + if (sourceSubTypes() != null) { + sourceSubTypes().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FusionTemplateSourceSetting.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java new file mode 100644 index 000000000000..6c5697524494 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a source subtype under a source signal consumed in Fusion detection. */ +@Fluent +public final class FusionTemplateSourceSubType { + /* + * The name of source subtype under a source signal consumed in Fusion + * detection. + */ + @JsonProperty(value = "sourceSubTypeName", required = true) + private String sourceSubTypeName; + + /* + * The display name of source subtype under a source signal consumed in + * Fusion detection. + */ + @JsonProperty(value = "sourceSubTypeDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceSubTypeDisplayName; + + /* + * Severity configuration available for a source subtype consumed in fusion + * detection. + */ + @JsonProperty(value = "severityFilter", required = true) + private FusionTemplateSubTypeSeverityFilter severityFilter; + + /** + * Get the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion + * detection. + * + * @return the sourceSubTypeName value. + */ + public String sourceSubTypeName() { + return this.sourceSubTypeName; + } + + /** + * Set the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion + * detection. + * + * @param sourceSubTypeName the sourceSubTypeName value to set. + * @return the FusionTemplateSourceSubType object itself. + */ + public FusionTemplateSourceSubType withSourceSubTypeName(String sourceSubTypeName) { + this.sourceSubTypeName = sourceSubTypeName; + return this; + } + + /** + * Get the sourceSubTypeDisplayName property: The display name of source subtype under a source signal consumed in + * Fusion detection. + * + * @return the sourceSubTypeDisplayName value. + */ + public String sourceSubTypeDisplayName() { + return this.sourceSubTypeDisplayName; + } + + /** + * Get the severityFilter property: Severity configuration available for a source subtype consumed in fusion + * detection. + * + * @return the severityFilter value. + */ + public FusionTemplateSubTypeSeverityFilter severityFilter() { + return this.severityFilter; + } + + /** + * Set the severityFilter property: Severity configuration available for a source subtype consumed in fusion + * detection. + * + * @param severityFilter the severityFilter value to set. + * @return the FusionTemplateSourceSubType object itself. + */ + public FusionTemplateSourceSubType withSeverityFilter(FusionTemplateSubTypeSeverityFilter severityFilter) { + this.severityFilter = severityFilter; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceSubTypeName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceSubTypeName in model FusionTemplateSourceSubType")); + } + if (severityFilter() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property severityFilter in model FusionTemplateSourceSubType")); + } else { + severityFilter().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FusionTemplateSourceSubType.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java new file mode 100644 index 000000000000..288b9e7725c3 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents severity configurations available for a source subtype consumed in Fusion detection. */ +@Fluent +public final class FusionTemplateSubTypeSeverityFilter { + /* + * Determines whether severity configuration is supported for this source + * subtype consumed in Fusion detection. + */ + @JsonProperty(value = "isSupported", required = true) + private boolean isSupported; + + /* + * List of all supported severities for this source subtype consumed in + * Fusion detection. + */ + @JsonProperty(value = "severityFilters") + private List severityFilters; + + /** + * Get the isSupported property: Determines whether severity configuration is supported for this source subtype + * consumed in Fusion detection. + * + * @return the isSupported value. + */ + public boolean isSupported() { + return this.isSupported; + } + + /** + * Set the isSupported property: Determines whether severity configuration is supported for this source subtype + * consumed in Fusion detection. + * + * @param isSupported the isSupported value to set. + * @return the FusionTemplateSubTypeSeverityFilter object itself. + */ + public FusionTemplateSubTypeSeverityFilter withIsSupported(boolean isSupported) { + this.isSupported = isSupported; + return this; + } + + /** + * Get the severityFilters property: List of all supported severities for this source subtype consumed in Fusion + * detection. + * + * @return the severityFilters value. + */ + public List severityFilters() { + return this.severityFilters; + } + + /** + * Set the severityFilters property: List of all supported severities for this source subtype consumed in Fusion + * detection. + * + * @param severityFilters the severityFilters value to set. + * @return the FusionTemplateSubTypeSeverityFilter object itself. + */ + public FusionTemplateSubTypeSeverityFilter withSeverityFilters(List severityFilters) { + this.severityFilters = severityFilters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java index ae9b9f03c933..3bfd9655d18b 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The geo-location context attached to the ip entity. */ @Immutable public final class GeoLocation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoLocation.class); - /* * 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 dceb5de6b44f..96700f60ec8e 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** GetInsights Query Errors. */ @Fluent public final class GetInsightsError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetInsightsError.class); - /* * the query kind */ @@ -104,9 +101,11 @@ public GetInsightsError withErrorMessage(String errorMessage) { */ public void validate() { if (errorMessage() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property errorMessage in model GetInsightsError")); } } + + private static final ClientLogger LOGGER = new ClientLogger(GetInsightsError.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java index 3aa3bdad333c..9265c345d4be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Get Insights result metadata. */ @Fluent public final class GetInsightsResultsMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetInsightsResultsMetadata.class); - /* * the total items found for the insights request */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java new file mode 100644 index 000000000000..07ee2d932d26 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resources created in GitHub repository. */ +@Fluent +public final class GitHubResourceInfo { + /* + * GitHub application installation id. + */ + @JsonProperty(value = "appInstallationId") + private String appInstallationId; + + /** + * Get the appInstallationId property: GitHub application installation id. + * + * @return the appInstallationId value. + */ + public String appInstallationId() { + return this.appInstallationId; + } + + /** + * Set the appInstallationId property: GitHub application installation id. + * + * @param appInstallationId the appInstallationId value to set. + * @return the GitHubResourceInfo object itself. + */ + public GitHubResourceInfo withAppInstallationId(String appInstallationId) { + this.appInstallationId = appInstallationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java index 5eec14465c7c..a0f7e3b56450 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The graph query to show the current data status. */ @Fluent public class GraphQueries { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GraphQueries.class); - /* * 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 7b64a876157b..1c766d961f03 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.util.List; @@ -14,8 +13,6 @@ /** Grouping configuration property bag. */ @Fluent public final class GroupingConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupingConfiguration.class); - /* * Grouping enabled */ @@ -218,16 +215,18 @@ public GroupingConfiguration withGroupByCustomDetails(List groupByCustom */ public void validate() { if (lookbackDuration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property lookbackDuration in model GroupingConfiguration")); } if (matchingMethod() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property matchingMethod in model GroupingConfiguration")); } } + + private static final ClientLogger LOGGER = new ClientLogger(GroupingConfiguration.class); } 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 7a8616936923..08e75c45b2b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.HostEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("Host") @Fluent public final class HostEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HostEntity.class); - /* * 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 e043b1c3ce00..3ea294c0b3b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.HuntingBookmarkProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("Bookmark") @Fluent public final class HuntingBookmark extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HuntingBookmark.class); - /* * HuntingBookmark entity properties */ 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 196d81f538bf..ca52c8342b5c 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Incident additional data property bag. */ @Immutable public final class IncidentAdditionalData { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentAdditionalData.class); - /* * The number of alerts in the incident */ @@ -39,12 +35,25 @@ public final class IncidentAdditionalData { @JsonProperty(value = "alertProductNames", access = JsonProperty.Access.WRITE_ONLY) private List alertProductNames; + /* + * The provider incident url to the incident in Microsoft 365 Defender + * portal + */ + @JsonProperty(value = "providerIncidentUrl", access = JsonProperty.Access.WRITE_ONLY) + private String providerIncidentUrl; + /* * The tactics associated with incident */ @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques associated with incident's tactics' + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertsCount property: The number of alerts in the incident. * @@ -81,6 +90,15 @@ public List alertProductNames() { return this.alertProductNames; } + /** + * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. + * + * @return the providerIncidentUrl value. + */ + public String providerIncidentUrl() { + return this.providerIncidentUrl; + } + /** * Get the tactics property: The tactics associated with incident. * @@ -90,6 +108,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques associated with incident's tactics'. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java index d74c5cd2de98..2304ded52a75 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentCommentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of incident comments. */ @Fluent public final class IncidentCommentList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentCommentList.class); - /* * URL to fetch the next set of comments. */ @@ -64,11 +61,13 @@ public IncidentCommentList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model IncidentCommentList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentCommentList.class); } 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 c1eeaeb4dc74..3e39bb7cd39c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java @@ -19,7 +19,7 @@ public interface IncidentComments { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -39,7 +39,7 @@ public interface IncidentComments { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java index 91ae65e2ed07..e5e61ba1fd0e 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Incident Configuration property bag. */ @Fluent public final class IncidentConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentConfiguration.class); - /* * 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 7302043080fa..bf4b77e68c26 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information of a specific aggregation in the incident related entities result. */ @Fluent public final class IncidentEntitiesResultsMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentEntitiesResultsMetadata.class); - /* * Total number of aggregations of the given kind in the incident related * entities result. @@ -74,10 +71,12 @@ public IncidentEntitiesResultsMetadata withEntityKind(EntityKind entityKind) { */ public void validate() { if (entityKind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property entityKind in model IncidentEntitiesResultsMetadata")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentEntitiesResultsMetadata.class); } 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 a85b46a449b1..e8ee0d18e29b 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes related incident information for the bookmark. */ @Fluent public final class IncidentInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentInfo.class); - /* * 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 a19b5fd6f937..c24c4a8522ea 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents an incident label. */ @Fluent public final class IncidentLabel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentLabel.class); - /* * The name of the label */ @@ -62,9 +59,11 @@ public IncidentLabelType labelType() { */ public void validate() { if (labelName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property labelName in model IncidentLabel")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentLabel.class); } 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 d1036f278737..35ab5f63d052 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java @@ -13,8 +13,8 @@ public final class IncidentLabelType extends ExpandableStringEnum value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model IncidentList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentList.class); } 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 8ec2616f03a6..ce00702657df 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** Information on the user an incident is assigned to. */ @Fluent public final class IncidentOwnerInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IncidentOwnerInfo.class); - /* * 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/AutomationRuleModifyPropertiesActionConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java similarity index 70% rename from sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesActionConfiguration.java rename to sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java index 2098daddb153..4a27bc0daa86 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesActionConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java @@ -5,28 +5,29 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration of the modify properties automation rule action. */ +/** The IncidentPropertiesAction model. */ @Fluent -public final class AutomationRuleModifyPropertiesActionConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutomationRuleModifyPropertiesActionConfiguration.class); +public final class IncidentPropertiesAction { + /* + * The severity of the incident + */ + @JsonProperty(value = "severity") + private IncidentSeverity severity; /* - * The reason the incident was closed + * The status of the incident */ - @JsonProperty(value = "classification") - private IncidentClassification classification; + @JsonProperty(value = "status") + private IncidentStatus status; /* - * Describes the reason the incident was closed + * The reason the incident was closed */ - @JsonProperty(value = "classificationComment") - private String classificationComment; + @JsonProperty(value = "classification") + private IncidentClassification classification; /* * The classification reason the incident was closed with @@ -35,66 +36,80 @@ public final class AutomationRuleModifyPropertiesActionConfiguration { private IncidentClassificationReason classificationReason; /* - * List of labels to add to the incident + * Describes the reason the incident was closed */ - @JsonProperty(value = "labels") - private List labels; + @JsonProperty(value = "classificationComment") + private String classificationComment; /* - * Describes a user that the incident is assigned to + * Information on the user an incident is assigned to */ @JsonProperty(value = "owner") private IncidentOwnerInfo owner; /* - * The severity of the incident + * List of labels to add to the incident */ - @JsonProperty(value = "severity") - private IncidentSeverity severity; + @JsonProperty(value = "labels") + private List labels; - /* - * The status of the incident + /** + * Get the severity property: The severity of the incident. + * + * @return the severity value. */ - @JsonProperty(value = "status") - private IncidentStatus status; + public IncidentSeverity severity() { + return this.severity; + } /** - * Get the classification property: The reason the incident was closed. + * Set the severity property: The severity of the incident. * - * @return the classification value. + * @param severity the severity value to set. + * @return the IncidentPropertiesAction object itself. */ - public IncidentClassification classification() { - return this.classification; + public IncidentPropertiesAction withSeverity(IncidentSeverity severity) { + this.severity = severity; + return this; } /** - * Set the classification property: The reason the incident was closed. + * Get the status property: The status of the incident. * - * @param classification the classification value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @return the status value. */ - public AutomationRuleModifyPropertiesActionConfiguration withClassification(IncidentClassification classification) { - this.classification = classification; + public IncidentStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the incident. + * + * @param status the status value to set. + * @return the IncidentPropertiesAction object itself. + */ + public IncidentPropertiesAction withStatus(IncidentStatus status) { + this.status = status; return this; } /** - * Get the classificationComment property: Describes the reason the incident was closed. + * Get the classification property: The reason the incident was closed. * - * @return the classificationComment value. + * @return the classification value. */ - public String classificationComment() { - return this.classificationComment; + public IncidentClassification classification() { + return this.classification; } /** - * Set the classificationComment property: Describes the reason the incident was closed. + * Set the classification property: The reason the incident was closed. * - * @param classificationComment the classificationComment value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @param classification the classification value to set. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withClassificationComment(String classificationComment) { - this.classificationComment = classificationComment; + public IncidentPropertiesAction withClassification(IncidentClassification classification) { + this.classification = classification; return this; } @@ -111,36 +126,35 @@ public IncidentClassificationReason classificationReason() { * Set the classificationReason property: The classification reason the incident was closed with. * * @param classificationReason the classificationReason value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withClassificationReason( - IncidentClassificationReason classificationReason) { + public IncidentPropertiesAction withClassificationReason(IncidentClassificationReason classificationReason) { this.classificationReason = classificationReason; return this; } /** - * Get the labels property: List of labels to add to the incident. + * Get the classificationComment property: Describes the reason the incident was closed. * - * @return the labels value. + * @return the classificationComment value. */ - public List labels() { - return this.labels; + public String classificationComment() { + return this.classificationComment; } /** - * Set the labels property: List of labels to add to the incident. + * Set the classificationComment property: Describes the reason the incident was closed. * - * @param labels the labels value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @param classificationComment the classificationComment value to set. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withLabels(List labels) { - this.labels = labels; + public IncidentPropertiesAction withClassificationComment(String classificationComment) { + this.classificationComment = classificationComment; return this; } /** - * Get the owner property: Describes a user that the incident is assigned to. + * Get the owner property: Information on the user an incident is assigned to. * * @return the owner value. */ @@ -149,53 +163,33 @@ public IncidentOwnerInfo owner() { } /** - * Set the owner property: Describes a user that the incident is assigned to. + * Set the owner property: Information on the user an incident is assigned to. * * @param owner the owner value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withOwner(IncidentOwnerInfo owner) { + public IncidentPropertiesAction withOwner(IncidentOwnerInfo owner) { this.owner = owner; return this; } /** - * Get the severity property: The severity of the incident. - * - * @return the severity value. - */ - public IncidentSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the incident. - * - * @param severity the severity value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. - */ - public AutomationRuleModifyPropertiesActionConfiguration withSeverity(IncidentSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the status property: The status of the incident. + * Get the labels property: List of labels to add to the incident. * - * @return the status value. + * @return the labels value. */ - public IncidentStatus status() { - return this.status; + public List labels() { + return this.labels; } /** - * Set the status property: The status of the incident. + * Set the labels property: List of labels to add to the incident. * - * @param status the status value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @param labels the labels value to set. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withStatus(IncidentStatus status) { - this.status = status; + public IncidentPropertiesAction withLabels(List labels) { + this.labels = labels; return this; } @@ -205,11 +199,11 @@ public AutomationRuleModifyPropertiesActionConfiguration withStatus(IncidentStat * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (labels() != null) { - labels().forEach(e -> e.validate()); - } if (owner() != null) { owner().validate(); } + if (labels() != null) { + labels().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java index 71579109594e..078c2fce6eb8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java @@ -20,7 +20,7 @@ public interface IncidentRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -40,7 +40,7 @@ public interface IncidentRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java index 66063dec857c..3a2710c7cad6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java @@ -10,6 +10,39 @@ /** Resource collection API of Incidents. */ public interface Incidents { + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + + /** + * Triggers playbook on a specific incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object along with {@link Response}. + */ + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); + /** * Gets all incidents. * @@ -18,7 +51,7 @@ public interface Incidents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -37,7 +70,7 @@ public interface Incidents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java index c15691f02f91..0efb0bc5aff8 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("Insight") @Fluent public final class InsightQueryItem extends EntityQueryItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightQueryItem.class); - /* * 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 6fc85b278017..e69737b5e3c8 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Represents Insight Query. */ @Fluent public final class InsightQueryItemProperties extends EntityQueryItemProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightQueryItemProperties.class); - /* * 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 944b5c724609..c9877e7f9273 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The activity query definitions. */ @Fluent public final class InsightQueryItemPropertiesAdditionalQuery { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightQueryItemPropertiesAdditionalQuery.class); - /* * 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 43576829c24e..f870634fb199 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The insight chart query. */ @Fluent public final class InsightQueryItemPropertiesDefaultTimeRange { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightQueryItemPropertiesDefaultTimeRange.class); - /* * 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 8e229956204d..6dd0b8e28f15 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 @@ -5,16 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The insight chart query. */ @Fluent public final class InsightQueryItemPropertiesReferenceTimeRange { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(InsightQueryItemPropertiesReferenceTimeRange.class); - /* * 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 5e4bcd9b3146..3c889abbed88 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The insight table query. */ @Fluent public final class InsightQueryItemPropertiesTableQuery { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightQueryItemPropertiesTableQuery.class); - /* * 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 437077c7307e..f9428faa609a 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 @@ -5,17 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem model. */ @Fluent public final class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.class); - /* * 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 628c36885641..ea811b7bdc9a 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 @@ -5,18 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem model. */ @Fluent public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.class); - /* * 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 cbbf6fa58d62..626304571d5c 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 @@ -5,17 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem model. */ @Fluent public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.class); - /* * 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 2a7ad50b751c..08c5f7cb09c2 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Query results for table insights query. */ @Fluent public final class InsightsTableResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightsTableResult.class); - /* * 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 be60e9c9ee14..486e7914039c 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The InsightsTableResultColumnsItem model. */ @Fluent public final class InsightsTableResultColumnsItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InsightsTableResultColumnsItem.class); - /* * 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 6fbd0d91cff3..227c38863a55 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Instruction steps to enable the connector. */ @Fluent public class InstructionSteps { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionSteps.class); - /* * 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 a2ea95557785..45cf764a6a76 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** The InstructionStepsInstructionsItem model. */ @Fluent public final class InstructionStepsInstructionsItem extends ConnectorInstructionModelBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InstructionStepsInstructionsItem.class); - /** {@inheritDoc} */ @Override public InstructionStepsInstructionsItem withParameters(Object parameters) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java new file mode 100644 index 000000000000..cf5ebc9db245 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.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.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.IoTCheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents IoT requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("IOT") +@Fluent +public final class IoTCheckRequirements extends DataConnectorsCheckRequirements { + /* + * IoT requirements check properties. + */ + @JsonProperty(value = "properties") + private IoTCheckRequirementsProperties innerProperties; + + /** + * Get the innerProperties property: IoT requirements check properties. + * + * @return the innerProperties value. + */ + private IoTCheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTCheckRequirements object itself. + */ + public IoTCheckRequirements withSubscriptionId(String subscriptionId) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTCheckRequirementsProperties(); + } + this.innerProperties().withSubscriptionId(subscriptionId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java new file mode 100644 index 000000000000..787fff5098c3 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.IoTDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents IoT data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("IOT") +@Fluent +public final class IoTDataConnector extends DataConnectorInner { + /* + * IoT data connector properties. + */ + @JsonProperty(value = "properties") + private IoTDataConnectorProperties innerProperties; + + /** + * Get the innerProperties property: IoT data connector properties. + * + * @return the innerProperties value. + */ + private IoTDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IoTDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTDataConnector object itself. + */ + public IoTDataConnector withSubscriptionId(String subscriptionId) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTDataConnectorProperties(); + } + this.innerProperties().withSubscriptionId(subscriptionId); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public AlertsDataTypeOfDataConnector dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the IoTDataConnector object itself. + */ + public IoTDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTDataConnectorProperties(); + } + this.innerProperties().withDataTypes(dataTypes); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java index 646c8be48910..dbadc9747841 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.IoTDeviceEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("IoTDevice") @Fluent public final class IoTDeviceEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTDeviceEntity.class); - /* * 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 d44529bf3e2e..beeac5a11a60 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.IpEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Ip") @Fluent public final class IpEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpEntity.class); - /* * Ip entity properties */ 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 be9a0df49f6a..82b2dcd15e14 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java @@ -52,6 +52,15 @@ public final class Kind extends ExpandableStringEnum { /** Static value Solution for Kind. */ public static final Kind SOLUTION = fromString("Solution"); + /** Static value AzureFunction for Kind. */ + public static final Kind AZURE_FUNCTION = fromString("AzureFunction"); + + /** Static value LogicAppsCustomConnector for Kind. */ + public static final Kind LOGIC_APPS_CUSTOM_CONNECTOR = fromString("LogicAppsCustomConnector"); + + /** Static value AutomationRule for Kind. */ + public static final Kind AUTOMATION_RULE = fromString("AutomationRule"); + /** * Creates or finds a Kind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java index c29aad4abc40..cfb66618baad 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data type for last data received. */ @Fluent public class LastDataReceivedDataType { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LastDataReceivedDataType.class); - /* * 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 4df5f08acb44..9538371ea2c4 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 @@ -5,10 +5,8 @@ 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.AlertRuleInner; import com.azure.resourcemanager.securityinsights.fluent.models.MLBehaviorAnalyticsAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("MLBehaviorAnalytics") @Fluent public final class MLBehaviorAnalyticsAlertRule extends AlertRuleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MLBehaviorAnalyticsAlertRule.class); - /* * MLBehaviorAnalytics alert rule properties */ @@ -135,6 +131,15 @@ public List tactics() { return this.innerProperties() == null ? null : this.innerProperties().tactics(); } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java index cba55a5dee28..3dc6cb43070c 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 @@ -5,10 +5,8 @@ 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.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.fluent.models.MLBehaviorAnalyticsAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("MLBehaviorAnalytics") @Fluent public final class MLBehaviorAnalyticsAlertRuleTemplate extends AlertRuleTemplateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MLBehaviorAnalyticsAlertRuleTemplate.class); - /* * MLBehaviorAnalytics alert rule template properties. */ @@ -61,7 +57,7 @@ public MLBehaviorAnalyticsAlertRuleTemplate withSeverity(AlertSeverity severity) } /** - * Get the tactics property: The tactics of the alert rule template. + * Get the tactics property: The tactics of the alert rule. * * @return the tactics value. */ @@ -70,7 +66,7 @@ public List tactics() { } /** - * Set the tactics property: The tactics of the alert rule template. + * Set the tactics property: The tactics of the alert rule. * * @param tactics the tactics value to set. * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. @@ -83,6 +79,29 @@ public MLBehaviorAnalyticsAlertRuleTemplate withTactics(List tacti return this; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. + */ + public MLBehaviorAnalyticsAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java index de9263b6a6bd..1f8aeca643cc 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailClusterEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("MailCluster") @Fluent public final class MailClusterEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MailClusterEntity.class); - /* * 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 9161d6490397..8d4c01ef2b89 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailMessageEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +20,6 @@ @JsonTypeName("MailMessage") @Fluent public final class MailMessageEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MailMessageEntity.class); - /* * 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 11addd831b33..9441ac626ef0 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailboxEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Mailbox") @Fluent public final class MailboxEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MailboxEntity.class); - /* * 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 a7d8aa4695b7..efcd2bbb952b 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MalwareEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Malware") @Fluent public final class MalwareEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MalwareEntity.class); - /* * 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 new file mode 100644 index 000000000000..1a25afdaaead --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** The ManualTriggerRequestBody model. */ +@Fluent +public final class ManualTriggerRequestBody { + /* + * The tenantId property. + */ + @JsonProperty(value = "tenantId") + private UUID tenantId; + + /* + * The logicAppsResourceId property. + */ + @JsonProperty(value = "logicAppsResourceId") + private String logicAppsResourceId; + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the ManualTriggerRequestBody object itself. + */ + public ManualTriggerRequestBody withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the logicAppsResourceId property: The logicAppsResourceId property. + * + * @return the logicAppsResourceId value. + */ + public String logicAppsResourceId() { + return this.logicAppsResourceId; + } + + /** + * Set the logicAppsResourceId property: The logicAppsResourceId property. + * + * @param logicAppsResourceId the logicAppsResourceId value to set. + * @return the ManualTriggerRequestBody object itself. + */ + public ManualTriggerRequestBody withLogicAppsResourceId(String logicAppsResourceId) { + this.logicAppsResourceId = logicAppsResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java index 89c5717e04ff..bf543c75aaaf 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 @@ -5,9 +5,7 @@ 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.McasCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("MicrosoftCloudAppSecurity") @Fluent public final class McasCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(McasCheckRequirements.class); - /* * MCAS (Microsoft Cloud App Security) requirements check properties. */ 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 7ce0e096cac9..4849da973db9 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.McasDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("MicrosoftCloudAppSecurity") @Fluent public final class McasDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(McasDataConnector.class); - /* * 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 95f476273a76..ced242cf519f 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for MCAS (Microsoft Cloud App Security) data connector. */ @Fluent public final class McasDataConnectorDataTypes extends AlertsDataTypeOfDataConnector { - @JsonIgnore private final ClientLogger logger = new ClientLogger(McasDataConnectorDataTypes.class); - /* * 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 70038344124e..9f0d773cb2e0 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 @@ -5,9 +5,7 @@ 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.MdatpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("MicrosoftDefenderAdvancedThreatProtection") @Fluent public final class MdatpCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MdatpCheckRequirements.class); - /* * MDATP (Microsoft Defender Advanced Threat Protection) requirements check * properties. 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 f5c1ea4bf0a7..1b58df68db1a 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.MdatpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("MicrosoftDefenderAdvancedThreatProtection") @Fluent public final class MdatpDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MdatpDataConnector.class); - /* * 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 b22cc01381a5..568297b27c57 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Publisher or creator of the content item. */ @Fluent public final class MetadataAuthor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataAuthor.class); - /* * 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 f1b34af50c70..d2101c1cc1cf 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** ies for the solution content item. */ @Fluent public final class MetadataCategories { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataCategories.class); - /* * 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 f641c8057a04..e06c653c31e9 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class MetadataDependencies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataDependencies.class); - /* * 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 075718b04bfa..a5a93f7aa39f 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the metadata. */ @Fluent public final class MetadataList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataList.class); - /* * Array of metadata. */ @@ -64,11 +61,13 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model MetadataList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetadataList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java index 8a601c815edd..9a346deb899c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java @@ -138,6 +138,58 @@ public interface MetadataModel { */ LocalDate lastPublishDate(); + /** + * Gets the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + String customVersion(); + + /** + * Gets the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + String contentSchemaVersion(); + + /** + * Gets the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @return the icon value. + */ + String icon(); + + /** + * Gets the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + List threatAnalysisTactics(); + + /** + * Gets the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + List threatAnalysisTechniques(); + + /** + * Gets the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + List previewImages(); + + /** + * Gets the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + List previewImagesDark(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner object. * @@ -182,7 +234,14 @@ interface WithCreate DefinitionStages.WithCategories, DefinitionStages.WithProviders, DefinitionStages.WithFirstPublishDate, - DefinitionStages.WithLastPublishDate { + DefinitionStages.WithLastPublishDate, + DefinitionStages.WithCustomVersion, + DefinitionStages.WithContentSchemaVersion, + DefinitionStages.WithIcon, + DefinitionStages.WithThreatAnalysisTactics, + DefinitionStages.WithThreatAnalysisTechniques, + DefinitionStages.WithPreviewImages, + DefinitionStages.WithPreviewImagesDark { /** * Executes the create request. * @@ -342,6 +401,84 @@ interface WithLastPublishDate { */ WithCreate withLastPublishDate(LocalDate lastPublishDate); } + /** The stage of the MetadataModel definition allowing to specify customVersion. */ + interface WithCustomVersion { + /** + * Specifies the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion The custom version of the content. A optional free text. + * @return the next definition stage. + */ + WithCreate withCustomVersion(String customVersion); + } + /** The stage of the MetadataModel definition allowing to specify contentSchemaVersion. */ + interface WithContentSchemaVersion { + /** + * Specifies the contentSchemaVersion property: Schema version of the content. Can be used to distinguish + * between different flow based on the schema version. + * + * @param contentSchemaVersion Schema version of the content. Can be used to distinguish between different + * flow based on the schema version. + * @return the next definition stage. + */ + WithCreate withContentSchemaVersion(String contentSchemaVersion); + } + /** The stage of the MetadataModel definition allowing to specify icon. */ + interface WithIcon { + /** + * Specifies the icon property: the icon identifier. this id can later be fetched from the solution + * template. + * + * @param icon the icon identifier. this id can later be fetched from the solution template. + * @return the next definition stage. + */ + WithCreate withIcon(String icon); + } + /** The stage of the MetadataModel definition allowing to specify threatAnalysisTactics. */ + interface WithThreatAnalysisTactics { + /** + * Specifies the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the tactics the resource covers. + * @return the next definition stage. + */ + WithCreate withThreatAnalysisTactics(List threatAnalysisTactics); + } + /** The stage of the MetadataModel definition allowing to specify threatAnalysisTechniques. */ + interface WithThreatAnalysisTechniques { + /** + * Specifies the threatAnalysisTechniques property: the techniques the resource covers, these have to be + * aligned with the tactics being used. + * + * @param threatAnalysisTechniques the techniques the resource covers, these have to be aligned with the + * tactics being used. + * @return the next definition stage. + */ + WithCreate withThreatAnalysisTechniques(List threatAnalysisTechniques); + } + /** The stage of the MetadataModel definition allowing to specify previewImages. */ + interface WithPreviewImages { + /** + * Specifies the previewImages property: preview image file names. These will be taken from the solution + * artifacts. + * + * @param previewImages preview image file names. These will be taken from the solution artifacts. + * @return the next definition stage. + */ + WithCreate withPreviewImages(List previewImages); + } + /** The stage of the MetadataModel definition allowing to specify previewImagesDark. */ + interface WithPreviewImagesDark { + /** + * Specifies the previewImagesDark property: preview image file names. These will be taken from the solution + * artifacts. used for dark theme support. + * + * @param previewImagesDark preview image file names. These will be taken from the solution artifacts. used + * for dark theme support. + * @return the next definition stage. + */ + WithCreate withPreviewImagesDark(List previewImagesDark); + } } /** * Begins update for the MetadataModel resource. @@ -364,7 +501,14 @@ interface Update UpdateStages.WithCategories, UpdateStages.WithProviders, UpdateStages.WithFirstPublishDate, - UpdateStages.WithLastPublishDate { + UpdateStages.WithLastPublishDate, + UpdateStages.WithCustomVersion, + UpdateStages.WithContentSchemaVersion, + UpdateStages.WithIcon, + UpdateStages.WithThreatAnalysisTactics, + UpdateStages.WithThreatAnalysisTechniques, + UpdateStages.WithPreviewImages, + UpdateStages.WithPreviewImagesDark { /** * Executes the update request. * @@ -526,6 +670,84 @@ interface WithLastPublishDate { */ Update withLastPublishDate(LocalDate lastPublishDate); } + /** The stage of the MetadataModel update allowing to specify customVersion. */ + interface WithCustomVersion { + /** + * Specifies the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion The custom version of the content. A optional free text. + * @return the next definition stage. + */ + Update withCustomVersion(String customVersion); + } + /** The stage of the MetadataModel update allowing to specify contentSchemaVersion. */ + interface WithContentSchemaVersion { + /** + * Specifies the contentSchemaVersion property: Schema version of the content. Can be used to distinguish + * between different flow based on the schema version. + * + * @param contentSchemaVersion Schema version of the content. Can be used to distinguish between different + * flow based on the schema version. + * @return the next definition stage. + */ + Update withContentSchemaVersion(String contentSchemaVersion); + } + /** The stage of the MetadataModel update allowing to specify icon. */ + interface WithIcon { + /** + * Specifies the icon property: the icon identifier. this id can later be fetched from the solution + * template. + * + * @param icon the icon identifier. this id can later be fetched from the solution template. + * @return the next definition stage. + */ + Update withIcon(String icon); + } + /** The stage of the MetadataModel update allowing to specify threatAnalysisTactics. */ + interface WithThreatAnalysisTactics { + /** + * Specifies the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the tactics the resource covers. + * @return the next definition stage. + */ + Update withThreatAnalysisTactics(List threatAnalysisTactics); + } + /** The stage of the MetadataModel update allowing to specify threatAnalysisTechniques. */ + interface WithThreatAnalysisTechniques { + /** + * Specifies the threatAnalysisTechniques property: the techniques the resource covers, these have to be + * aligned with the tactics being used. + * + * @param threatAnalysisTechniques the techniques the resource covers, these have to be aligned with the + * tactics being used. + * @return the next definition stage. + */ + Update withThreatAnalysisTechniques(List threatAnalysisTechniques); + } + /** The stage of the MetadataModel update allowing to specify previewImages. */ + interface WithPreviewImages { + /** + * Specifies the previewImages property: preview image file names. These will be taken from the solution + * artifacts. + * + * @param previewImages preview image file names. These will be taken from the solution artifacts. + * @return the next definition stage. + */ + Update withPreviewImages(List previewImages); + } + /** The stage of the MetadataModel update allowing to specify previewImagesDark. */ + interface WithPreviewImagesDark { + /** + * Specifies the previewImagesDark property: preview image file names. These will be taken from the solution + * artifacts. used for dark theme support. + * + * @param previewImagesDark preview image file names. These will be taken from the solution artifacts. used + * for dark theme support. + * @return the next definition stage. + */ + Update withPreviewImagesDark(List previewImagesDark); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java index 8d9bdd6f4199..7556f02585fb 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 @@ -5,9 +5,7 @@ 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.MetadataPropertiesPatch; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -15,8 +13,6 @@ /** Metadata patch request body. */ @Fluent public final class MetadataPatch extends ResourceWithEtag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataPatch.class); - /* * Metadata patch request body */ @@ -329,6 +325,173 @@ public MetadataPatch withLastPublishDate(LocalDate lastPublishDate) { return this; } + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.innerProperties() == null ? null : this.innerProperties().customVersion(); + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withCustomVersion(String customVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withCustomVersion(customVersion); + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @return the icon value. + */ + public String icon() { + return this.innerProperties() == null ? null : this.innerProperties().icon(); + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @param icon the icon value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withIcon(icon); + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTechniques(); + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.innerProperties() == null ? null : this.innerProperties().previewImages(); + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withPreviewImages(List previewImages) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withPreviewImages(previewImages); + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.innerProperties() == null ? null : this.innerProperties().previewImagesDark(); + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withPreviewImagesDark(List previewImagesDark) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withPreviewImagesDark(previewImagesDark); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java index aa647f834f85..a05ef180e74d 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The original source of the content item, where it comes from. */ @Fluent public final class MetadataSource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSource.class); - /* * Source type of the content */ @@ -100,9 +97,11 @@ public MetadataSource withSourceId(String sourceId) { */ public void validate() { if (kind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property kind in model MetadataSource")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetadataSource.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java index 72e05a5887b7..a25d51b568be 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Support information for the content item. */ @Fluent public final class MetadataSupport { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSupport.class); - /* * Type of support for content item */ @@ -125,9 +122,11 @@ public MetadataSupport withLink(String link) { */ public void validate() { if (tier() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property tier in model MetadataSupport")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetadataSupport.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java index f35c008b4586..b8be150a2a19 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java @@ -18,7 +18,7 @@ public interface Metadatas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -36,7 +36,7 @@ public interface Metadatas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java index 22081611bf76..201a74e0f4e1 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 @@ -5,10 +5,8 @@ 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.AlertRuleInner; import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftSecurityIncidentCreationAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("MicrosoftSecurityIncidentCreation") @Fluent public final class MicrosoftSecurityIncidentCreationAlertRule extends AlertRuleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MicrosoftSecurityIncidentCreationAlertRule.class); - /* * 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 ea81f058d004..5a6e176fc2a3 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 @@ -6,17 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** MicrosoftSecurityIncidentCreation rule common property bag. */ @Fluent public class MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.class); - /* * the alerts' displayNames on which the cases will be generated */ @@ -132,11 +127,14 @@ public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties withSeverities */ public void validate() { if (productFilter() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property productFilter in model" + " MicrosoftSecurityIncidentCreationAlertRuleCommonProperties")); } } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.class); } 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 4924b2270108..d908982016d7 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 @@ -5,10 +5,8 @@ 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.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,9 +18,6 @@ @JsonTypeName("MicrosoftSecurityIncidentCreation") @Fluent public final class MicrosoftSecurityIncidentCreationAlertRuleTemplate extends AlertRuleTemplateInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleTemplate.class); - /* * MicrosoftSecurityIncidentCreation rule template properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java index a764a311663d..95cb0a532898 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java @@ -5,9 +5,7 @@ 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.MstiCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("MicrosoftThreatIntelligence") @Fluent public final class MstiCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MstiCheckRequirements.class); - /* * Microsoft Threat Intelligence requirements check properties. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java index 792084b88fb6..55c79f1bebab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.MstiDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("MicrosoftThreatIntelligence") @Fluent public final class MstiDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MstiDataConnector.class); - /* * Microsoft Threat Intelligence data connector properties. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java index 2ee2b4c5e334..2c1077694cfd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Microsoft Threat Intelligence Platforms data connector. */ @Fluent public final class MstiDataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MstiDataConnectorDataTypes.class); - /* * Data type for Microsoft Threat Intelligence Platforms data connector. */ @@ -77,7 +74,7 @@ public MstiDataConnectorDataTypes withMicrosoftEmergingThreatFeed( */ public void validate() { if (bingSafetyPhishingUrl() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property bingSafetyPhishingUrl in model MstiDataConnectorDataTypes")); @@ -85,7 +82,7 @@ public void validate() { bingSafetyPhishingUrl().validate(); } if (microsoftEmergingThreatFeed() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property microsoftEmergingThreatFeed in model MstiDataConnectorDataTypes")); @@ -93,4 +90,6 @@ public void validate() { microsoftEmergingThreatFeed().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java index 99b3574bec33..3eee77b51ac3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java @@ -6,15 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data type for Microsoft Threat Intelligence Platforms data connector. */ @Fluent public final class MstiDataConnectorDataTypesBingSafetyPhishingUrl extends DataConnectorDataTypeCommon { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MstiDataConnectorDataTypesBingSafetyPhishingUrl.class); - /* * lookback period */ @@ -57,11 +53,13 @@ public MstiDataConnectorDataTypesBingSafetyPhishingUrl withState(DataTypeState s public void validate() { super.validate(); if (lookbackPeriod() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property lookbackPeriod in model" + " MstiDataConnectorDataTypesBingSafetyPhishingUrl")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorDataTypesBingSafetyPhishingUrl.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java index b767f5e2fac5..29ab116cee8f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java @@ -6,15 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data type for Microsoft Threat Intelligence Platforms data connector. */ @Fluent public final class MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed extends DataConnectorDataTypeCommon { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.class); - /* * lookback period */ @@ -57,11 +53,14 @@ public MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed withState(DataTypeS public void validate() { super.validate(); if (lookbackPeriod() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property lookbackPeriod in model" + " MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed")); } } + + private static final ClientLogger LOGGER = + new ClientLogger(MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java index 530eab6fc0b7..074527921be7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java @@ -5,9 +5,7 @@ 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.MtpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("MicrosoftThreatProtection") @Fluent public final class MtpCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MtpCheckRequirements.class); - /* * MTP (Microsoft Threat Protection) requirements check properties. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java index b965ba518bf2..8c6b30014f43 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.MtpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("MicrosoftThreatProtection") @Fluent public final class MtpDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MtpDataConnector.class); - /* * MTP (Microsoft Threat Protection) data connector properties. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java index 9388cae2cff1..27fa2a5c2d9b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Microsoft Threat Protection Platforms data connector. */ @Fluent public final class MtpDataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MtpDataConnectorDataTypes.class); - /* * Data type for Microsoft Threat Protection Platforms data connector. */ @@ -47,7 +44,7 @@ public MtpDataConnectorDataTypes withIncidents(MtpDataConnectorDataTypesIncident */ public void validate() { if (incidents() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property incidents in model MtpDataConnectorDataTypes")); @@ -55,4 +52,6 @@ public void validate() { incidents().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java index 110dd684be3d..0b347d9db7b6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Data type for Microsoft Threat Protection Platforms data connector. */ @Fluent public final class MtpDataConnectorDataTypesIncidents extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MtpDataConnectorDataTypesIncidents.class); - /** {@inheritDoc} */ @Override public MtpDataConnectorDataTypesIncidents withState(DataTypeState state) { 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 833c5896c25d..49fe39cfa804 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 @@ -5,21 +5,21 @@ 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.AlertRuleInner; import com.azure.resourcemanager.securityinsights.fluent.models.NrtAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; /** Represents NRT alert rule. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("NRT") @Fluent public final class NrtAlertRule extends AlertRuleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NrtAlertRule.class); - /* * NRT alert rule properties */ @@ -42,6 +42,368 @@ public NrtAlertRule withEtag(String etag) { return this; } + /** + * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @return the alertRuleTemplateName value. + */ + public String alertRuleTemplateName() { + return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); + } + + /** + * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @param alertRuleTemplateName the alertRuleTemplateName value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); + return this; + } + + /** + * Get the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @return the templateVersion value. + */ + public String templateVersion() { + return this.innerProperties() == null ? null : this.innerProperties().templateVersion(); + } + + /** + * Set the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @param templateVersion the templateVersion value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withTemplateVersion(String templateVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withTemplateVersion(templateVersion); + return this; + } + + /** + * Get the description property: The description of the alert rule. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the alert rule. + * + * @param description the description value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the query property: The query that creates alerts for this rule. + * + * @return the query value. + */ + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); + } + + /** + * Set the query property: The query that creates alerts for this rule. + * + * @param query the query value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withQuery(String query) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withQuery(query); + return this; + } + + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + + /** + * Get the displayName property: The display name for alerts created by this alert rule. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: The display name for alerts created by this alert rule. + * + * @param displayName the displayName value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @param enabled the enabled value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the lastModifiedUtc property: The last time that this alert rule has been modified. + * + * @return the lastModifiedUtc value. + */ + public OffsetDateTime lastModifiedUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); + } + + /** + * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @return the suppressionDuration value. + */ + public Duration suppressionDuration() { + return this.innerProperties() == null ? null : this.innerProperties().suppressionDuration(); + } + + /** + * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @param suppressionDuration the suppressionDuration value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSuppressionDuration(Duration suppressionDuration) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSuppressionDuration(suppressionDuration); + return this; + } + + /** + * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @return the suppressionEnabled value. + */ + public Boolean suppressionEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().suppressionEnabled(); + } + + /** + * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @param suppressionEnabled the suppressionEnabled value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSuppressionEnabled(Boolean suppressionEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSuppressionEnabled(suppressionEnabled); + return this; + } + + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + + /** + * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @return the incidentConfiguration value. + */ + public IncidentConfiguration incidentConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().incidentConfiguration(); + } + + /** + * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @param incidentConfiguration the incidentConfiguration value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withIncidentConfiguration(incidentConfiguration); + return this; + } + + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.innerProperties() == null ? null : this.innerProperties().customDetails(); + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withCustomDetails(Map customDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withCustomDetails(customDetails); + return this; + } + + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withEntityMappings(List entityMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withEntityMappings(entityMappings); + return this; + } + + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java index 8d6ab80cffbb..5d8bf2a525f3 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 @@ -5,10 +5,8 @@ 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.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.fluent.models.NrtAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("NRT") @Fluent public final class NrtAlertRuleTemplate extends AlertRuleTemplateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NrtAlertRuleTemplate.class); - /* * NRT alert rule template properties */ @@ -84,29 +80,6 @@ public NrtAlertRuleTemplate withSeverity(AlertSeverity severity) { return this; } - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - /** * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For * example <1.0.2>. @@ -201,6 +174,52 @@ public NrtAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertD return this; } + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the NrtAlertRuleTemplate object itself. + */ + public NrtAlertRuleTemplate withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleTemplateProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the NrtAlertRuleTemplate object itself. + */ + public NrtAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java new file mode 100644 index 000000000000..8ed7cfef085e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectCheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office365 Project requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Office365Project") +@Fluent +public final class Office365ProjectCheckRequirements extends DataConnectorsCheckRequirements { + /* + * Office365 Project requirements check properties. + */ + @JsonProperty(value = "properties") + private Office365ProjectCheckRequirementsProperties innerProperties; + + /** + * Get the innerProperties property: Office365 Project requirements check properties. + * + * @return the innerProperties value. + */ + private Office365ProjectCheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java new file mode 100644 index 000000000000..bafc9102b1dd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The available data types for Office Microsoft Project data connector. */ +@Fluent +public final class Office365ProjectConnectorDataTypes { + /* + * Logs data type. + */ + @JsonProperty(value = "logs", required = true) + private Office365ProjectConnectorDataTypesLogs logs; + + /** + * Get the logs property: Logs data type. + * + * @return the logs value. + */ + public Office365ProjectConnectorDataTypesLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs data type. + * + * @param logs the logs value to set. + * @return the Office365ProjectConnectorDataTypes object itself. + */ + public Office365ProjectConnectorDataTypes withLogs(Office365ProjectConnectorDataTypesLogs logs) { + this.logs = logs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logs() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logs in model Office365ProjectConnectorDataTypes")); + } else { + logs().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Office365ProjectConnectorDataTypes.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java new file mode 100644 index 000000000000..80908337be80 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.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.models; + +import com.azure.core.annotation.Fluent; + +/** Logs data type. */ +@Fluent +public final class Office365ProjectConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** {@inheritDoc} */ + @Override + public Office365ProjectConnectorDataTypesLogs withState(DataTypeState state) { + super.withState(state); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java new file mode 100644 index 000000000000..7665b6940195 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office Microsoft Project data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Office365Project") +@Fluent +public final class Office365ProjectDataConnector extends DataConnectorInner { + /* + * Office Microsoft Project data connector properties. + */ + @JsonProperty(value = "properties") + private Office365ProjectDataConnectorProperties innerProperties; + + /** + * Get the innerProperties property: Office Microsoft Project data connector properties. + * + * @return the innerProperties value. + */ + private Office365ProjectDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public Office365ProjectDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public Office365ProjectConnectorDataTypes dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the Office365ProjectDataConnector object itself. + */ + public Office365ProjectDataConnector withDataTypes(Office365ProjectConnectorDataTypes dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new Office365ProjectDataConnectorProperties(); + } + this.innerProperties().withDataTypes(dataTypes); + return this; + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the Office365ProjectDataConnector object itself. + */ + public Office365ProjectDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new Office365ProjectDataConnectorProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java index 1cfd946362e5..8609fcc19116 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 @@ -5,9 +5,7 @@ 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.OfficeAtpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("OfficeATP") @Fluent public final class OfficeAtpCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeAtpCheckRequirements.class); - /* * OfficeATP (Office 365 Advanced Threat Protection) requirements check * properties. 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 29aa2f6389be..0672ddc33b81 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.OfficeAtpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("OfficeATP") @Fluent public final class OfficeAtpDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeAtpDataConnector.class); - /* * 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 7157f1b0f3f8..c82170f9180d 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the office365 consents. */ @Fluent public final class OfficeConsentList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeConsentList.class); - /* * URL to fetch the next set of office consents. */ @@ -64,11 +61,13 @@ public OfficeConsentList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model OfficeConsentList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(OfficeConsentList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java index 5d2cbd593e0d..ed83191305b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java @@ -18,7 +18,7 @@ public interface OfficeConsents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface OfficeConsents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java index 79408d2e705c..2fb508346db8 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.OfficeDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("Office365") @Fluent public final class OfficeDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeDataConnector.class); - /* * 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 b677200c53a9..f96e94afc749 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for office data connector. */ @Fluent public final class OfficeDataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeDataConnectorDataTypes.class); - /* * Exchange data type connection. */ @@ -99,7 +96,7 @@ public OfficeDataConnectorDataTypes withTeams(OfficeDataConnectorDataTypesTeams */ public void validate() { if (exchange() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property exchange in model OfficeDataConnectorDataTypes")); @@ -107,7 +104,7 @@ public void validate() { exchange().validate(); } if (sharePoint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sharePoint in model OfficeDataConnectorDataTypes")); @@ -115,7 +112,7 @@ public void validate() { sharePoint().validate(); } if (teams() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property teams in model OfficeDataConnectorDataTypes")); @@ -123,4 +120,6 @@ public void validate() { teams().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(OfficeDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java index aad232ee7797..f4bb9c178fe0 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Exchange data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesExchange extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeDataConnectorDataTypesExchange.class); - /** {@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 6a396be856ab..85b62eaef4d0 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** SharePoint data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesSharePoint extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeDataConnectorDataTypesSharePoint.class); - /** {@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 97a7e28e9a7e..a16d1b5ddc04 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Teams data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesTeams extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeDataConnectorDataTypesTeams.class); - /** {@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 b949ff3c66c5..d353f41cf461 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 @@ -5,9 +5,7 @@ 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.OfficeIrmCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("OfficeIRM") @Fluent public final class OfficeIrmCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeIrmCheckRequirements.class); - /* * OfficeIRM (Microsoft Insider Risk Management) requirements check * properties. 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 54834b763a9d..0a26b9e45492 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.OfficeIrmDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("OfficeIRM") @Fluent public final class OfficeIrmDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficeIrmDataConnector.class); - /* * 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 new file mode 100644 index 000000000000..8e52f4d91bb2 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBICheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office PowerBI requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("OfficePowerBI") +@Fluent +public final class OfficePowerBICheckRequirements extends DataConnectorsCheckRequirements { + /* + * Office Power BI requirements check properties. + */ + @JsonProperty(value = "properties") + private OfficePowerBICheckRequirementsProperties innerProperties; + + /** + * Get the innerProperties property: Office Power BI requirements check properties. + * + * @return the innerProperties value. + */ + private OfficePowerBICheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java new file mode 100644 index 000000000000..42b1400cfcf4 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The available data types for Office Microsoft PowerBI data connector. */ +@Fluent +public final class OfficePowerBIConnectorDataTypes { + /* + * Logs data type. + */ + @JsonProperty(value = "logs", required = true) + private OfficePowerBIConnectorDataTypesLogs logs; + + /** + * Get the logs property: Logs data type. + * + * @return the logs value. + */ + public OfficePowerBIConnectorDataTypesLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs data type. + * + * @param logs the logs value to set. + * @return the OfficePowerBIConnectorDataTypes object itself. + */ + public OfficePowerBIConnectorDataTypes withLogs(OfficePowerBIConnectorDataTypesLogs logs) { + this.logs = logs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logs() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logs in model OfficePowerBIConnectorDataTypes")); + } else { + logs().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OfficePowerBIConnectorDataTypes.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java new file mode 100644 index 000000000000..0e71c0fd1cad --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.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.models; + +import com.azure.core.annotation.Fluent; + +/** Logs data type. */ +@Fluent +public final class OfficePowerBIConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** {@inheritDoc} */ + @Override + public OfficePowerBIConnectorDataTypesLogs withState(DataTypeState state) { + super.withState(state); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java new file mode 100644 index 000000000000..2c7496612394 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBIDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office Microsoft PowerBI data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("OfficePowerBI") +@Fluent +public final class OfficePowerBIDataConnector extends DataConnectorInner { + /* + * Office Microsoft PowerBI data connector properties. + */ + @JsonProperty(value = "properties") + private OfficePowerBIDataConnectorProperties innerProperties; + + /** + * Get the innerProperties property: Office Microsoft PowerBI data connector properties. + * + * @return the innerProperties value. + */ + private OfficePowerBIDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public OfficePowerBIDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public OfficePowerBIConnectorDataTypes dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the OfficePowerBIDataConnector object itself. + */ + public OfficePowerBIDataConnector withDataTypes(OfficePowerBIConnectorDataTypes dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficePowerBIDataConnectorProperties(); + } + this.innerProperties().withDataTypes(dataTypes); + return this; + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficePowerBIDataConnector object itself. + */ + public OfficePowerBIDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficePowerBIDataConnectorProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java index 7a6447e2d0b2..54967890e46e 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of the operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Description of the operation */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java index 16a8948448cd..cb4d4d82cf5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java index 22471deec814..47df47f99519 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Lists the operations available in the SecurityInsights RP. */ @Fluent public final class OperationsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsList.class); - /* * URL to fetch the next set of operations. */ @@ -64,11 +61,13 @@ public OperationsList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model OperationsList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java index 861229ce1f25..cfeebee1b045 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Permissions required for the connector. */ @Fluent public final class Permissions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Permissions.class); - /* * 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 cd107227bd9f..943909826a2e 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** The PermissionsCustomsItem model. */ @Fluent public final class PermissionsCustomsItem extends Customs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PermissionsCustomsItem.class); - /** {@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 8deb6cf4af2d..d2db9072abc2 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** The PermissionsResourceProviderItem model. */ @Fluent public final class PermissionsResourceProviderItem extends ResourceProvider { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PermissionsResourceProviderItem.class); - /** {@inheritDoc} */ @Override public PermissionsResourceProviderItem withProvider(ProviderName provider) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookActionConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java similarity index 67% rename from sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookActionConfiguration.java rename to sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java index 7a708979a769..3c40cd1284ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookActionConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; -/** The configuration of the run playbook automation rule action. */ +/** The PlaybookActionProperties model. */ @Fluent -public final class AutomationRuleRunPlaybookActionConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutomationRuleRunPlaybookActionConfiguration.class); - +public final class PlaybookActionProperties { /* * The resource id of the playbook resource */ @@ -25,7 +21,7 @@ public final class AutomationRuleRunPlaybookActionConfiguration { * The tenant id of the playbook resource */ @JsonProperty(value = "tenantId") - private String tenantId; + private UUID tenantId; /** * Get the logicAppResourceId property: The resource id of the playbook resource. @@ -40,9 +36,9 @@ public String logicAppResourceId() { * Set the logicAppResourceId property: The resource id of the playbook resource. * * @param logicAppResourceId the logicAppResourceId value to set. - * @return the AutomationRuleRunPlaybookActionConfiguration object itself. + * @return the PlaybookActionProperties object itself. */ - public AutomationRuleRunPlaybookActionConfiguration withLogicAppResourceId(String logicAppResourceId) { + public PlaybookActionProperties withLogicAppResourceId(String logicAppResourceId) { this.logicAppResourceId = logicAppResourceId; return this; } @@ -52,7 +48,7 @@ public AutomationRuleRunPlaybookActionConfiguration withLogicAppResourceId(Strin * * @return the tenantId value. */ - public String tenantId() { + public UUID tenantId() { return this.tenantId; } @@ -60,9 +56,9 @@ public String tenantId() { * Set the tenantId property: The tenant id of the playbook resource. * * @param tenantId the tenantId value to set. - * @return the AutomationRuleRunPlaybookActionConfiguration object itself. + * @return the PlaybookActionProperties object itself. */ - public AutomationRuleRunPlaybookActionConfiguration withTenantId(String tenantId) { + public PlaybookActionProperties withTenantId(UUID tenantId) { this.tenantId = tenantId; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java index 9ae792e00317..1d192d71c851 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.ProcessEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("Process") @Fluent public final class ProcessEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessEntity.class); - /* * Process entity properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java new file mode 100644 index 000000000000..7c641a0bca1e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Describes an automation rule condition that evaluates a property's value. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") +@JsonTypeName("Property") +@Fluent +public final class PropertyConditionProperties extends AutomationRuleCondition { + /* + * The conditionProperties property. + */ + @JsonProperty(value = "conditionProperties") + private AutomationRulePropertyValuesCondition conditionProperties; + + /** + * Get the conditionProperties property: The conditionProperties property. + * + * @return the conditionProperties value. + */ + public AutomationRulePropertyValuesCondition conditionProperties() { + return this.conditionProperties; + } + + /** + * Set the conditionProperties property: The conditionProperties property. + * + * @param conditionProperties the conditionProperties value to set. + * @return the PropertyConditionProperties object itself. + */ + public PropertyConditionProperties withConditionProperties( + AutomationRulePropertyValuesCondition conditionProperties) { + this.conditionProperties = conditionProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (conditionProperties() != null) { + conditionProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java deleted file mode 100644 index 679f98e22be2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Query based alert rule base property bag. */ -@Fluent -public class QueryBasedAlertRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryBasedAlertRuleProperties.class); - - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName") - private String alertRuleTemplateName; - - /* - * The version of the alert rule template used to create this rule - in - * format , where all are numbers, for example 0 <1.0.2> - */ - @JsonProperty(value = "templateVersion") - private String templateVersion; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert rule has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The suppression (in ISO 8601 duration format) to wait since last time - * this alert rule been triggered. - */ - @JsonProperty(value = "suppressionDuration", required = true) - private Duration suppressionDuration; - - /* - * Determines whether the suppression for this alert rule is enabled or - * disabled. - */ - @JsonProperty(value = "suppressionEnabled", required = true) - private boolean suppressionEnabled; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The settings of the incidents that created from alerts triggered by this - * analytics rule - */ - @JsonProperty(value = "incidentConfiguration") - private IncidentConfiguration incidentConfiguration; - - /* - * Dictionary of string key-value pairs of columns to be attached to the - * alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @return the templateVersion value. - */ - public String templateVersion() { - return this.templateVersion; - } - - /** - * Set the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @param templateVersion the templateVersion value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withTemplateVersion(String templateVersion) { - this.templateVersion = templateVersion; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @return the suppressionDuration value. - */ - public Duration suppressionDuration() { - return this.suppressionDuration; - } - - /** - * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @param suppressionDuration the suppressionDuration value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withSuppressionDuration(Duration suppressionDuration) { - this.suppressionDuration = suppressionDuration; - return this; - } - - /** - * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @return the suppressionEnabled value. - */ - public boolean suppressionEnabled() { - return this.suppressionEnabled; - } - - /** - * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @param suppressionEnabled the suppressionEnabled value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withSuppressionEnabled(boolean suppressionEnabled) { - this.suppressionEnabled = suppressionEnabled; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @return the incidentConfiguration value. - */ - public IncidentConfiguration incidentConfiguration() { - return this.incidentConfiguration; - } - - /** - * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @param incidentConfiguration the incidentConfiguration value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - this.incidentConfiguration = incidentConfiguration; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model QueryBasedAlertRuleProperties")); - } - if (suppressionDuration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property suppressionDuration in model QueryBasedAlertRuleProperties")); - } - if (incidentConfiguration() != null) { - incidentConfiguration().validate(); - } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java index bca982c12454..d904d597e577 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +13,6 @@ /** Query based alert rule template base property bag. */ @Fluent public class QueryBasedAlertRuleTemplateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryBasedAlertRuleTemplateProperties.class); - /* * The query that creates alerts for this rule. */ @@ -29,12 +25,6 @@ public class QueryBasedAlertRuleTemplateProperties { @JsonProperty(value = "severity") private AlertSeverity severity; - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - /* * The version of this template - in format , where all are numbers. * For example <1.0.2>. @@ -102,26 +92,6 @@ public QueryBasedAlertRuleTemplateProperties withSeverity(AlertSeverity severity return this; } - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - /** * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For * example <1.0.2>. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java index c17a04189a35..116afd6feb60 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryKeyEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("RegistryKey") @Fluent public final class RegistryKeyEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistryKeyEntity.class); - /* * 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 02308d3261fa..8121d653cb19 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryValueEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("RegistryValue") @Fluent public final class RegistryValueEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistryValueEntity.class); - /* * RegistryKey entity properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java index 496214aad5c9..7c2e13d40225 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of relations. */ @Fluent public final class RelationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RelationList.class); - /* * URL to fetch the next set of relations. */ @@ -64,11 +61,13 @@ public RelationList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model RelationList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(RelationList.class); } 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 74b4a2a2c2ae..02aaa874b88d 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the source controls. */ @Fluent public final class RepoList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RepoList.class); - /* * URL to fetch the next set of repositories. */ @@ -64,10 +61,12 @@ public RepoList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property value in model RepoList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(RepoList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java index 9c2a5094a235..3e26879725a5 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** metadata of a repository. */ @Fluent public final class Repository { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Repository.class); - /* * 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 new file mode 100644 index 000000000000..5e10c94993ff --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resources created in user's repository for the source-control. */ +@Fluent +public final class RepositoryResourceInfo { + /* + * The webhook object created for the source-control. + */ + @JsonProperty(value = "webhook") + private Webhook webhook; + + /* + * Resources created in GitHub for this source-control. + */ + @JsonProperty(value = "gitHubResourceInfo") + private GitHubResourceInfo gitHubResourceInfo; + + /* + * Resources created in Azure DevOps for this source-control. + */ + @JsonProperty(value = "azureDevOpsResourceInfo") + private AzureDevOpsResourceInfo azureDevOpsResourceInfo; + + /** + * Get the webhook property: The webhook object created for the source-control. + * + * @return the webhook value. + */ + public Webhook webhook() { + return this.webhook; + } + + /** + * Set the webhook property: The webhook object created for the source-control. + * + * @param webhook the webhook value to set. + * @return the RepositoryResourceInfo object itself. + */ + public RepositoryResourceInfo withWebhook(Webhook webhook) { + this.webhook = webhook; + return this; + } + + /** + * Get the gitHubResourceInfo property: Resources created in GitHub for this source-control. + * + * @return the gitHubResourceInfo value. + */ + public GitHubResourceInfo gitHubResourceInfo() { + return this.gitHubResourceInfo; + } + + /** + * Set the gitHubResourceInfo property: Resources created in GitHub for this source-control. + * + * @param gitHubResourceInfo the gitHubResourceInfo value to set. + * @return the RepositoryResourceInfo object itself. + */ + public RepositoryResourceInfo withGitHubResourceInfo(GitHubResourceInfo gitHubResourceInfo) { + this.gitHubResourceInfo = gitHubResourceInfo; + return this; + } + + /** + * Get the azureDevOpsResourceInfo property: Resources created in Azure DevOps for this source-control. + * + * @return the azureDevOpsResourceInfo value. + */ + public AzureDevOpsResourceInfo azureDevOpsResourceInfo() { + return this.azureDevOpsResourceInfo; + } + + /** + * Set the azureDevOpsResourceInfo property: Resources created in Azure DevOps for this source-control. + * + * @param azureDevOpsResourceInfo the azureDevOpsResourceInfo value to set. + * @return the RepositoryResourceInfo object itself. + */ + public RepositoryResourceInfo withAzureDevOpsResourceInfo(AzureDevOpsResourceInfo azureDevOpsResourceInfo) { + this.azureDevOpsResourceInfo = azureDevOpsResourceInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (webhook() != null) { + webhook().validate(); + } + if (gitHubResourceInfo() != null) { + gitHubResourceInfo().validate(); + } + if (azureDevOpsResourceInfo() != null) { + azureDevOpsResourceInfo().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java index 5a312b1a6b49..146d39665d20 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Required permissions for the connector. */ @Fluent public final class RequiredPermissions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RequiredPermissions.class); - /* * 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 ab9e5e06d76f..7024f46e5562 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Resource provider permissions required for the connector. */ @Fluent public class ResourceProvider { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvider.class); - /* * 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 08fa61058077..fa765f7e9314 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 @@ -7,15 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An azure resource object with an Etag property. */ @Fluent public class ResourceWithEtag extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceWithEtag.class); - /* * 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 cbc4781224c9..21b538e67f10 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The sample queries for the connector. */ @Fluent public class SampleQueries { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SampleQueries.class); - /* * 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 36f412347bf4..5d5575688e63 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 @@ -5,10 +5,8 @@ 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.AlertRuleInner; import com.azure.resourcemanager.securityinsights.fluent.models.ScheduledAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +20,6 @@ @JsonTypeName("Scheduled") @Fluent public final class ScheduledAlertRule extends AlertRuleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRule.class); - /* * Scheduled alert rule properties */ @@ -117,29 +113,6 @@ public ScheduledAlertRule withDescription(String description) { return this; } - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - /** * Get the displayName property: The display name for alerts created by this alert rule. * @@ -246,48 +219,48 @@ public ScheduledAlertRule withSuppressionEnabled(Boolean suppressionEnabled) { } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the tactics property: The tactics of the alert rule. * - * @return the severity value. + * @return the tactics value. */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Set the tactics property: The tactics of the alert rule. * - * @param severity the severity value to set. + * @param tactics the tactics value to set. * @return the ScheduledAlertRule object itself. */ - public ScheduledAlertRule withSeverity(AlertSeverity severity) { + public ScheduledAlertRule withTactics(List tactics) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleProperties(); } - this.innerProperties().withSeverity(severity); + this.innerProperties().withTactics(tactics); return this; } /** - * Get the tactics property: The tactics of the alert rule. + * Get the techniques property: The techniques of the alert rule. * - * @return the tactics value. + * @return the techniques value. */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); } /** - * Set the tactics property: The tactics of the alert rule. + * Set the techniques property: The techniques of the alert rule. * - * @param tactics the tactics value to set. + * @param techniques the techniques value to set. * @return the ScheduledAlertRule object itself. */ - public ScheduledAlertRule withTactics(List tactics) { + public ScheduledAlertRule withTechniques(List techniques) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleProperties(); } - this.innerProperties().withTactics(tactics); + this.innerProperties().withTechniques(techniques); return this; } @@ -317,71 +290,25 @@ public ScheduledAlertRule withIncidentConfiguration(IncidentConfiguration incide } /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withCustomDetails(customDetails); - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. + * Get the query property: The query that creates alerts for this rule. * - * @return the alertDetailsOverride value. + * @return the query value. */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); } /** - * Set the alertDetailsOverride property: The alert details override settings. + * Set the query property: The query that creates alerts for this rule. * - * @param alertDetailsOverride the alertDetailsOverride value to set. + * @param query the query value to set. * @return the ScheduledAlertRule object itself. */ - public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + public ScheduledAlertRule withQuery(String query) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleProperties(); } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + this.innerProperties().withQuery(query); return this; } @@ -431,6 +358,29 @@ public ScheduledAlertRule withQueryPeriod(Duration queryPeriod) { return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -500,6 +450,75 @@ public ScheduledAlertRule withEventGroupingSettings(EventGroupingSettings eventG return this; } + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.innerProperties() == null ? null : this.innerProperties().customDetails(); + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withCustomDetails(Map customDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withCustomDetails(customDetails); + return this; + } + + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withEntityMappings(List entityMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withEntityMappings(entityMappings); + return this; + } + + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java index 00c665103e5b..d0eee10dca59 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 @@ -5,15 +5,20 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; +import java.util.List; +import java.util.Map; /** Scheduled alert rule template property bag. */ @Fluent public class ScheduledAlertRuleCommonProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRuleCommonProperties.class); + /* + * The query that creates alerts for this rule. + */ + @JsonProperty(value = "query") + private String query; /* * The frequency (in ISO 8601 duration format) for this alert rule to run. @@ -27,6 +32,12 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "queryPeriod") private Duration queryPeriod; + /* + * The severity for alerts created by this alert rule. + */ + @JsonProperty(value = "severity") + private AlertSeverity severity; + /* * The operation against the threshold that triggers alert rule. */ @@ -45,6 +56,46 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Dictionary of string key-value pairs of columns to be attached to the + * alert + */ + @JsonProperty(value = "customDetails") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customDetails; + + /* + * Array of the entity mappings of the alert rule + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * The alert details override settings + */ + @JsonProperty(value = "alertDetailsOverride") + private AlertDetailsOverride alertDetailsOverride; + + /** + * Get the query property: The query that creates alerts for this rule. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: The query that creates alerts for this rule. + * + * @param query the query value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withQuery(String query) { + this.query = query; + return this; + } + /** * Get the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. * @@ -85,6 +136,26 @@ public ScheduledAlertRuleCommonProperties withQueryPeriod(Duration queryPeriod) return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withSeverity(AlertSeverity severity) { + this.severity = severity; + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -145,6 +216,66 @@ public ScheduledAlertRuleCommonProperties withEventGroupingSettings(EventGroupin return this; } + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.customDetails; + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withCustomDetails(Map customDetails) { + this.customDetails = customDetails; + return this; + } + + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withEntityMappings(List entityMappings) { + this.entityMappings = entityMappings; + return this; + } + + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.alertDetailsOverride; + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + this.alertDetailsOverride = alertDetailsOverride; + return this; + } + /** * Validates the instance. * @@ -154,5 +285,11 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (entityMappings() != null) { + entityMappings().forEach(e -> e.validate()); + } + if (alertDetailsOverride() != null) { + alertDetailsOverride().validate(); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java index 897d8d1edbb9..143d98192d0d 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 @@ -5,10 +5,8 @@ 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.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.fluent.models.ScheduledAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +20,6 @@ @JsonTypeName("Scheduled") @Fluent public final class ScheduledAlertRuleTemplate extends AlertRuleTemplateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRuleTemplate.class); - /* * Scheduled alert rule template properties */ @@ -40,165 +36,159 @@ private ScheduledAlertRuleTemplateProperties innerProperties() { } /** - * Get the query property: The query that creates alerts for this rule. + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @return the query value. + * @return the alertRulesCreatedByTemplateCount value. */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); + public Integer alertRulesCreatedByTemplateCount() { + return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); } /** - * Set the query property: The query that creates alerts for this rule. + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @param query the query value to set. + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withQuery(String query) { + public ScheduledAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withQuery(query); + this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); return this; } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the severity value. + * @return the createdDateUtc value. */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); + public OffsetDateTime createdDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleTemplate object itself. + * @return the lastUpdatedDateUtc value. */ - public ScheduledAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; + public OffsetDateTime lastUpdatedDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); } /** - * Get the tactics property: The tactics of the alert rule. + * Get the description property: The description of the alert rule template. * - * @return the tactics value. + * @return the description value. */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the tactics property: The tactics of the alert rule. + * Set the description property: The description of the alert rule template. * - * @param tactics the tactics value to set. + * @param description the description value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withTactics(List tactics) { + public ScheduledAlertRuleTemplate withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withTactics(tactics); + this.innerProperties().withDescription(description); return this; } /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Get the displayName property: The display name for alert rule template. * - * @return the version value. + * @return the displayName value. */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Set the displayName property: The display name for alert rule template. * - * @param version the version value to set. + * @param displayName the displayName value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withVersion(String version) { + public ScheduledAlertRuleTemplate withDisplayName(String displayName) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withVersion(version); + this.innerProperties().withDisplayName(displayName); return this; } /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Get the requiredDataConnectors property: The required data connectors for this template. * - * @return the customDetails value. + * @return the requiredDataConnectors value. */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); + public List requiredDataConnectors() { + return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); } /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Set the requiredDataConnectors property: The required data connectors for this template. * - * @param customDetails the customDetails value to set. + * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withCustomDetails(Map customDetails) { + public ScheduledAlertRuleTemplate withRequiredDataConnectors( + List requiredDataConnectors) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withCustomDetails(customDetails); + this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); return this; } /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. + * Get the status property: The alert rule template status. * - * @return the entityMappings value. + * @return the status value. */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + public TemplateStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. + * Set the status property: The alert rule template status. * - * @param entityMappings the entityMappings value to set. + * @param status the status value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withEntityMappings(List entityMappings) { + public ScheduledAlertRuleTemplate withStatus(TemplateStatus status) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withEntityMappings(entityMappings); + this.innerProperties().withStatus(status); return this; } /** - * Get the alertDetailsOverride property: The alert details override settings. + * Get the query property: The query that creates alerts for this rule. * - * @return the alertDetailsOverride value. + * @return the query value. */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); } /** - * Set the alertDetailsOverride property: The alert details override settings. + * Set the query property: The query that creates alerts for this rule. * - * @param alertDetailsOverride the alertDetailsOverride value to set. + * @param query the query value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + public ScheduledAlertRuleTemplate withQuery(String query) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + this.innerProperties().withQuery(query); return this; } @@ -248,6 +238,29 @@ public ScheduledAlertRuleTemplate withQueryPeriod(Duration queryPeriod) { return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRuleTemplate object itself. + */ + public ScheduledAlertRuleTemplate withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleTemplateProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -295,159 +308,165 @@ public ScheduledAlertRuleTemplate withTriggerThreshold(Integer triggerThreshold) } /** - * Get the eventGroupingSettings property: The event grouping settings. + * Get the tactics property: The tactics of the alert rule template. * - * @return the eventGroupingSettings value. + * @return the tactics value. */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); } /** - * Set the eventGroupingSettings property: The event grouping settings. + * Set the tactics property: The tactics of the alert rule template. * - * @param eventGroupingSettings the eventGroupingSettings value to set. + * @param tactics the tactics value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { + public ScheduledAlertRuleTemplate withTactics(List tactics) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); + this.innerProperties().withTactics(tactics); return this; } /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * Get the techniques property: The techniques of the alert rule. * - * @return the alertRulesCreatedByTemplateCount value. + * @return the techniques value. */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); } /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * Set the techniques property: The techniques of the alert rule. * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. + * @param techniques the techniques value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { + public ScheduledAlertRuleTemplate withTechniques(List techniques) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); + this.innerProperties().withTechniques(techniques); return this; } /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. + * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. * - * @return the lastUpdatedDateUtc value. + * @return the version value. */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** - * Get the createdDateUtc property: The time that this alert rule template has been added. + * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. * - * @return the createdDateUtc value. + * @param version the version value to set. + * @return the ScheduledAlertRuleTemplate object itself. */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); + public ScheduledAlertRuleTemplate withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleTemplateProperties(); + } + this.innerProperties().withVersion(version); + return this; } /** - * Get the description property: The description of the alert rule template. + * Get the eventGroupingSettings property: The event grouping settings. * - * @return the description value. + * @return the eventGroupingSettings value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public EventGroupingSettings eventGroupingSettings() { + return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); } /** - * Set the description property: The description of the alert rule template. + * Set the eventGroupingSettings property: The event grouping settings. * - * @param description the description value to set. + * @param eventGroupingSettings the eventGroupingSettings value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withDescription(String description) { + public ScheduledAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withDescription(description); + this.innerProperties().withEventGroupingSettings(eventGroupingSettings); return this; } /** - * Get the displayName property: The display name for alert rule template. + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. * - * @return the displayName value. + * @return the customDetails value. */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + public Map customDetails() { + return this.innerProperties() == null ? null : this.innerProperties().customDetails(); } /** - * Set the displayName property: The display name for alert rule template. + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. * - * @param displayName the displayName value to set. + * @param customDetails the customDetails value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withDisplayName(String displayName) { + public ScheduledAlertRuleTemplate withCustomDetails(Map customDetails) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withDisplayName(displayName); + this.innerProperties().withCustomDetails(customDetails); return this; } /** - * Get the requiredDataConnectors property: The required data sources for this template. + * Get the entityMappings property: Array of the entity mappings of the alert rule. * - * @return the requiredDataConnectors value. + * @return the entityMappings value. */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); } /** - * Set the requiredDataConnectors property: The required data sources for this template. + * Set the entityMappings property: Array of the entity mappings of the alert rule. * - * @param requiredDataConnectors the requiredDataConnectors value to set. + * @param entityMappings the entityMappings value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { + public ScheduledAlertRuleTemplate withEntityMappings(List entityMappings) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); + this.innerProperties().withEntityMappings(entityMappings); return this; } /** - * Get the status property: The alert rule template status. + * Get the alertDetailsOverride property: The alert details override settings. * - * @return the status value. + * @return the alertDetailsOverride value. */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + public AlertDetailsOverride alertDetailsOverride() { + return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); } /** - * Set the status property: The alert rule template status. + * Set the alertDetailsOverride property: The alert details override settings. * - * @param status the status value to set. + * @param alertDetailsOverride the alertDetailsOverride value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withStatus(TemplateStatus status) { + public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withStatus(status); + this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java index 759a6284a547..3052a35d0c5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SecurityAlertProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("SecurityAlert") @Fluent public final class SecurityAlert extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityAlert.class); - /* * 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 5260009b85c3..3613253e952a 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 @@ -5,16 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** confidence reason item. */ @Immutable public final class SecurityAlertPropertiesConfidenceReasonsItem { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SecurityAlertPropertiesConfidenceReasonsItem.class); - /* * 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 a61ee3406a70..a34da5bbcc1a 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("SecurityAlert") @Fluent public final class SecurityAlertTimelineItem extends EntityTimelineItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityAlertTimelineItem.class); - /* * The alert azure resource id. */ @@ -262,46 +259,48 @@ public SecurityAlertTimelineItem withAlertType(String alertType) { public void validate() { super.validate(); if (azureResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property azureResourceId in model SecurityAlertTimelineItem")); } if (displayName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property displayName in model SecurityAlertTimelineItem")); } if (severity() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property severity in model SecurityAlertTimelineItem")); } if (endTimeUtc() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property endTimeUtc in model SecurityAlertTimelineItem")); } if (startTimeUtc() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property startTimeUtc in model SecurityAlertTimelineItem")); } if (timeGenerated() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property timeGenerated in model SecurityAlertTimelineItem")); } if (alertType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property alertType in model SecurityAlertTimelineItem")); } } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertTimelineItem.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java index a3f0739cddb5..119f867b58eb 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SecurityGroupEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("SecurityGroup") @Fluent public final class SecurityGroupEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityGroupEntity.class); - /* * SecurityGroup entity properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java deleted file mode 100644 index 16b8c39e003b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Source. */ -public final class Source extends ExpandableStringEnum { - /** Static value Local file for Source. */ - public static final Source LOCAL_FILE = fromString("Local file"); - - /** Static value Remote storage for Source. */ - public static final Source REMOTE_STORAGE = fromString("Remote storage"); - - /** - * Creates or finds a Source from its string representation. - * - * @param name a name to look for. - * @return the corresponding Source. - */ - @JsonCreator - public static Source fromString(String name) { - return fromString(name, Source.class); - } - - /** @return known Source values. */ - public static Collection values() { - return values(Source.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java index c69e41b8d58c..6c5a64405d59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java @@ -53,6 +53,13 @@ public interface SourceControl { */ String idPropertiesId(); + /** + * Gets the version property: The version number associated with the source control. + * + * @return the version value. + */ + Version version(); + /** * Gets the displayName property: The display name of the source control. * @@ -88,6 +95,20 @@ public interface SourceControl { */ Repository repository(); + /** + * Gets the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @return the repositoryResourceInfo value. + */ + RepositoryResourceInfo repositoryResourceInfo(); + + /** + * Gets the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @return the lastDeploymentInfo value. + */ + DeploymentInfo lastDeploymentInfo(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner object. * @@ -122,11 +143,14 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithIdPropertiesId, + DefinitionStages.WithVersion, DefinitionStages.WithDisplayName, DefinitionStages.WithDescription, DefinitionStages.WithRepoType, DefinitionStages.WithContentTypes, - DefinitionStages.WithRepository { + DefinitionStages.WithRepository, + DefinitionStages.WithRepositoryResourceInfo, + DefinitionStages.WithLastDeploymentInfo { /** * Executes the create request. * @@ -162,6 +186,16 @@ interface WithIdPropertiesId { */ WithCreate withIdPropertiesId(String idPropertiesId); } + /** The stage of the SourceControl definition allowing to specify version. */ + interface WithVersion { + /** + * Specifies the version property: The version number associated with the source control. + * + * @param version The version number associated with the source control. + * @return the next definition stage. + */ + WithCreate withVersion(Version version); + } /** The stage of the SourceControl definition allowing to specify displayName. */ interface WithDisplayName { /** @@ -212,6 +246,28 @@ interface WithRepository { */ WithCreate withRepository(Repository repository); } + /** The stage of the SourceControl definition allowing to specify repositoryResourceInfo. */ + interface WithRepositoryResourceInfo { + /** + * Specifies the repositoryResourceInfo property: Information regarding the resources created in user's + * repository.. + * + * @param repositoryResourceInfo Information regarding the resources created in user's repository. + * @return the next definition stage. + */ + WithCreate withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo); + } + /** The stage of the SourceControl definition allowing to specify lastDeploymentInfo. */ + interface WithLastDeploymentInfo { + /** + * Specifies the lastDeploymentInfo property: Information regarding the latest deployment for the source + * control.. + * + * @param lastDeploymentInfo Information regarding the latest deployment for the source control. + * @return the next definition stage. + */ + WithCreate withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java index 9f563923c8f3..8fa041261e9a 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the source controls. */ @Fluent public final class SourceControlList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlList.class); - /* * URL to fetch the next set of source controls. */ @@ -64,11 +61,13 @@ public SourceControlList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model SourceControlList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(SourceControlList.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java index 03fb7eaddc50..291568ce3448 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java @@ -18,7 +18,7 @@ public interface SourceControls { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); @@ -32,7 +32,7 @@ public interface SourceControls { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ PagedIterable listRepositories( String resourceGroupName, String workspaceName, RepoType repoType, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java index 30cba516f1ed..d7301e3d70cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java @@ -18,7 +18,7 @@ public interface SourceControlsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface SourceControlsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java new file mode 100644 index 000000000000..4e787473c90f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SourceType. */ +public final class SourceType extends ExpandableStringEnum { + /** Static value Local file for SourceType. */ + public static final SourceType LOCAL_FILE = fromString("Local file"); + + /** Static value Remote storage for SourceType. */ + public static final SourceType REMOTE_STORAGE = fromString("Remote storage"); + + /** + * Creates or finds a SourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SourceType. + */ + @JsonCreator + public static SourceType fromString(String name) { + return fromString(name, SourceType.class); + } + + /** @return known SourceType values. */ + public static Collection values() { + return values(SourceType.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java index f35c6eb0be58..e1aa218951ef 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SubmissionMailEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonTypeName("SubmissionMail") @Fluent public final class SubmissionMailEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubmissionMailEntity.class); - /* * Submission mail entity properties */ 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 1408b38bd97b..897fc3f44ce7 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 @@ -5,9 +5,7 @@ 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.TICheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("ThreatIntelligence") @Fluent public final class TICheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TICheckRequirements.class); - /* * Threat Intelligence Platforms data connector check required properties */ 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 fe56b86cf2bf..4d49f30e45e9 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.TIDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("ThreatIntelligence") @Fluent public final class TIDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TIDataConnector.class); - /* * 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 f1e5a07200fa..6615ba9b2f74 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for TI (Threat Intelligence) data connector. */ @Fluent public final class TIDataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TIDataConnectorDataTypes.class); - /* * Data type for indicators connection. */ @@ -47,7 +44,7 @@ public TIDataConnectorDataTypes withIndicators(TIDataConnectorDataTypesIndicator */ public void validate() { if (indicators() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property indicators in model TIDataConnectorDataTypes")); @@ -55,4 +52,6 @@ public void validate() { indicators().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TIDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java index 4ec6fc845e2a..a51ae50a528a 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Data type for indicators connection. */ @Fluent public final class TIDataConnectorDataTypesIndicators extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TIDataConnectorDataTypesIndicators.class); - /** {@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 index ea62cc59bb88..40d641ab8453 100644 --- 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.UUID; @@ -14,8 +13,6 @@ /** Describes team properties. */ @Fluent public final class TeamProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TeamProperties.class); - /* * The name of the team */ @@ -127,9 +124,11 @@ public TeamProperties withGroupIds(List groupIds) { */ public void validate() { if (teamName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property teamName in model TeamProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java index 5475f5aaf2ad..728ac732bcda 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ThreatIntelligence property bag. */ @Immutable public final class ThreatIntelligence { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligence.class); - /* * 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 2c04c09c6e19..924536281280 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 @@ -5,10 +5,8 @@ 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.AlertRuleInner; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("ThreatIntelligence") @Fluent public final class ThreatIntelligenceAlertRule extends AlertRuleInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceAlertRule.class); - /* * Threat Intelligence alert rule properties */ @@ -135,6 +131,15 @@ public List tactics() { return this.innerProperties() == null ? null : this.innerProperties().tactics(); } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java index dde5fd59d17e..734f6a42748a 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 @@ -5,10 +5,8 @@ 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.AlertRuleTemplateInner; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("ThreatIntelligence") @Fluent public final class ThreatIntelligenceAlertRuleTemplate extends AlertRuleTemplateInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceAlertRuleTemplate.class); - /* * Threat Intelligence alert rule template properties */ @@ -61,7 +57,7 @@ public ThreatIntelligenceAlertRuleTemplate withSeverity(AlertSeverity severity) } /** - * Get the tactics property: The tactics of the alert rule template. + * Get the tactics property: The tactics of the alert rule. * * @return the tactics value. */ @@ -70,7 +66,7 @@ public List tactics() { } /** - * Set the tactics property: The tactics of the alert rule template. + * Set the tactics property: The tactics of the alert rule. * * @param tactics the tactics value to set. * @return the ThreatIntelligenceAlertRuleTemplate object itself. @@ -83,6 +79,29 @@ public ThreatIntelligenceAlertRuleTemplate withTactics(List tactic return this; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the ThreatIntelligenceAlertRuleTemplate object itself. + */ + public ThreatIntelligenceAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java index 14a229bba752..847257381b59 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Array of tags to be appended to the threat intelligence indicator. */ @Fluent public final class ThreatIntelligenceAppendTags { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceAppendTags.class); - /* * 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 68e105cf433b..689e8a88e564 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Describes external reference. */ @Fluent public final class ThreatIntelligenceExternalReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceExternalReference.class); - /* * 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 aa02c64de743..86be0cc60915 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Filtering criteria for querying threat intelligence indicators. */ @Fluent public final class ThreatIntelligenceFilteringCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceFilteringCriteria.class); - /* * 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 6ddcc9a1a494..bb55e6966794 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes threat granular marking model entity. */ @Fluent public final class ThreatIntelligenceGranularMarkingModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceGranularMarkingModel.class); - /* * Language granular marking model */ 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 7f973e689841..5ce9f114369e 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 @@ -5,10 +5,8 @@ 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.ThreatIntelligenceIndicatorProperties; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -20,8 +18,6 @@ @JsonTypeName("indicator") @Fluent public final class ThreatIntelligenceIndicatorModel extends ThreatIntelligenceInformationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorModel.class); - /* * Threat Intelligence Entity properties */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java deleted file mode 100644 index c7611600484d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java +++ /dev/null @@ -1,751 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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.ThreatIntelligenceIndicatorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Threat intelligence indicator entity used in request body. */ -@Fluent -public final class ThreatIntelligenceIndicatorModelForRequestBody extends ThreatIntelligenceResourceKind { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ThreatIntelligenceIndicatorModelForRequestBody.class); - - /* - * Etag of the azure resource - */ - @JsonProperty(value = "etag") - private String etag; - - /* - * Threat Intelligence Entity properties - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceIndicatorProperties innerProperties; - - /** - * Get the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Etag of the azure resource. - * - * @param etag the etag value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the innerProperties property: Threat Intelligence Entity properties. - * - * @return the innerProperties value. - */ - private ThreatIntelligenceIndicatorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceIndicatorModelForRequestBody withKind(ThreatIntelligenceResourceKindEnum kind) { - super.withKind(kind); - return this; - } - - /** - * Get the threatIntelligenceTags property: List of tags. - * - * @return the threatIntelligenceTags value. - */ - public List threatIntelligenceTags() { - return this.innerProperties() == null ? null : this.innerProperties().threatIntelligenceTags(); - } - - /** - * Set the threatIntelligenceTags property: List of tags. - * - * @param threatIntelligenceTags the threatIntelligenceTags value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withThreatIntelligenceTags( - List threatIntelligenceTags) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withThreatIntelligenceTags(threatIntelligenceTags); - return this; - } - - /** - * Get the lastUpdatedTimeUtc property: Last updated time in UTC. - * - * @return the lastUpdatedTimeUtc value. - */ - public String lastUpdatedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTimeUtc(); - } - - /** - * Set the lastUpdatedTimeUtc property: Last updated time in UTC. - * - * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withLastUpdatedTimeUtc(String lastUpdatedTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withLastUpdatedTimeUtc(lastUpdatedTimeUtc); - return this; - } - - /** - * Get the source property: Source of a threat intelligence entity. - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: Source of a threat intelligence entity. - * - * @param source the source value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withSource(String source) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the displayName property: Display name of a threat intelligence entity. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: Display name of a threat intelligence entity. - * - * @param displayName the displayName value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the description property: Description of a threat intelligence entity. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Description of a threat intelligence entity. - * - * @param description the description value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the indicatorTypes property: Indicator types of threat intelligence entities. - * - * @return the indicatorTypes value. - */ - public List indicatorTypes() { - return this.innerProperties() == null ? null : this.innerProperties().indicatorTypes(); - } - - /** - * Set the indicatorTypes property: Indicator types of threat intelligence entities. - * - * @param indicatorTypes the indicatorTypes value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withIndicatorTypes(List indicatorTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withIndicatorTypes(indicatorTypes); - return this; - } - - /** - * Get the pattern property: Pattern of a threat intelligence entity. - * - * @return the pattern value. - */ - public String pattern() { - return this.innerProperties() == null ? null : this.innerProperties().pattern(); - } - - /** - * Set the pattern property: Pattern of a threat intelligence entity. - * - * @param pattern the pattern value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withPattern(String pattern) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withPattern(pattern); - return this; - } - - /** - * Get the patternType property: Pattern type of a threat intelligence entity. - * - * @return the patternType value. - */ - public String patternType() { - return this.innerProperties() == null ? null : this.innerProperties().patternType(); - } - - /** - * Set the patternType property: Pattern type of a threat intelligence entity. - * - * @param patternType the patternType value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withPatternType(String patternType) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withPatternType(patternType); - return this; - } - - /** - * Get the patternVersion property: Pattern version of a threat intelligence entity. - * - * @return the patternVersion value. - */ - public String patternVersion() { - return this.innerProperties() == null ? null : this.innerProperties().patternVersion(); - } - - /** - * Set the patternVersion property: Pattern version of a threat intelligence entity. - * - * @param patternVersion the patternVersion value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withPatternVersion(String patternVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withPatternVersion(patternVersion); - return this; - } - - /** - * Get the killChainPhases property: Kill chain phases. - * - * @return the killChainPhases value. - */ - public List killChainPhases() { - return this.innerProperties() == null ? null : this.innerProperties().killChainPhases(); - } - - /** - * Set the killChainPhases property: Kill chain phases. - * - * @param killChainPhases the killChainPhases value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withKillChainPhases( - List killChainPhases) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withKillChainPhases(killChainPhases); - return this; - } - - /** - * Get the parsedPattern property: Parsed patterns. - * - * @return the parsedPattern value. - */ - public List parsedPattern() { - return this.innerProperties() == null ? null : this.innerProperties().parsedPattern(); - } - - /** - * Set the parsedPattern property: Parsed patterns. - * - * @param parsedPattern the parsedPattern value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withParsedPattern( - List parsedPattern) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withParsedPattern(parsedPattern); - return this; - } - - /** - * Get the externalId property: External ID of threat intelligence entity. - * - * @return the externalId value. - */ - public String externalId() { - return this.innerProperties() == null ? null : this.innerProperties().externalId(); - } - - /** - * Set the externalId property: External ID of threat intelligence entity. - * - * @param externalId the externalId value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withExternalId(String externalId) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExternalId(externalId); - return this; - } - - /** - * Get the createdByRef property: Created by reference of threat intelligence entity. - * - * @return the createdByRef value. - */ - public String createdByRef() { - return this.innerProperties() == null ? null : this.innerProperties().createdByRef(); - } - - /** - * Set the createdByRef property: Created by reference of threat intelligence entity. - * - * @param createdByRef the createdByRef value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withCreatedByRef(String createdByRef) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withCreatedByRef(createdByRef); - return this; - } - - /** - * Get the defanged property: Is threat intelligence entity defanged. - * - * @return the defanged value. - */ - public Boolean defanged() { - return this.innerProperties() == null ? null : this.innerProperties().defanged(); - } - - /** - * Set the defanged property: Is threat intelligence entity defanged. - * - * @param defanged the defanged value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withDefanged(Boolean defanged) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withDefanged(defanged); - return this; - } - - /** - * Get the externalLastUpdatedTimeUtc property: External last updated time in UTC. - * - * @return the externalLastUpdatedTimeUtc value. - */ - public String externalLastUpdatedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().externalLastUpdatedTimeUtc(); - } - - /** - * Set the externalLastUpdatedTimeUtc property: External last updated time in UTC. - * - * @param externalLastUpdatedTimeUtc the externalLastUpdatedTimeUtc value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withExternalLastUpdatedTimeUtc( - String externalLastUpdatedTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExternalLastUpdatedTimeUtc(externalLastUpdatedTimeUtc); - return this; - } - - /** - * Get the externalReferences property: External References. - * - * @return the externalReferences value. - */ - public List externalReferences() { - return this.innerProperties() == null ? null : this.innerProperties().externalReferences(); - } - - /** - * Set the externalReferences property: External References. - * - * @param externalReferences the externalReferences value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withExternalReferences( - List externalReferences) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExternalReferences(externalReferences); - return this; - } - - /** - * Get the granularMarkings property: Granular Markings. - * - * @return the granularMarkings value. - */ - public List granularMarkings() { - return this.innerProperties() == null ? null : this.innerProperties().granularMarkings(); - } - - /** - * Set the granularMarkings property: Granular Markings. - * - * @param granularMarkings the granularMarkings value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withGranularMarkings( - List granularMarkings) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withGranularMarkings(granularMarkings); - return this; - } - - /** - * Get the labels property: Labels of threat intelligence entity. - * - * @return the labels value. - */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); - } - - /** - * Set the labels property: Labels of threat intelligence entity. - * - * @param labels the labels value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withLabels(List labels) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withLabels(labels); - return this; - } - - /** - * Get the revoked property: Is threat intelligence entity revoked. - * - * @return the revoked value. - */ - public Boolean revoked() { - return this.innerProperties() == null ? null : this.innerProperties().revoked(); - } - - /** - * Set the revoked property: Is threat intelligence entity revoked. - * - * @param revoked the revoked value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withRevoked(Boolean revoked) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withRevoked(revoked); - return this; - } - - /** - * Get the confidence property: Confidence of threat intelligence entity. - * - * @return the confidence value. - */ - public Integer confidence() { - return this.innerProperties() == null ? null : this.innerProperties().confidence(); - } - - /** - * Set the confidence property: Confidence of threat intelligence entity. - * - * @param confidence the confidence value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withConfidence(Integer confidence) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withConfidence(confidence); - return this; - } - - /** - * Get the objectMarkingRefs property: Threat intelligence entity object marking references. - * - * @return the objectMarkingRefs value. - */ - public List objectMarkingRefs() { - return this.innerProperties() == null ? null : this.innerProperties().objectMarkingRefs(); - } - - /** - * Set the objectMarkingRefs property: Threat intelligence entity object marking references. - * - * @param objectMarkingRefs the objectMarkingRefs value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withObjectMarkingRefs(List objectMarkingRefs) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withObjectMarkingRefs(objectMarkingRefs); - return this; - } - - /** - * Get the language property: Language of threat intelligence entity. - * - * @return the language value. - */ - public String language() { - return this.innerProperties() == null ? null : this.innerProperties().language(); - } - - /** - * Set the language property: Language of threat intelligence entity. - * - * @param language the language value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withLanguage(String language) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withLanguage(language); - return this; - } - - /** - * Get the threatTypes property: Threat types. - * - * @return the threatTypes value. - */ - public List threatTypes() { - return this.innerProperties() == null ? null : this.innerProperties().threatTypes(); - } - - /** - * Set the threatTypes property: Threat types. - * - * @param threatTypes the threatTypes value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withThreatTypes(List threatTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withThreatTypes(threatTypes); - return this; - } - - /** - * Get the validFrom property: Valid from. - * - * @return the validFrom value. - */ - public String validFrom() { - return this.innerProperties() == null ? null : this.innerProperties().validFrom(); - } - - /** - * Set the validFrom property: Valid from. - * - * @param validFrom the validFrom value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withValidFrom(String validFrom) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withValidFrom(validFrom); - return this; - } - - /** - * Get the validUntil property: Valid until. - * - * @return the validUntil value. - */ - public String validUntil() { - return this.innerProperties() == null ? null : this.innerProperties().validUntil(); - } - - /** - * Set the validUntil property: Valid until. - * - * @param validUntil the validUntil value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withValidUntil(String validUntil) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withValidUntil(validUntil); - return this; - } - - /** - * Get the created property: Created by. - * - * @return the created value. - */ - public String created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * Set the created property: Created by. - * - * @param created the created value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withCreated(String created) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withCreated(created); - return this; - } - - /** - * Get the modified property: Modified by. - * - * @return the modified value. - */ - public String modified() { - return this.innerProperties() == null ? null : this.innerProperties().modified(); - } - - /** - * Set the modified property: Modified by. - * - * @param modified the modified value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withModified(String modified) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withModified(modified); - return this; - } - - /** - * Get the extensions property: Extensions map. - * - * @return the extensions value. - */ - public Map extensions() { - return this.innerProperties() == null ? null : this.innerProperties().extensions(); - } - - /** - * Set the extensions property: Extensions map. - * - * @param extensions the extensions value to set. - * @return the ThreatIntelligenceIndicatorModelForRequestBody object itself. - */ - public ThreatIntelligenceIndicatorModelForRequestBody withExtensions(Map extensions) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceIndicatorProperties(); - } - this.innerProperties().withExtensions(extensions); - return this; - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java index 903e7b65d29d..464cb4b65fbe 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 @@ -22,9 +22,7 @@ public interface ThreatIntelligenceIndicators { * @return threat intelligence information object. */ ThreatIntelligenceInformation createIndicator( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties); + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Create a new threat intelligence indicator. @@ -41,7 +39,7 @@ ThreatIntelligenceInformation createIndicator( Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context); /** @@ -88,7 +86,7 @@ ThreatIntelligenceInformation create( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties); + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Update a threat Intelligence indicator. @@ -107,7 +105,7 @@ Response createWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceProperties, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, Context context); /** @@ -145,7 +143,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ PagedIterable queryIndicators( String resourceGroupName, @@ -162,7 +160,7 @@ PagedIterable queryIndicators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ PagedIterable queryIndicators( String resourceGroupName, @@ -223,7 +221,7 @@ ThreatIntelligenceInformation replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); /** * Replace tags added to a threat intelligence indicator. @@ -242,6 +240,6 @@ Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModelForRequestBody threatIntelligenceReplaceTags, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java index 84f06f5d2b01..444a66aa1384 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java @@ -17,7 +17,7 @@ public interface ThreatIntelligenceIndicatorsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -36,7 +36,7 @@ public interface ThreatIntelligenceIndicatorsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java index 8b5c95fe458f..63195abe89bb 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of all the threat intelligence information objects. */ @Fluent public final class ThreatIntelligenceInformationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceInformationList.class); - /* * URL to fetch the next set of information objects. */ @@ -64,7 +61,7 @@ public ThreatIntelligenceInformationList withValue(List e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceInformationList.class); } 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 58a3383fd450..8a1ba6f2bd1d 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes threat kill chain phase entity. */ @Fluent public final class ThreatIntelligenceKillChainPhase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceKillChainPhase.class); - /* * 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 e6908d798b44..2cb0c00e17c5 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes threat intelligence metric. */ @Fluent public final class ThreatIntelligenceMetric { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceMetric.class); - /* * 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 76bcef1ea3b7..62bd0e31c2fc 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes threat intelligence metric entity. */ @Fluent public final class ThreatIntelligenceMetricEntity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceMetricEntity.class); - /* * 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 ca15ec8e365e..2d20ceae39ac 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Threat intelligence metrics. */ @Fluent public final class ThreatIntelligenceMetrics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceMetrics.class); - /* * 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 a3b93804b2de..1a80738051c9 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes parsed pattern entity. */ @Fluent public final class ThreatIntelligenceParsedPattern { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceParsedPattern.class); - /* * 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 6c0aaaecb6d5..ead9ca6b8833 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes threat kill chain phase entity. */ @Fluent public final class ThreatIntelligenceParsedPatternTypeValue { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceParsedPatternTypeValue.class); - /* * Type of the value */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java deleted file mode 100644 index d704e32ab418..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes an entity with kind. */ -@Fluent -public class ThreatIntelligenceResourceKind { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceResourceKind.class); - - /* - * The kind of the entity. - */ - @JsonProperty(value = "kind", required = true) - private ThreatIntelligenceResourceKindEnum kind; - - /** - * Get the kind property: The kind of the entity. - * - * @return the kind value. - */ - public ThreatIntelligenceResourceKindEnum kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of the entity. - * - * @param kind the kind value to set. - * @return the ThreatIntelligenceResourceKind object itself. - */ - public ThreatIntelligenceResourceKind withKind(ThreatIntelligenceResourceKindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kind in model ThreatIntelligenceResourceKind")); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java index f6cd65e9f719..7c51d95d08ad 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** List of available columns for sorting. */ @Fluent public final class ThreatIntelligenceSortingCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceSortingCriteria.class); - /* * Column name */ 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 19f419e56777..a6e561d9e99e 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 @@ -5,9 +5,7 @@ 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.TiTaxiiCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("ThreatIntelligenceTaxii") @Fluent public final class TiTaxiiCheckRequirements extends DataConnectorsCheckRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TiTaxiiCheckRequirements.class); - /* * Threat Intelligence TAXII check required properties. */ 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 6a97a1989ab4..125e1dd55a28 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.fluent.models.TiTaxiiDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("ThreatIntelligenceTaxii") @Fluent public final class TiTaxiiDataConnector extends DataConnectorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TiTaxiiDataConnector.class); - /* * 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 73823dba1c38..22f12b8a6ab9 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Threat Intelligence TAXII data connector. */ @Fluent public final class TiTaxiiDataConnectorDataTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TiTaxiiDataConnectorDataTypes.class); - /* * Data type for TAXII connector. */ @@ -47,7 +44,7 @@ public TiTaxiiDataConnectorDataTypes withTaxiiClient(TiTaxiiDataConnectorDataTyp */ public void validate() { if (taxiiClient() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property taxiiClient in model TiTaxiiDataConnectorDataTypes")); @@ -55,4 +52,6 @@ public void validate() { taxiiClient().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TiTaxiiDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java index 675cc954414e..7b2b40b0a648 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 @@ -5,14 +5,10 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; /** Data type for TAXII connector. */ @Fluent public final class TiTaxiiDataConnectorDataTypesTaxiiClient extends DataConnectorDataTypeCommon { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TiTaxiiDataConnectorDataTypesTaxiiClient.class); - /** {@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 d100c569680d..d34ece2d531a 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** timeline aggregation information per kind. */ @Fluent public final class TimelineAggregation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TimelineAggregation.class); - /* * the total items found for a kind */ @@ -73,9 +70,11 @@ public TimelineAggregation withKind(EntityTimelineKind kind) { */ public void validate() { if (kind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property kind in model TimelineAggregation")); } } + + private static final ClientLogger LOGGER = new ClientLogger(TimelineAggregation.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java index f7f475a03db3..e6c563cb369f 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Timeline Query Errors. */ @Fluent public final class TimelineError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TimelineError.class); - /* * the query kind */ @@ -99,14 +96,16 @@ public TimelineError withErrorMessage(String errorMessage) { */ public void validate() { if (kind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property kind in model TimelineError")); } if (errorMessage() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property errorMessage in model TimelineError")); } } + + private static final ClientLogger LOGGER = new ClientLogger(TimelineError.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java index 4956524ffe57..7d42bccca470 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 @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Expansion result metadata. */ @Fluent public final class TimelineResultsMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TimelineResultsMetadata.class); - /* * the total items found for the timeline request */ @@ -100,7 +97,7 @@ public TimelineResultsMetadata withErrors(List errors) { */ public void validate() { if (aggregations() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property aggregations in model TimelineResultsMetadata")); @@ -111,4 +108,6 @@ public void validate() { errors().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(TimelineResultsMetadata.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java index b9052d5b8aaa..5a79fd502544 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 @@ -5,10 +5,8 @@ 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.SettingsInner; import com.azure.resourcemanager.securityinsights.fluent.models.UebaProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("Ueba") @Fluent public final class Ueba extends SettingsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Ueba.class); - /* * Ueba properties */ 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 798fa401ce88..0af80094b7e0 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.UrlEntityProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("Url") @Fluent public final class UrlEntity extends EntityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UrlEntity.class); - /* * 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 e5d3e8c2af42..8d8dc55f0309 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** User information that made some action. */ @Fluent public final class UserInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInfo.class); - /* * The email of the user. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java new file mode 100644 index 000000000000..529b810b9750 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Version. */ +public final class Version extends ExpandableStringEnum { + /** Static value V1 for Version. */ + public static final Version V1 = fromString("V1"); + + /** Static value V2 for Version. */ + public static final Version V2 = fromString("V2"); + + /** + * Creates or finds a Version from its string representation. + * + * @param name a name to look for. + * @return the corresponding Version. + */ + @JsonCreator + public static Version fromString(String name) { + return fromString(name, Version.class); + } + + /** @return known Version values. */ + public static Collection values() { + return values(Version.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java index e2985e7cf91b..1550c5a3ae04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java @@ -70,11 +70,18 @@ public interface Watchlist { String provider(); /** - * Gets the source property: The source of the watchlist. + * Gets the source property: The filename of the watchlist, called 'source'. * * @return the source value. */ - Source source(); + String source(); + + /** + * Gets the sourceType property: The sourceType of the watchlist. + * + * @return the sourceType value. + */ + SourceType sourceType(); /** * Gets the created property: The time the watchlist was created. @@ -192,13 +199,6 @@ public interface Watchlist { */ String uploadStatus(); - /** - * Gets the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @return the watchlistItemsCount value. - */ - Integer watchlistItemsCount(); - /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner object. * @@ -236,6 +236,7 @@ interface WithCreate DefinitionStages.WithDisplayName, DefinitionStages.WithProvider, DefinitionStages.WithSource, + DefinitionStages.WithSourceType, DefinitionStages.WithCreated, DefinitionStages.WithUpdated, DefinitionStages.WithCreatedBy, @@ -251,8 +252,7 @@ interface WithCreate DefinitionStages.WithRawContent, DefinitionStages.WithItemsSearchKey, DefinitionStages.WithContentType, - DefinitionStages.WithUploadStatus, - DefinitionStages.WithWatchlistItemsCount { + DefinitionStages.WithUploadStatus { /** * Executes the create request. * @@ -311,12 +311,22 @@ interface WithProvider { /** The stage of the Watchlist definition allowing to specify source. */ interface WithSource { /** - * Specifies the source property: The source of the watchlist. + * Specifies the source property: The filename of the watchlist, called 'source'. * - * @param source The source of the watchlist. + * @param source The filename of the watchlist, called 'source'. * @return the next definition stage. */ - WithCreate withSource(Source source); + WithCreate withSource(String source); + } + /** The stage of the Watchlist definition allowing to specify sourceType. */ + interface WithSourceType { + /** + * Specifies the sourceType property: The sourceType of the watchlist. + * + * @param sourceType The sourceType of the watchlist. + * @return the next definition stage. + */ + WithCreate withSourceType(SourceType sourceType); } /** The stage of the Watchlist definition allowing to specify created. */ interface WithCreated { @@ -488,16 +498,6 @@ interface WithUploadStatus { */ WithCreate withUploadStatus(String uploadStatus); } - /** The stage of the Watchlist definition allowing to specify watchlistItemsCount. */ - interface WithWatchlistItemsCount { - /** - * Specifies the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount The number of Watchlist Items in the Watchlist. - * @return the next definition stage. - */ - WithCreate withWatchlistItemsCount(Integer watchlistItemsCount); - } } /** * Begins update for the Watchlist resource. @@ -513,6 +513,7 @@ interface Update UpdateStages.WithDisplayName, UpdateStages.WithProvider, UpdateStages.WithSource, + UpdateStages.WithSourceType, UpdateStages.WithCreated, UpdateStages.WithUpdated, UpdateStages.WithCreatedBy, @@ -528,8 +529,7 @@ interface Update UpdateStages.WithRawContent, UpdateStages.WithItemsSearchKey, UpdateStages.WithContentType, - UpdateStages.WithUploadStatus, - UpdateStages.WithWatchlistItemsCount { + UpdateStages.WithUploadStatus { /** * Executes the update request. * @@ -590,12 +590,22 @@ interface WithProvider { /** The stage of the Watchlist update allowing to specify source. */ interface WithSource { /** - * Specifies the source property: The source of the watchlist. + * Specifies the source property: The filename of the watchlist, called 'source'. + * + * @param source The filename of the watchlist, called 'source'. + * @return the next definition stage. + */ + Update withSource(String source); + } + /** The stage of the Watchlist update allowing to specify sourceType. */ + interface WithSourceType { + /** + * Specifies the sourceType property: The sourceType of the watchlist. * - * @param source The source of the watchlist. + * @param sourceType The sourceType of the watchlist. * @return the next definition stage. */ - Update withSource(Source source); + Update withSourceType(SourceType sourceType); } /** The stage of the Watchlist update allowing to specify created. */ interface WithCreated { @@ -767,16 +777,6 @@ interface WithUploadStatus { */ Update withUploadStatus(String uploadStatus); } - /** The stage of the Watchlist update allowing to specify watchlistItemsCount. */ - interface WithWatchlistItemsCount { - /** - * Specifies the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount The number of Watchlist Items in the Watchlist. - * @return the next definition stage. - */ - Update withWatchlistItemsCount(Integer watchlistItemsCount); - } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java index 2ffff952419d..97bc46f5f4bd 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the watchlist items. */ @Fluent public final class WatchlistItemList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistItemList.class); - /* * URL to fetch the next set of watchlist item. */ @@ -64,11 +61,13 @@ public WatchlistItemList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model WatchlistItemList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(WatchlistItemList.class); } 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 75c549d075fa..9b56cdba2403 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java @@ -19,7 +19,7 @@ public interface WatchlistItems { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); @@ -29,14 +29,17 @@ public interface WatchlistItems { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java index ed708dcede20..4e03f77f637e 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List all the watchlists. */ @Fluent public final class WatchlistList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistList.class); - /* * URL to fetch the next set of watchlists. */ @@ -64,11 +61,13 @@ public WatchlistList withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model WatchlistList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(WatchlistList.class); } 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 36da96c6514b..4e53d746f064 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java @@ -18,7 +18,7 @@ public interface Watchlists { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -27,13 +27,16 @@ public interface Watchlists { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. @@ -85,9 +88,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the response. */ - Response deleteWithResponse( + WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** @@ -131,9 +134,9 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the response. */ - Response deleteByIdWithResponse(String id, Context context); + WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new Watchlist resource. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java new file mode 100644 index 000000000000..a1a6838904bf --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WatchlistsCreateOrUpdateHeaders model. */ +@Fluent +public final class WatchlistsCreateOrUpdateHeaders { + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the WatchlistsCreateOrUpdateHeaders object itself. + */ + public WatchlistsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java new file mode 100644 index 000000000000..f2d7e3732193 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class WatchlistsCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of WatchlistsCreateOrUpdateResponse. + * + * @param request the request which resulted in this WatchlistsCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public WatchlistsCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + WatchlistInner value, + WatchlistsCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public WatchlistInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java new file mode 100644 index 000000000000..bef6acb4d7a5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WatchlistsDeleteHeaders model. */ +@Fluent +public final class WatchlistsDeleteHeaders { + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the WatchlistsDeleteHeaders object itself. + */ + public WatchlistsDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java new file mode 100644 index 000000000000..5315f66e3e28 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class WatchlistsDeleteResponse extends ResponseBase { + /** + * Creates an instance of WatchlistsDeleteResponse. + * + * @param request the request which resulted in this WatchlistsDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public WatchlistsDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, WatchlistsDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java new file mode 100644 index 000000000000..8495bcf9e510 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Detail about the webhook object. */ +@Fluent +public final class Webhook { + /* + * Unique identifier for the webhook. + */ + @JsonProperty(value = "webhookId") + private String webhookId; + + /* + * URL that gets invoked by the webhook. + */ + @JsonProperty(value = "webhookUrl") + private String webhookUrl; + + /* + * Time when the webhook secret was updated. + */ + @JsonProperty(value = "webhookSecretUpdateTime") + private String webhookSecretUpdateTime; + + /* + * A flag to instruct the backend service to rotate webhook secret. + */ + @JsonProperty(value = "rotateWebhookSecret") + private Boolean rotateWebhookSecret; + + /** + * Get the webhookId property: Unique identifier for the webhook. + * + * @return the webhookId value. + */ + public String webhookId() { + return this.webhookId; + } + + /** + * Set the webhookId property: Unique identifier for the webhook. + * + * @param webhookId the webhookId value to set. + * @return the Webhook object itself. + */ + public Webhook withWebhookId(String webhookId) { + this.webhookId = webhookId; + return this; + } + + /** + * Get the webhookUrl property: URL that gets invoked by the webhook. + * + * @return the webhookUrl value. + */ + public String webhookUrl() { + return this.webhookUrl; + } + + /** + * Set the webhookUrl property: URL that gets invoked by the webhook. + * + * @param webhookUrl the webhookUrl value to set. + * @return the Webhook object itself. + */ + public Webhook withWebhookUrl(String webhookUrl) { + this.webhookUrl = webhookUrl; + return this; + } + + /** + * Get the webhookSecretUpdateTime property: Time when the webhook secret was updated. + * + * @return the webhookSecretUpdateTime value. + */ + public String webhookSecretUpdateTime() { + return this.webhookSecretUpdateTime; + } + + /** + * Set the webhookSecretUpdateTime property: Time when the webhook secret was updated. + * + * @param webhookSecretUpdateTime the webhookSecretUpdateTime value to set. + * @return the Webhook object itself. + */ + public Webhook withWebhookSecretUpdateTime(String webhookSecretUpdateTime) { + this.webhookSecretUpdateTime = webhookSecretUpdateTime; + return this; + } + + /** + * Get the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret. + * + * @return the rotateWebhookSecret value. + */ + public Boolean rotateWebhookSecret() { + return this.rotateWebhookSecret; + } + + /** + * Set the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret. + * + * @param rotateWebhookSecret the rotateWebhookSecret value to set. + * @return the Webhook object itself. + */ + public Webhook withRotateWebhookSecret(Boolean rotateWebhookSecret) { + this.rotateWebhookSecret = rotateWebhookSecret; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java index 5331bf7fb59b..9b3b6f9b94a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java index f3de864cb2b0..664e59d5f56e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java index 7159d8d8dfa2..aee547a158eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java index e19b60830ad0..5e7312fe95ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java @@ -9,7 +9,7 @@ /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java index 02649f24bad0..7333e5c10f4a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java index 684b9d9bad04..8e2e50df2bf9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java @@ -9,7 +9,7 @@ /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java index b4b2045677ab..ad16daa915d4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java @@ -15,6 +15,10 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.FieldMapping; import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSubTypeSetting; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFilter; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFiltersItem; import com.azure.resourcemanager.securityinsights.models.GroupingConfiguration; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.MatchingMethod; @@ -31,7 +35,7 @@ /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -49,12 +53,212 @@ public static void createsOrUpdatesAFusionAlertRule( new FusionAlertRule() .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") - .withEnabled(true), + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -78,7 +282,7 @@ public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -96,13 +300,12 @@ public static void createsOrUpdatesAScheduledAlertRule( new ScheduledAlertRule() .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDescription("An example for a scheduled rule") - .withQuery("Heartbeat") .withDisplayName("My scheduled rule") .withEnabled(true) .withSuppressionDuration(Duration.parse("PT1H")) .withSuppressionEnabled(false) - .withSeverity(AlertSeverity.HIGH) .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) .withIncidentConfiguration( new IncidentConfiguration() .withCreateIncident(true) @@ -116,6 +319,14 @@ public static void createsOrUpdatesAScheduledAlertRule( .withGroupByAlertDetails(Arrays.asList(AlertDetail.DISPLAY_NAME)) .withGroupByCustomDetails( Arrays.asList("OperatingSystemType", "OperatingSystemName")))) + .withQuery("Heartbeat") + .withQueryFrequency(Duration.parse("PT1H")) + .withQueryPeriod(Duration.parse("P2DT1H30M")) + .withSeverity(AlertSeverity.HIGH) + .withTriggerOperator(TriggerOperator.GREATER_THAN) + .withTriggerThreshold(0) + .withEventGroupingSettings( + new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)) .withCustomDetails(mapOf("OperatingSystemName", "OSName", "OperatingSystemType", "OSType")) .withEntityMappings( Arrays @@ -139,18 +350,235 @@ public static void createsOrUpdatesAScheduledAlertRule( .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")) - .withQueryFrequency(Duration.parse("PT1H")) - .withQueryPeriod(Duration.parse("P2DT1H30M")) - .withTriggerOperator(TriggerOperator.GREATER_THAN) - .withTriggerThreshold(0) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + */ + /** + * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRules() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "myFirstFusionRule", + new FusionAlertRule() + .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") + .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -165,7 +593,30 @@ public static void createsOrUpdatesANrtAlertRule( "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new NrtAlertRule().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), + new NrtAlertRule() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDescription("") + .withQuery( + "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity =" + + " ComputerIP_Hidden") + .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) + .withDisplayName("Rule2") + .withEnabled(true) + .withSuppressionDuration(Duration.parse("PT1H")) + .withSuppressionEnabled(false) + .withSeverity(AlertSeverity.HIGH) + .withIncidentConfiguration( + new IncidentConfiguration() + .withCreateIncident(true) + .withGroupingConfiguration( + new GroupingConfiguration() + .withEnabled(true) + .withReopenClosedIncident(false) + .withLookbackDuration(Duration.parse("PT5H")) + .withMatchingMethod(MatchingMethod.SELECTED) + .withGroupByEntities( + Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))), Context.NONE); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java index 8dc6795efc23..e431574c3126 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java index 98757b0e0166..909076889916 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -24,7 +24,7 @@ public static void getAScheduledAlertRule( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -38,7 +38,7 @@ public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights. } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -50,7 +50,7 @@ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsight } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java index 3fa0cf6f4aca..33998a96d87a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java @@ -9,7 +9,7 @@ /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java index ac7611d84067..a6982841bec3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java @@ -4,74 +4,30 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesActionConfiguration; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedOperator; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedProperty; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesCondition; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesConditionProperties; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookActionConfiguration; +import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.TriggersOn; -import com.azure.resourcemanager.securityinsights.models.TriggersWhen; -import java.util.Arrays; +import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/CreateAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an automation rule. + * Sample code: AutomationRules_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnAutomationRule( + public static void automationRulesCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("High severity incidents escalation") - .withOrder(1) - .withTriggeringLogic( - new AutomationRuleTriggeringLogic() - .withIsEnabled(true) - .withTriggersOn(TriggersOn.INCIDENTS) - .withTriggersWhen(TriggersWhen.CREATED) - .withConditions( - Arrays - .asList( - new AutomationRulePropertyValuesCondition() - .withConditionProperties( - new AutomationRulePropertyValuesConditionProperties() - .withPropertyName( - AutomationRulePropertyConditionSupportedProperty - .INCIDENT_RELATED_ANALYTIC_RULE_IDS) - .withOperator(AutomationRulePropertyConditionSupportedOperator.CONTAINS) - .withPropertyValues( - Arrays - .asList( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/fab3d2d4-747f-46a7-8ef0-9c0be8112bf7", - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/8deb8303-e94d-46ff-96e0-5fd94b33df1a")))))) - .withActions( - Arrays - .asList( - new AutomationRuleModifyPropertiesAction() - .withOrder(1) - .withActionConfiguration( - new AutomationRuleModifyPropertiesActionConfiguration() - .withSeverity(IncidentSeverity.HIGH)), - new AutomationRuleRunPlaybookAction() - .withOrder(2) - .withActionConfiguration( - new AutomationRuleRunPlaybookActionConfiguration() - .withLogicAppResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/IncidentPlaybook") - .withTenantId("ee48efaf-50c6-411b-9345-b2bdc3eb4abc")))) + .withDisplayName((String) null) + .withOrder(0) + .withTriggeringLogic((AutomationRuleTriggeringLogic) null) + .withActions((List) null) .create(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java index 3756449b5c83..c44015208a9f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java @@ -9,14 +9,14 @@ /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/DeleteAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** - * Sample code: Delete an automation rule. + * Sample code: AutomationRules_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnAutomationRule( + public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java index b8b8dc007837..c6bd71efc531 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java @@ -9,14 +9,14 @@ /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/GetAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Get.json */ /** - * Sample code: Get an automation rule. + * Sample code: AutomationRules_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAutomationRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java index 4ff1ab5a10d9..8c26f033fc24 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java @@ -9,15 +9,14 @@ /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/GetAllAutomationRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_List.json */ /** - * Sample code: Get all automation rules. + * Sample code: AutomationRules_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllAutomationRules( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager.automationRules().list("myRg", "myWorkspace", Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java index cdb689203566..2ec2050fa5a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java @@ -12,7 +12,7 @@ /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java index fd46e00f39e9..d4f54f2c9d7f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java index b4f421d01b01..1a7bcad864ab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java index 31e4a038d112..95b702dc3431 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java index edeb03bd2e19..9c14ed2e45a6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java index ef4cffc2bf28..561a9faf81ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java @@ -4,6 +4,9 @@ package com.azure.resourcemanager.securityinsights.generated; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; +import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; import java.util.Arrays; @@ -12,7 +15,7 @@ /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -35,6 +38,19 @@ public static void createsOrUpdatesABookmark( .withQueryResult("Security Event query result") .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) .withUpdatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) + .withEntityMappings( + Arrays + .asList( + new BookmarkEntityMappings() + .withEntityType("Account") + .withFieldMappings( + Arrays + .asList( + new EntityFieldMapping() + .withIdentifier("Fullname") + .withValue("johndoe@microsoft.com"))))) + .withTactics(Arrays.asList(AttackTactic.EXECUTION)) + .withTechniques(Arrays.asList("T1609")) .create(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java index 50580df23e73..8854a9ff1662 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java index e22bc00ecc3d..ad247f39ec72 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java index 277c62f35196..d367e0c77181 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java @@ -9,7 +9,7 @@ /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java index 16118bccbc4c..d8f2fefb10fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java @@ -8,18 +8,21 @@ import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; +import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeAtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirements; /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -34,7 +37,22 @@ public static void checkRequirementsForOfficeATP( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + */ + /** + * Sample code: Check requirements for Office365Project. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOffice365Project( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json */ /** * Sample code: Check requirements for AAD. @@ -49,7 +67,7 @@ public static void checkRequirementsForAAD( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -64,7 +82,26 @@ public static void checkRequirementsForMcas( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + */ + /** + * Sample code: Check requirements for IoT. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForIoT( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -79,7 +116,7 @@ public static void checkRequirementsForMdatp( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** * Sample code: Check requirements for AAD - no authorization. @@ -94,7 +131,7 @@ public static void checkRequirementsForAADNoAuthorization( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** * Sample code: Check requirements for ASC. @@ -113,7 +150,7 @@ public static void checkRequirementsForASC( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -128,7 +165,7 @@ public static void checkRequirementsForMicrosoftThreatProtection( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -143,7 +180,7 @@ public static void checkRequirementsForTITaxii( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -158,7 +195,7 @@ public static void checkRequirementsForOfficeIRM( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -173,7 +210,22 @@ public static void checkRequirementsForMicrosoftThreatIntelligence( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + */ + /** + * Sample code: Check requirements for OfficePowerBI. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOfficePowerBI( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -188,7 +240,7 @@ public static void checkRequirementsForDynamics365( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** * Sample code: Check requirements for AAD - no license. @@ -203,7 +255,7 @@ public static void checkRequirementsForAADNoLicense( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java index 262274338c03..dc79db4c403e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java @@ -15,7 +15,7 @@ /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java index b386a213fa65..476d8177c2c0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java @@ -28,11 +28,17 @@ import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; import com.azure.resourcemanager.securityinsights.models.PermissionProviderScope; import com.azure.resourcemanager.securityinsights.models.Permissions; import com.azure.resourcemanager.securityinsights.models.PermissionsCustomsItem; @@ -54,7 +60,7 @@ /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -82,7 +88,32 @@ public static void createsOrUpdatesAnOffice365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + */ + /** + * Sample code: Creates or updates an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new OfficePowerBIDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new OfficePowerBIConnectorDataTypes() + .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -116,7 +147,7 @@ public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -141,7 +172,7 @@ public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -168,7 +199,7 @@ public static void createsOrUpdatesADynamics365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -488,7 +519,32 @@ public static void createsOrUpdatesAGenericUIDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Creates or updates an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new Office365ProjectDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new Office365ProjectConnectorDataTypes() + .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java index 966b1e1f7eaa..eda55ed89f74 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java @@ -9,7 +9,22 @@ /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Delete an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -24,7 +39,7 @@ public static void deleteAGenericUIDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -39,7 +54,22 @@ public static void deleteAnOffice365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + */ + /** + * Sample code: Delete an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java index e7c222afd42e..c78b8bbcfbf9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java @@ -9,7 +9,7 @@ /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java index 904feb8181a0..43d8115babf9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java @@ -9,7 +9,22 @@ /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + */ + /** + * Sample code: Get an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -24,14 +39,14 @@ public static void getAGenericUIDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office ATP data connector. + * Sample code: Get an Office ATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeATPDataConnector( + public static void getAnOfficeATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() @@ -39,7 +54,22 @@ public static void getAOfficeATPDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetIoTById.json + */ + /** + * Sample code: Get a IoT data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAIoTDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -54,7 +84,7 @@ public static void getAMCASDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -69,7 +99,7 @@ public static void getATITaxiiDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -84,7 +114,7 @@ public static void getAMicrosoftThreatIntelligenceDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -99,7 +129,7 @@ public static void getAASCDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -113,7 +143,7 @@ public static void getATIDataConnector(com.azure.resourcemanager.securityinsight } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -128,7 +158,7 @@ public static void getAnAwsCloudTrailDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -143,7 +173,7 @@ public static void getAMDATPDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -158,7 +188,7 @@ public static void getAMicrosoftThreatProtectionDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -173,52 +203,52 @@ public static void getAnAADDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office IRM data connector. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeIRMDataConnector( + public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** - * Sample code: Get an AATP data connector. + * Sample code: Get a APIPolling data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAATPDataConnector( + public static void getAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** - * Sample code: Get a APIPolling data connector. + * Sample code: Get an Office IRM data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAAPIPollingDataConnector( + public static void getAnOfficeIRMDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -233,7 +263,7 @@ public static void getADynamics365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -248,7 +278,7 @@ public static void getAnOffice365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -261,4 +291,19 @@ public static void getAnAwsS3DataConnector( .dataConnectors() .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + */ + /** + * Sample code: Get an Office365 PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365PowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java index 8e975b6cd683..fcb8197a8c3c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java @@ -9,7 +9,7 @@ /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java index 4d6a44dba946..49c61d2fba0e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java @@ -9,7 +9,7 @@ /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java index 3a424ef176f1..cae025be116e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java @@ -12,7 +12,7 @@ /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java index 5a386b78ca17..2ee4be9116f1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java @@ -13,7 +13,7 @@ /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java index 9f199b6267dd..32e99a543520 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -22,7 +22,7 @@ public static void getASubmissionMailEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -34,7 +34,7 @@ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.Secu } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -46,7 +46,7 @@ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -59,7 +59,7 @@ public static void getAnIoTDeviceEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -72,7 +72,7 @@ public static void getARegistryKeyEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -84,7 +84,7 @@ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights. } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -96,7 +96,7 @@ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights. } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -109,7 +109,7 @@ public static void getASecurityAlertEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -121,7 +121,7 @@ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.Secu } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -133,7 +133,7 @@ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -146,7 +146,7 @@ public static void getACloudApplicationEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -158,7 +158,7 @@ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.Sec } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -171,7 +171,7 @@ public static void getARegistryValueEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -183,7 +183,7 @@ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.Secu } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -196,7 +196,7 @@ public static void getAMailClusterEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -209,7 +209,7 @@ public static void getASecurityGroupEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -222,7 +222,7 @@ public static void getAMailMessageEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -235,7 +235,7 @@ public static void getAnAzureResourceEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -247,7 +247,7 @@ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.Sec } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java index 1c23634f7b01..b80ff8f36f56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java @@ -11,7 +11,7 @@ /** Samples for EntitiesGetTimeline List. */ public final class EntitiesGetTimelineListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java index 244186529593..35f906a7b8dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java @@ -9,7 +9,7 @@ /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java index 19392ede6247..83346ff69d58 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java @@ -10,7 +10,7 @@ /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java index 05c15b6fe4eb..e31e324573d1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java index b50cd3e5936c..0562e9cfc1d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java index b0ebc8807922..4baec20eb107 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java index 91fe2c9f36d3..91a7de848601 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -24,7 +24,7 @@ public static void getAnActivityEntityQuery( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java index ef4c72ff84eb..4829a401c4f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java @@ -10,7 +10,7 @@ /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java index 5f4b9c3ecc61..41329bae9ce7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java index 0236af125a46..7f74d931673e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java @@ -5,12 +5,12 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -19,6 +19,6 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant69.ACTIVITY, Context.NONE); + manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant73.ACTIVITY, Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java index c60685eeaa1f..967e2a1f8571 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java @@ -9,7 +9,7 @@ /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java index 18363206a35f..dcdc60f0d59c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/CreateIncidentComment.json */ /** * Sample code: Creates or updates an incident comment. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java index 90102df9cb50..a2c22acddfa3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/DeleteIncidentComment.json */ /** * Sample code: Delete the incident comment. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java index 6e65461101f5..f92d7671ddd2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetIncidentCommentById.json */ /** * Sample code: Get an incident comment. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java index 89ca41cc82de..dd5db23d3b66 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetAllIncidentComments.json */ /** * Sample code: Get all incident comments. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java index dda5fd5e067b..e4dbe55e6452 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java index 4e50610251a3..0b2685360afb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java index a7237d9e1adc..9a56036b3591 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java index 97abf23d557c..af1559bca582 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java index 1e178ad78497..1e61c295838c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateIncident.json */ /** * Sample code: Creates or updates an incident. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java index 42bae288113f..9f51ac1f47b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java @@ -10,7 +10,7 @@ /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateTeam.json */ /** * Sample code: Creates incident teams group. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java index 69b48ede0c6f..352c7fdb00bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/DeleteIncident.json */ /** * Sample code: Delete an incident. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java index 6e4950e0e5da..65e0538114ec 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidentById.json */ /** * Sample code: Get an incident. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java index 1d641b6ef9f3..f231dada3cfc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java @@ -9,7 +9,7 @@ /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentAlerts.json */ /** * Sample code: Get all incident alerts. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java index 4866c7178b39..83e761052964 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java @@ -9,7 +9,7 @@ /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentBookmarks.json */ /** * Sample code: Get all incident bookmarks. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java index 5917f8a4af6c..80746978d424 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java @@ -9,7 +9,7 @@ /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/entities/GetAllIncidentEntities.json */ /** * Sample code: Gets all incident related entities. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java index 3fd7022bb85f..33565f2be12f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidents.json */ /** * Sample code: Get all incidents. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java new file mode 100644 index 000000000000..b37626638809 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.core.util.Context; + +/** Samples for Incidents RunPlaybook. */ +public final class IncidentsRunPlaybookSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/manualTrigger/AutomationRules_ManualTriggerPlaybook.json + */ + /** + * Sample code: AutomationRules_ManualTriggerPlaybook. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void automationRulesManualTriggerPlaybook( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java index 2993b19987e4..af5231a560af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java @@ -9,7 +9,7 @@ /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java index 25f1439922bd..b3d023892ffa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java @@ -19,7 +19,7 @@ /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -85,11 +85,17 @@ public static void createUpdateFullMetadata( .withProviders(Arrays.asList("Amazon", "Microsoft")) .withFirstPublishDate(LocalDate.parse("2021-05-18")) .withLastPublishDate(LocalDate.parse("2021-05-18")) + .withCustomVersion("1.0") + .withContentSchemaVersion("2.0") + .withThreatAnalysisTactics(Arrays.asList("reconnaissance", "commandandcontrol")) + .withThreatAnalysisTechniques(Arrays.asList("T1548", "T1548.001")) + .withPreviewImages(Arrays.asList("firstImage.png", "secondImage.jpeg")) + .withPreviewImagesDark(Arrays.asList("firstImageDark.png", "secondImageDark.jpeg")) .create(); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java index 6dd1e0a62f6b..e7528c2f9034 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java index 8a1e5f02348b..b24c97efb6b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java index f61a7bf45c27..803804034850 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java @@ -9,7 +9,7 @@ /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -21,7 +21,7 @@ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.Sec } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java index c6839610fe8e..32fa0735719e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java index c49455b51be6..11a9c9492899 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java index 3e6551d94b19..d7aed106d472 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java index aeaebafce4ea..8e7cbbb5a7ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java new file mode 100644 index 000000000000..bed648054f30 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/operations/ListOperations.json + */ + /** + * Sample code: Get all operations. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java index 9cb4fdf52408..a3787b334bdb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ProductSettings Delete. */ public final class ProductSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java index bd20095f5c6c..27a8fe8489c0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java index 3ef3cd84cdc6..d7b73a433591 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java index 1c58f5a79940..b4468a884a73 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java index 1b23448977d0..b9650dcbc4c0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java index 3bdc04f8f8a3..c958ffaf6903 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java index 7f039b362acc..df3c9c84d0b6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java index cd12b77a568d..680c0cb4a011 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java @@ -9,7 +9,7 @@ /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java index 94b21485bb0a..c4d993f2e100 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java @@ -10,7 +10,7 @@ /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java index 835128803956..7adef0fd6e21 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java @@ -13,7 +13,7 @@ /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java index 1396806d72a4..fc6b52d60453 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java index 4361a8dd0f86..b3220a447ee0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java @@ -9,7 +9,7 @@ /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java index 80381ef45967..faccc304e42a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java @@ -9,7 +9,7 @@ /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java index 9749bc270173..d10b1d5e0e53 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java @@ -11,7 +11,7 @@ /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java index 4bb2ca256524..c5f4eeb864f0 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 @@ -5,14 +5,13 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; +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/2021-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -26,8 +25,7 @@ public static void createANewThreatIntelligence( .createIndicatorWithResponse( "myRg", "myWorkspace", - new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) + new ThreatIntelligenceIndicatorModel() .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java index 29f6e3bb7a5f..751cabfd6e8c 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 @@ -5,14 +5,13 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; +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/2021-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -27,8 +26,7 @@ public static void updateAThreatIntelligenceIndicator( "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) + new ThreatIntelligenceIndicatorModel() .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java index 3390496ddde3..3b537f0efa46 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java index 32de3f040f1c..80a6234ee5de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java index bb65f1330542..e3181145425c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java index c596ee8d3efd..451fbf767a72 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java @@ -13,7 +13,7 @@ /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java index 1d69de18fcfa..2cf5e26d2646 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 @@ -5,14 +5,13 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; +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/2021-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -27,8 +26,7 @@ public static void replaceTagsToAThreatIntelligence( "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) + new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), Context.NONE); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java index 92a575f59541..6ca8bd43c54d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java index 3f661f4e2530..8744456435dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java index 3af2a66b8040..f347da736b8a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java index febc5d6875e5..f2dbd0979245 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java index 311a49ce9121..cb96e8310cac 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java @@ -9,7 +9,7 @@ /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -18,6 +18,6 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java index da86ccd85778..c4ec3de133eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java @@ -4,12 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -25,7 +25,8 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withNumberOfLinesToSkip(1) .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") @@ -35,7 +36,7 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. @@ -51,7 +52,8 @@ public static void createsOrUpdatesAWatchlist( .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withItemsSearchKey("header1") .create(); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java index db8514012dd0..0da4b6a0ef12 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java index 27f293170fdd..62a3c7de6073 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java index a058a896ab86..a80168d01c39 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -17,6 +17,6 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); } }