From e0238c41aeeb36a4eca7a1881bcbbda136a6aced Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 23 Oct 2022 09:01:01 +0000 Subject: [PATCH] CodeGen from PR 21205 in Azure/azure-rest-api-specs Merge ce2f6970e86f340a41607b38307cc5004c30d4a9 into 5b1d4a49bb0debf5efc3e8d33108b0681eebc1ab --- .../src/Generated/BookmarkOperations.cs | 310 ---- .../Generated/BookmarkOperationsExtensions.cs | 79 - .../Generated/BookmarkRelationsOperations.cs | 1262 -------------- .../BookmarkRelationsOperationsExtensions.cs | 289 ---- ...taConnectorsCheckRequirementsOperations.cs | 300 ---- ...rsCheckRequirementsOperationsExtensions.cs | 71 - .../src/Generated/DataConnectorsOperations.cs | 454 ----- .../DataConnectorsOperationsExtensions.cs | 92 - .../src/Generated/DomainWhoisOperations.cs | 278 --- .../DomainWhoisOperationsExtensions.cs | 65 - .../EntitiesGetTimelineOperations.cs | 314 ---- ...EntitiesGetTimelineOperationsExtensions.cs | 79 - .../src/Generated/EntitiesOperations.cs | 1461 ---------------- .../Generated/EntitiesOperationsExtensions.cs | 295 ---- .../Generated/EntitiesRelationsOperations.cs | 492 ------ .../EntitiesRelationsOperationsExtensions.cs | 124 -- .../EntityQueriesOperationsExtensions.cs | 248 --- .../EntityQueryTemplatesOperations.cs | 709 -------- ...ntityQueryTemplatesOperationsExtensions.cs | 153 -- .../Generated/EntityRelationsOperations.cs | 304 ---- .../EntityRelationsOperationsExtensions.cs | 77 - .../src/Generated/IBookmarkOperations.cs | 59 - .../Generated/IBookmarkRelationsOperations.cs | 184 -- ...taConnectorsCheckRequirementsOperations.cs | 55 - .../Generated/IDataConnectorsOperations.cs | 53 - .../src/Generated/IDomainWhoisOperations.cs | 52 - .../IEntitiesGetTimelineOperations.cs | 59 - .../src/Generated/IEntitiesOperations.cs | 193 --- .../Generated/IEntitiesRelationsOperations.cs | 88 - .../IEntityQueryTemplatesOperations.cs | 106 -- .../Generated/IEntityRelationsOperations.cs | 58 - .../src/Generated/IIPGeodataOperations.cs | 52 - .../Generated/IIncidentCommentsOperations.cs | 10 +- .../Generated/IIncidentRelationsOperations.cs | 10 +- .../src/Generated/IIncidentsOperations.cs | 75 +- .../src/Generated/IMetadataOperations.cs | 202 --- .../Generated/IOfficeConsentsOperations.cs | 127 -- .../src/Generated/IPGeodataOperations.cs | 278 --- .../IPGeodataOperationsExtensions.cs | 65 - .../Generated/IProductSettingsOperations.cs | 139 -- .../src/Generated/ISecurityInsights.cs | 87 +- ...ISecurityMLAnalyticsSettingsOperations.cs} | 44 +- .../src/Generated/ISourceControlOperations.cs | 77 - .../Generated/ISourceControlsOperations.cs | 158 -- ...IThreatIntelligenceIndicatorsOperations.cs | 8 +- .../Generated/IWatchlistItemsOperations.cs | 22 +- .../src/Generated/IWatchlistsOperations.cs | 25 +- .../Generated/IncidentCommentsOperations.cs | 10 +- .../IncidentCommentsOperationsExtensions.cs | 20 +- .../Generated/IncidentRelationsOperations.cs | 10 +- .../IncidentRelationsOperationsExtensions.cs | 20 +- .../src/Generated/IncidentsOperations.cs | 530 +----- .../IncidentsOperationsExtensions.cs | 130 +- .../src/Generated/MetadataOperations.cs | 1485 ----------------- .../Generated/MetadataOperationsExtensions.cs | 318 ---- .../Generated/Models/AADCheckRequirements.cs | 69 - .../src/Generated/Models/AADDataConnector.cs | 23 +- .../Generated/Models/AATPCheckRequirements.cs | 70 - .../src/Generated/Models/AATPDataConnector.cs | 23 +- .../Generated/Models/ASCCheckRequirements.cs | 57 - .../src/Generated/Models/ASCDataConnector.cs | 13 - .../src/Generated/Models/AccountEntity.cs | 6 +- .../src/Generated/Models/ActionResponse.cs | 13 +- .../Models/ActivityCustomEntityQuery.cs | 169 -- .../Generated/Models/ActivityEntityQuery.cs | 169 -- .../Models/ActivityEntityQueryTemplate.cs | 143 -- ...QueryTemplatePropertiesQueryDefinitions.cs | 64 - .../Generated/Models/ActivityTimelineItem.cs | 126 -- .../src/Generated/Models/AlertRuleKind.cs | 3 - .../Models/AlertRuleTemplatePropertiesBase.cs | 112 -- .../AlertRuleTemplateWithMitreProperties.cs | 78 - .../Models/AlertsDataTypeOfDataConnector.cs | 20 +- .../src/Generated/Models/Anomalies.cs | 65 - .../AnomalySecurityMLAnalyticsSettings.cs | 221 +++ .../src/Generated/Models/AutomationRule.cs | 21 +- .../Generated/Models/AutomationRuleAction.cs | 2 +- .../Models/AutomationRuleCondition.cs | 2 +- ...ArrayChangedConditionSupportedArrayType.cs | 37 + ...rayChangedConditionSupportedChangeType.cs} | 10 +- ...RulePropertyArrayChangedValuesCondition.cs | 60 + ...tyChangedConditionSupportedChangedType.cs} | 20 +- ...yChangedConditionSupportedPropertyType.cs} | 17 +- ...nRulePropertyConditionSupportedProperty.cs | 8 + ...ationRulePropertyValuesChangedCondition.cs | 81 + .../AutomationRulePropertyValuesCondition.cs | 16 +- .../Models/AutomationRuleRunPlaybookAction.cs | 4 + .../Models/AutomationRuleTriggeringLogic.cs | 50 +- .../src/Generated/Models/Availability.cs | 59 - .../Models/AwsCloudTrailCheckRequirements.cs | 38 - .../Models/AwsCloudTrailDataConnector.cs | 23 +- .../AwsCloudTrailDataConnectorDataTypes.cs | 20 +- ...AwsCloudTrailDataConnectorDataTypesLogs.cs | 12 +- .../Models/AwsS3CheckRequirements.cs | 37 - .../Generated/Models/AwsS3DataConnector.cs | 124 -- .../Models/AwsS3DataConnectorDataTypes.cs | 71 - .../Models/AwsS3DataConnectorDataTypesLogs.cs | 58 - .../Models/AzureDevOpsResourceInfo.cs | 62 - .../src/Generated/Models/Bookmark.cs | 28 +- .../Models/BookmarkEntityMappings.cs | 62 - .../Models/BookmarkExpandParameters.cs | 73 - .../Models/BookmarkExpandResponse.cs | 60 - .../Models/BookmarkExpandResponseValue.cs | 65 - .../Generated/Models/BookmarkTimelineItem.cs | 127 -- .../Models/CodelessApiPollingDataConnector.cs | 94 -- .../CodelessConnectorPollingAuthProperties.cs | 184 -- ...odelessConnectorPollingConfigProperties.cs | 124 -- ...odelessConnectorPollingPagingProperties.cs | 142 -- ...delessConnectorPollingRequestProperties.cs | 182 -- ...elessConnectorPollingResponseProperties.cs | 100 -- .../CodelessUiConnectorConfigProperties.cs | 208 --- ...onfigPropertiesConnectivityCriteriaItem.cs | 47 - ...iConnectorConfigPropertiesDataTypesItem.cs | 46 - ...nnectorConfigPropertiesGraphQueriesItem.cs | 46 - ...torConfigPropertiesInstructionStepsItem.cs | 47 - ...nectorConfigPropertiesSampleQueriesItem.cs | 44 - .../Models/CodelessUiDataConnector.cs | 79 - .../src/Generated/Models/ConditionType.cs | 8 + .../src/Generated/Models/ConnectAuthKind.cs | 23 - .../src/Generated/Models/ConnectedEntity.cs | 61 - .../Generated/Models/ConnectivityCriteria.cs | 63 - .../src/Generated/Models/ConnectivityType.cs | 21 - .../Models/ConnectorInstructionModelBase.cs | 78 - .../src/Generated/Models/ContentPathMap.cs | 61 - .../src/Generated/Models/ContentType.cs | 22 - .../src/Generated/Models/CustomEntityQuery.cs | 52 - .../src/Generated/Models/Customs.cs | 45 - .../src/Generated/Models/CustomsPermission.cs | 59 - .../src/Generated/Models/DataConnector.cs | 2 +- .../Models/DataConnectorAuthorizationState.cs | 22 - .../Models/DataConnectorConnectBody.cs | 115 -- .../Models/DataConnectorDataTypeCommon.cs | 16 +- .../src/Generated/Models/DataConnectorKind.cs | 12 - .../Models/DataConnectorLicenseState.cs | 23 - .../Models/DataConnectorRequirementsState.cs | 65 - .../Generated/Models/DataConnectorTenantId.cs | 16 +- .../DataConnectorWithAlertsProperties.cs | 13 - .../Models/DataConnectorsCheckRequirements.cs | 36 - .../Generated/Models/DataTypeDefinitions.cs | 51 - .../src/Generated/Models/Deployment.cs | 90 - .../Generated/Models/DeploymentFetchStatus.cs | 23 - .../src/Generated/Models/DeploymentInfo.cs | 72 - .../src/Generated/Models/DeploymentResult.cs | 23 - .../src/Generated/Models/DeploymentState.cs | 24 - .../Models/Dynamics365CheckRequirements.cs | 71 - .../Models/Dynamics365DataConnector.cs | 96 -- .../Dynamics365DataConnectorDataTypes.cs | 72 - ...nectorDataTypesDynamics365CdsActivities.cs | 58 - .../Generated/Models/EnrichmentDomainWhois.cs | 96 -- .../Models/EnrichmentDomainWhoisContact.cs | 128 -- .../Models/EnrichmentDomainWhoisContacts.cs | 80 - .../Models/EnrichmentDomainWhoisDetails.cs | 83 - .../EnrichmentDomainWhoisRegistrarDetails.cs | 98 -- .../Generated/Models/EnrichmentIpGeodata.cs | 199 --- .../src/Generated/Models/EntityAnalytics.cs | 65 - .../src/Generated/Models/EntityEdges.cs | 63 - .../Models/EntityExpandParameters.cs | 73 - .../Generated/Models/EntityExpandResponse.cs | 60 - .../Models/EntityExpandResponseValue.cs | 64 - .../Generated/Models/EntityFieldMapping.cs | 59 - .../Models/EntityGetInsightsParameters.cs | 98 -- .../Models/EntityGetInsightsResponse.cs | 75 - .../src/Generated/Models/EntityInsightItem.cs | 80 - .../EntityInsightItemQueryTimeInterval.cs | 61 - .../{EntityKind.cs => EntityKindEnum.cs} | 4 +- .../src/Generated/Models/EntityQueryItem.cs | 67 - .../Models/EntityQueryItemProperties.cs | 90 - .../EntityQueryItemPropertiesDataTypesItem.cs | 50 - .../src/Generated/Models/EntityQueryKind.cs | 23 - .../Generated/Models/EntityQueryTemplate.cs | 51 - .../Models/EntityQueryTemplateKind.cs | 21 - .../Models/EntityTimelineParameters.cs | 92 - .../Models/EntityTimelineResponse.cs | 75 - .../src/Generated/Models/EntityType.cs | 104 -- .../Generated/Models/ExpansionEntityQuery.cs | 125 -- .../Models/ExpansionResultAggregation.cs | 104 -- .../Models/ExpansionResultsMetadata.cs | 55 - .../src/Generated/Models/EyesOn.cs | 65 - .../src/Generated/Models/FusionAlertRule.cs | 42 +- .../Models/FusionAlertRuleTemplate.cs | 17 +- .../Models/FusionScenarioExclusionPattern.cs | 81 - .../Generated/Models/FusionSourceSettings.cs | 99 -- .../Models/FusionSourceSubTypeSetting.cs | 104 -- .../Models/FusionSubTypeSeverityFilter.cs | 68 - .../FusionSubTypeSeverityFiltersItem.cs | 83 - .../Models/FusionTemplateSourceSetting.cs | 91 - .../Models/FusionTemplateSourceSubType.cs | 98 -- .../FusionTemplateSubTypeSeverityFilter.cs | 78 - .../src/Generated/Models/GetInsightsError.cs | 86 - .../Models/GetInsightsResultsMetadata.cs | 81 - .../Generated/Models/GetQueriesResponse.cs | 53 - .../Generated/Models/GitHubResourceInfo.cs | 52 - .../src/Generated/Models/GraphQueries.cs | 68 - .../src/Generated/Models/Incident.cs | 30 +- .../Models/IncidentAdditionalData.cs | 21 +- .../src/Generated/Models/IncidentOwnerInfo.cs | 6 +- .../Models/IncidentPropertiesAction.cs | 8 +- .../src/Generated/Models/InsightQueryItem.cs | 57 - .../Models/InsightQueryItemProperties.cs | 122 -- ...sightQueryItemPropertiesAdditionalQuery.cs | 61 - ...ightQueryItemPropertiesDefaultTimeRange.cs | 63 - .../InsightQueryItemPropertiesTableQuery.cs | 65 - ...pertiesTableQueryColumnsDefinitionsItem.cs | 68 - ...pertiesTableQueryQueriesDefinitionsItem.cs | 76 - ...finitionsItemLinkColumnsDefinitionsItem.cs | 61 - .../Generated/Models/InsightsTableResult.cs | 61 - .../Models/InsightsTableResultColumnsItem.cs | 58 - .../src/Generated/Models/InstructionSteps.cs | 69 - .../InstructionStepsInstructionsItem.cs | 56 - .../Generated/Models/IoTCheckRequirements.cs | 57 - .../src/Generated/Models/IoTDataConnector.cs | 89 - .../src/Generated/Models/Kind.cs | 37 - .../Models/LastDataReceivedDataType.cs | 62 - .../Generated/Models/MCASCheckRequirements.cs | 70 - .../src/Generated/Models/MCASDataConnector.cs | 31 +- .../Models/MCASDataConnectorDataTypes.cs | 16 +- .../Models/MDATPCheckRequirements.cs | 70 - .../Generated/Models/MDATPDataConnector.cs | 23 +- .../Models/MLBehaviorAnalyticsAlertRule.cs | 148 -- .../MLBehaviorAnalyticsAlertRuleTemplate.cs | 165 -- .../Generated/Models/MSTICheckRequirements.cs | 69 - .../src/Generated/Models/MSTIDataConnector.cs | 96 -- .../Models/MSTIDataConnectorDataTypes.cs | 90 - ...ConnectorDataTypesBingSafetyPhishingURL.cs | 72 - ...torDataTypesMicrosoftEmergingThreatFeed.cs | 72 - .../src/Generated/Models/MTPDataConnector.cs | 96 -- .../Models/MTPDataConnectorDataTypes.cs | 72 - .../MTPDataConnectorDataTypesIncidents.cs | 58 - .../Models/ManualTriggerRequestBody.cs | 52 - .../src/Generated/Models/MetadataAuthor.cs | 67 - .../Generated/Models/MetadataCategories.cs | 62 - .../Generated/Models/MetadataDependencies.cs | 119 -- .../src/Generated/Models/MetadataModel.cs | 297 ---- .../src/Generated/Models/MetadataPatch.cs | 289 ---- .../src/Generated/Models/MetadataSource.cs | 88 - .../src/Generated/Models/MetadataSupport.cs | 94 -- ...rosoftSecurityIncidentCreationAlertRule.cs | 6 +- ...cidentCreationAlertRuleCommonProperties.cs | 6 +- ...curityIncidentCreationAlertRuleTemplate.cs | 53 +- .../Models/MicrosoftSecurityProductName.cs | 2 - .../Generated/Models/MtpCheckRequirements.cs | 70 - .../src/Generated/Models/NrtAlertRule.cs | 239 --- .../Generated/Models/NrtAlertRuleTemplate.cs | 155 -- .../Office365ProjectCheckRequirements.cs | 71 - .../Office365ProjectConnectorDataTypes.cs | 71 - .../Office365ProjectConnectorDataTypesLogs.cs | 58 - .../Models/Office365ProjectDataConnector.cs | 98 -- .../Models/OfficeATPCheckRequirements.cs | 70 - .../Models/OfficeATPDataConnector.cs | 93 -- .../src/Generated/Models/OfficeConsent.cs | 73 - .../Generated/Models/OfficeDataConnector.cs | 31 +- .../Models/OfficeDataConnectorDataTypes.cs | 36 +- .../OfficeDataConnectorDataTypesExchange.cs | 12 +- .../OfficeDataConnectorDataTypesSharePoint.cs | 12 +- .../OfficeDataConnectorDataTypesTeams.cs | 12 +- .../Models/OfficeIRMCheckRequirements.cs | 70 - .../Models/OfficeIRMDataConnector.cs | 93 -- .../Models/OfficePowerBICheckRequirements.cs | 71 - .../Models/OfficePowerBIConnectorDataTypes.cs | 71 - .../OfficePowerBIConnectorDataTypesLogs.cs | 58 - .../Models/OfficePowerBIDataConnector.cs | 96 -- .../src/Generated/Models/OutputType.cs | 24 - .../Models/PermissionProviderScope.cs | 23 - .../src/Generated/Models/Permissions.cs | 64 - .../Models/PermissionsCustomsItem.cs | 42 - .../Models/PermissionsResourceProviderItem.cs | 57 - .../Models/PlaybookActionProperties.cs | 24 +- ...ropertyArrayChangedConditionProperties.cs} | 23 +- ... => PropertyChangedConditionProperties.cs} | 23 +- .../src/Generated/Models/ProviderName.cs | 26 - .../QueryBasedAlertRuleTemplateProperties.cs | 107 -- .../src/Generated/Models/Repo.cs | 69 - .../src/Generated/Models/RepoType.cs | 22 - .../src/Generated/Models/Repository.cs | 88 - .../Models/RepositoryResourceInfo.cs | 71 - .../Generated/Models/RequiredPermissions.cs | 75 - .../src/Generated/Models/ResourceProvider.cs | 100 -- .../src/Generated/Models/SampleQueries.cs | 59 - .../Models/ScheduledAlertRuleTemplate.cs | 5 +- .../Models/SecurityAlertTimelineItem.cs | 144 -- ...Query.cs => SecurityMLAnalyticsSetting.cs} | 12 +- .../SecurityMLAnalyticsSettingsDataSource.cs | 67 + ....cs => SecurityMLAnalyticsSettingsKind.cs} | 7 +- .../src/Generated/Models/SettingList.cs | 67 - .../src/Generated/Models/SettingType.cs | 23 - .../src/Generated/Models/Settings.cs | 52 - ...{PollingFrequency.cs => SettingsStatus.cs} | 16 +- .../src/Generated/Models/Sku.cs | 62 - .../src/Generated/Models/SkuKind.cs | 22 - .../Models/{SourceType.cs => Source.cs} | 4 +- .../src/Generated/Models/SourceControl.cs | 167 -- .../src/Generated/Models/SourceKind.cs | 24 - .../src/Generated/Models/SupportTier.cs | 23 - .../Generated/Models/TICheckRequirements.cs | 69 - .../src/Generated/Models/TIDataConnector.cs | 31 +- .../Models/TIDataConnectorDataTypes.cs | 20 +- .../TIDataConnectorDataTypesIndicators.cs | 12 +- .../src/Generated/Models/TeamInformation.cs | 85 - .../src/Generated/Models/TeamProperties.cs | 93 -- .../Models/ThreatIntelligenceAlertRule.cs | 148 -- .../ThreatIntelligenceAlertRuleTemplate.cs | 165 -- ...=> ThreatIntelligenceResourceInnerKind.cs} | 4 +- ...m.cs => ThreatIntelligenceSortingOrder.cs} | 4 +- .../Models/TiTaxiiCheckRequirements.cs | 69 - .../Generated/Models/TiTaxiiDataConnector.cs | 173 -- .../Models/TiTaxiiDataConnectorDataTypes.cs | 71 - ...iTaxiiDataConnectorDataTypesTaxiiClient.cs | 58 - .../Generated/Models/TimelineAggregation.cs | 75 - .../src/Generated/Models/TimelineError.cs | 87 - .../Models/TimelineResultsMetadata.cs | 104 -- .../src/Generated/Models/TriggersOn.cs | 4 + .../src/Generated/Models/TriggersWhen.cs | 4 + .../src/Generated/Models/Ueba.cs | 67 - .../src/Generated/Models/UebaDataSources.cs | 24 - .../src/Generated/Models/Version.cs | 22 - .../src/Generated/Models/Watchlist.cs | 54 +- .../src/Generated/Models/WatchlistItem.cs | 2 +- .../Models/WatchlistsCreateOrUpdateHeaders.cs | 55 - .../Models/WatchlistsDeleteHeaders.cs | 54 - .../src/Generated/Models/Webhook.cs | 79 - .../src/Generated/OfficeConsentsOperations.cs | 920 ---------- .../OfficeConsentsOperationsExtensions.cs | 188 --- .../Generated/ProductSettingsOperations.cs | 1002 ----------- .../ProductSettingsOperationsExtensions.cs | 206 --- .../src/Generated/SdkInfo_SecurityInsights.cs | 60 +- .../src/Generated/SecurityInsights.cs | 130 +- ... SecurityMLAnalyticsSettingsOperations.cs} | 113 +- ...LAnalyticsSettingsOperationsExtensions.cs} | 98 +- .../src/Generated/SourceControlOperations.cs | 473 ------ .../SourceControlOperationsExtensions.cs | 105 -- .../src/Generated/SourceControlsOperations.cs | 1197 ------------- .../ThreatIntelligenceIndicatorsOperations.cs | 18 +- ...elligenceIndicatorsOperationsExtensions.cs | 20 +- .../src/Generated/WatchlistItemsOperations.cs | 24 +- .../WatchlistItemsOperationsExtensions.cs | 44 +- .../src/Generated/WatchlistsOperations.cs | 53 +- .../WatchlistsOperationsExtensions.cs | 49 +- 336 files changed, 1093 insertions(+), 32903 deletions(-) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkRelationsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsCheckRequirementsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDomainWhoisOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesGetTimelineOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesRelationsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueryTemplatesOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityRelationsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIPGeodataOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IMetadataOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IOfficeConsentsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IProductSettingsOperations.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/{IEntityQueriesOperations.cs => ISecurityMLAnalyticsSettingsOperations.cs} (72%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQuery.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityTimelineItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplatePropertiesBase.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Anomalies.cs create mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.cs create mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{CustomEntityQueryKind.cs => AutomationRulePropertyArrayChangedConditionSupportedChangeType.cs} (57%) create mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{EntityTimelineItem.cs => AutomationRulePropertyChangedConditionSupportedChangedType.cs} (56%) rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{EntityTimelineKind.cs => AutomationRulePropertyChangedConditionSupportedPropertyType.cs} (52%) create mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Availability.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypesLogs.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandParameters.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponse.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesDataTypesItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectAuthKind.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectedEntity.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityCriteria.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentPathMap.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQuery.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Customs.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomsPermission.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorAuthorizationState.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorConnectBody.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorLicenseState.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataTypeDefinitions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentIpGeodata.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityAnalytics.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityEdges.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandParameters.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponse.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsParameters.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{EntityKind.cs => EntityKindEnum.cs} (97%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryKind.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplate.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplateKind.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineParameters.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineResponse.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EyesOn.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsError.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetQueriesResponse.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GraphQueries.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResult.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionSteps.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionStepsInstructionsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTICheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesBingSafetyPhishingURL.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypesIncidents.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataAuthor.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataCategories.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSource.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSupport.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MtpCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeConsent.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OutputType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionProviderScope.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Permissions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsCustomsItem.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsResourceProviderItem.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{InsightQueryItemPropertiesReferenceTimeRange.cs => PropertyArrayChangedConditionProperties.cs} (55%) rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{ActivityEntityQueriesPropertiesQueryDefinitions.cs => PropertyChangedConditionProperties.cs} (56%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ProviderName.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repo.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepoType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repository.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RequiredPermissions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ResourceProvider.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SampleQueries.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{EntityQuery.cs => SecurityMLAnalyticsSetting.cs} (75%) create mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{OperatorModel.cs => SecurityMLAnalyticsSettingsKind.cs} (73%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingList.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingType.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Settings.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{PollingFrequency.cs => SettingsStatus.cs} (60%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Sku.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SkuKind.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{SourceType.cs => Source.cs} (88%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceKind.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SupportTier.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TICheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamInformation.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamProperties.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{ThreatIntelligenceResourceKindEnum.cs => ThreatIntelligenceResourceInnerKind.cs} (83%) rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/{ThreatIntelligenceSortingCriteriaEnum.cs => ThreatIntelligenceSortingOrder.cs} (83%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiCheckRequirements.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnector.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypes.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypesTaxiiClient.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineAggregation.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineError.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineResultsMetadata.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Ueba.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/UebaDataSources.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperationsExtensions.cs rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/{EntityQueriesOperations.cs => SecurityMLAnalyticsSettingsOperations.cs} (91%) rename sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/{SourceControlsOperationsExtensions.cs => SecurityMLAnalyticsSettingsOperationsExtensions.cs} (60%) delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperationsExtensions.cs delete mode 100644 sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs deleted file mode 100644 index 4e9346626c3f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs +++ /dev/null @@ -1,310 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// BookmarkOperations operations. - /// - internal partial class BookmarkOperations : IServiceOperations, IBookmarkOperations - { - /// - /// Initializes a new instance of the BookmarkOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal BookmarkOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Expand an bookmark - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// The parameters required to execute an expand operation on the given - /// bookmark. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ExpandWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, BookmarkExpandParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (bookmarkId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "bookmarkId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("bookmarkId", bookmarkId); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Expand", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{bookmarkId}", System.Uri.EscapeDataString(bookmarkId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperationsExtensions.cs deleted file mode 100644 index 510ff0b89b06..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperationsExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for BookmarkOperations. - /// - public static partial class BookmarkOperationsExtensions - { - /// - /// Expand an bookmark - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// The parameters required to execute an expand operation on the given - /// bookmark. - /// - public static BookmarkExpandResponse Expand(this IBookmarkOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, BookmarkExpandParameters parameters) - { - return operations.ExpandAsync(resourceGroupName, workspaceName, bookmarkId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Expand an bookmark - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// The parameters required to execute an expand operation on the given - /// bookmark. - /// - /// - /// The cancellation token. - /// - public static async Task ExpandAsync(this IBookmarkOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, BookmarkExpandParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExpandWithHttpMessagesAsync(resourceGroupName, workspaceName, bookmarkId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs deleted file mode 100644 index 91f6924fc204..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs +++ /dev/null @@ -1,1262 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// BookmarkRelationsOperations operations. - /// - internal partial class BookmarkRelationsOperations : IServiceOperations, IBookmarkRelationsOperations - { - /// - /// Initializes a new instance of the BookmarkRelationsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal BookmarkRelationsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets all bookmark relations. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (bookmarkId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "bookmarkId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("odataQuery", odataQuery); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("bookmarkId", bookmarkId); - tracingParameters.Add("skipToken", skipToken); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{bookmarkId}", System.Uri.EscapeDataString(bookmarkId)); - List _queryParameters = new List(); - if (odataQuery != null) - { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) - { - _queryParameters.Add(_odataFilter); - } - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a bookmark relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (bookmarkId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "bookmarkId"); - } - if (relationName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relationName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("bookmarkId", bookmarkId); - tracingParameters.Add("relationName", relationName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{bookmarkId}", System.Uri.EscapeDataString(bookmarkId)); - _url = _url.Replace("{relationName}", System.Uri.EscapeDataString(relationName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates the bookmark relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The resource ID of the related resource - /// - /// - /// Etag of the azure resource - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, string relationName, string relatedResourceId, string etag = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (bookmarkId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "bookmarkId"); - } - if (relationName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relationName"); - } - if (relatedResourceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relatedResourceId"); - } - Relation relation = new Relation(); - if (etag != null || relatedResourceId != null) - { - relation.Etag = etag; - relation.RelatedResourceId = relatedResourceId; - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("bookmarkId", bookmarkId); - tracingParameters.Add("relationName", relationName); - tracingParameters.Add("relation", relation); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{bookmarkId}", System.Uri.EscapeDataString(bookmarkId)); - _url = _url.Replace("{relationName}", System.Uri.EscapeDataString(relationName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(relation != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(relation, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete the bookmark relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (bookmarkId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "bookmarkId"); - } - if (relationName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relationName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("bookmarkId", bookmarkId); - tracingParameters.Add("relationName", relationName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{bookmarkId}", System.Uri.EscapeDataString(bookmarkId)); - _url = _url.Replace("{relationName}", System.Uri.EscapeDataString(relationName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all bookmark relations. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperationsExtensions.cs deleted file mode 100644 index c8e0f576d30b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperationsExtensions.cs +++ /dev/null @@ -1,289 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for BookmarkRelationsOperations. - /// - public static partial class BookmarkRelationsOperationsExtensions - { - /// - /// Gets all bookmark relations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - public static IPage List(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(resourceGroupName, workspaceName, bookmarkId, odataQuery, skipToken).GetAwaiter().GetResult(); - } - - /// - /// Gets all bookmark relations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, bookmarkId, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a bookmark relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - public static Relation Get(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, string relationName) - { - return operations.GetAsync(resourceGroupName, workspaceName, bookmarkId, relationName).GetAwaiter().GetResult(); - } - - /// - /// Gets a bookmark relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, string relationName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, bookmarkId, relationName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates the bookmark relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The resource ID of the related resource - /// - /// - /// Etag of the azure resource - /// - public static Relation CreateOrUpdate(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, string relationName, string relatedResourceId, string etag = default(string)) - { - return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relatedResourceId, etag).GetAwaiter().GetResult(); - } - - /// - /// Creates the bookmark relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The resource ID of the related resource - /// - /// - /// Etag of the azure resource - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, string relationName, string relatedResourceId, string etag = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relatedResourceId, etag, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the bookmark relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - public static void Delete(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, string relationName) - { - operations.DeleteAsync(resourceGroupName, workspaceName, bookmarkId, relationName).GetAwaiter().GetResult(); - } - - /// - /// Delete the bookmark relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IBookmarkRelationsOperations operations, string resourceGroupName, string workspaceName, string bookmarkId, string relationName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, bookmarkId, relationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets all bookmark relations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBookmarkRelationsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all bookmark relations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IBookmarkRelationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs deleted file mode 100644 index c133cc2118c1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs +++ /dev/null @@ -1,300 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DataConnectorsCheckRequirementsOperations operations. - /// - internal partial class DataConnectorsCheckRequirementsOperations : IServiceOperations, IDataConnectorsCheckRequirementsOperations - { - /// - /// Initializes a new instance of the DataConnectorsCheckRequirementsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal DataConnectorsCheckRequirementsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Get requirements state for a data connector type. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The parameters for requirements check message - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> PostWithHttpMessagesAsync(string resourceGroupName, string workspaceName, DataConnectorsCheckRequirements dataConnectorsCheckRequirements, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (dataConnectorsCheckRequirements == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "dataConnectorsCheckRequirements"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("dataConnectorsCheckRequirements", dataConnectorsCheckRequirements); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Post", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(dataConnectorsCheckRequirements != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(dataConnectorsCheckRequirements, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperationsExtensions.cs deleted file mode 100644 index 39c8150de195..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperationsExtensions.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DataConnectorsCheckRequirementsOperations. - /// - public static partial class DataConnectorsCheckRequirementsOperationsExtensions - { - /// - /// Get requirements state for a data connector type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The parameters for requirements check message - /// - public static DataConnectorRequirementsState Post(this IDataConnectorsCheckRequirementsOperations operations, string resourceGroupName, string workspaceName, DataConnectorsCheckRequirements dataConnectorsCheckRequirements) - { - return operations.PostAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements).GetAwaiter().GetResult(); - } - - /// - /// Get requirements state for a data connector type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The parameters for requirements check message - /// - /// - /// The cancellation token. - /// - public static async Task PostAsync(this IDataConnectorsCheckRequirementsOperations operations, string resourceGroupName, string workspaceName, DataConnectorsCheckRequirements dataConnectorsCheckRequirements, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PostWithHttpMessagesAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs index 9c265a009a55..d1c1c14f9adf 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs @@ -1016,460 +1016,6 @@ internal DataConnectorsOperations(SecurityInsights client) return _result; } - /// - /// Connects a data connector. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// The data connector - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task ConnectWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataConnectorId, DataConnectorConnectBody connectBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (dataConnectorId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "dataConnectorId"); - } - if (connectBody == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectBody"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("dataConnectorId", dataConnectorId); - tracingParameters.Add("connectBody", connectBody); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Connect", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/connect").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{dataConnectorId}", System.Uri.EscapeDataString(dataConnectorId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(connectBody != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectBody, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Disconnect a data connector. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DisconnectWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataConnectorId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (dataConnectorId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "dataConnectorId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("dataConnectorId", dataConnectorId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Disconnect", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/disconnect").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{dataConnectorId}", System.Uri.EscapeDataString(dataConnectorId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - /// /// Gets all data connectors. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperationsExtensions.cs index d82bdfccd72c..5e7a3bb0bded 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperationsExtensions.cs @@ -202,98 +202,6 @@ public static void Delete(this IDataConnectorsOperations operations, string reso (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, dataConnectorId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } - /// - /// Connects a data connector. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// The data connector - /// - public static void Connect(this IDataConnectorsOperations operations, string resourceGroupName, string workspaceName, string dataConnectorId, DataConnectorConnectBody connectBody) - { - operations.ConnectAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody).GetAwaiter().GetResult(); - } - - /// - /// Connects a data connector. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// The data connector - /// - /// - /// The cancellation token. - /// - public static async Task ConnectAsync(this IDataConnectorsOperations operations, string resourceGroupName, string workspaceName, string dataConnectorId, DataConnectorConnectBody connectBody, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ConnectWithHttpMessagesAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Disconnect a data connector. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - public static void Disconnect(this IDataConnectorsOperations operations, string resourceGroupName, string workspaceName, string dataConnectorId) - { - operations.DisconnectAsync(resourceGroupName, workspaceName, dataConnectorId).GetAwaiter().GetResult(); - } - - /// - /// Disconnect a data connector. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// The cancellation token. - /// - public static async Task DisconnectAsync(this IDataConnectorsOperations operations, string resourceGroupName, string workspaceName, string dataConnectorId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DisconnectWithHttpMessagesAsync(resourceGroupName, workspaceName, dataConnectorId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - /// /// Gets all data connectors. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs deleted file mode 100644 index 5c08def4a2e4..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs +++ /dev/null @@ -1,278 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DomainWhoisOperations operations. - /// - internal partial class DomainWhoisOperations : IServiceOperations, IDomainWhoisOperations - { - /// - /// Initializes a new instance of the DomainWhoisOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal DomainWhoisOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Get whois information for a single domain name - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Domain name to be enriched - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (domain == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domain"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("domain", domain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/domain/whois/").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (domain != null) - { - _queryParameters.Add(string.Format("domain={0}", System.Uri.EscapeDataString(domain))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperationsExtensions.cs deleted file mode 100644 index 592a6ba7a9d1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperationsExtensions.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DomainWhoisOperations. - /// - public static partial class DomainWhoisOperationsExtensions - { - /// - /// Get whois information for a single domain name - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Domain name to be enriched - /// - public static EnrichmentDomainWhois Get(this IDomainWhoisOperations operations, string resourceGroupName, string domain) - { - return operations.GetAsync(resourceGroupName, domain).GetAwaiter().GetResult(); - } - - /// - /// Get whois information for a single domain name - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Domain name to be enriched - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IDomainWhoisOperations operations, string resourceGroupName, string domain, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, domain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs deleted file mode 100644 index 0c6e41b263c6..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs +++ /dev/null @@ -1,314 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntitiesGetTimelineOperations operations. - /// - internal partial class EntitiesGetTimelineOperations : IServiceOperations, IEntitiesGetTimelineOperations - { - /// - /// Initializes a new instance of the EntitiesGetTimelineOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal EntitiesGetTimelineOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Timeline for an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an timeline operation on the given - /// entity. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, EntityTimelineParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getTimeline").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperationsExtensions.cs deleted file mode 100644 index 4c85c68a6dfa..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperationsExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for EntitiesGetTimelineOperations. - /// - public static partial class EntitiesGetTimelineOperationsExtensions - { - /// - /// Timeline for an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an timeline operation on the given - /// entity. - /// - public static EntityTimelineResponse List(this IEntitiesGetTimelineOperations operations, string resourceGroupName, string workspaceName, string entityId, EntityTimelineParameters parameters) - { - return operations.ListAsync(resourceGroupName, workspaceName, entityId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Timeline for an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an timeline operation on the given - /// entity. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IEntitiesGetTimelineOperations operations, string resourceGroupName, string workspaceName, string entityId, EntityTimelineParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs deleted file mode 100644 index bdf70d9b958e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs +++ /dev/null @@ -1,1461 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntitiesOperations operations. - /// - internal partial class EntitiesOperations : IServiceOperations, IEntitiesOperations - { - /// - /// Initializes a new instance of the EntitiesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal EntitiesOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets all entities. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Expands an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an expand operation on the given entity. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ExpandWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, EntityExpandParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Expand", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Insights and Activities for an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> QueriesWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - string kind = "Insight"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("kind", kind); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Queries", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/queries").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (kind != null) - { - _queryParameters.Add(string.Format("kind={0}", System.Uri.EscapeDataString(kind))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Execute Insights for an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute insights on the given entity. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetInsightsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, EntityGetInsightsParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInsights", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getInsights").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all entities. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperationsExtensions.cs deleted file mode 100644 index 945be484aa60..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperationsExtensions.cs +++ /dev/null @@ -1,295 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for EntitiesOperations. - /// - public static partial class EntitiesOperationsExtensions - { - /// - /// Gets all entities. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - public static IPage List(this IEntitiesOperations operations, string resourceGroupName, string workspaceName) - { - return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); - } - - /// - /// Gets all entities. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - public static Entity Get(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId) - { - return operations.GetAsync(resourceGroupName, workspaceName, entityId).GetAwaiter().GetResult(); - } - - /// - /// Gets an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Expands an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an expand operation on the given entity. - /// - public static EntityExpandResponse Expand(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId, EntityExpandParameters parameters) - { - return operations.ExpandAsync(resourceGroupName, workspaceName, entityId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Expands an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an expand operation on the given entity. - /// - /// - /// The cancellation token. - /// - public static async Task ExpandAsync(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId, EntityExpandParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExpandWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Insights and Activities for an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - public static GetQueriesResponse Queries(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId) - { - return operations.QueriesAsync(resourceGroupName, workspaceName, entityId).GetAwaiter().GetResult(); - } - - /// - /// Get Insights and Activities for an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The cancellation token. - /// - public static async Task QueriesAsync(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.QueriesWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Insights for an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute insights on the given entity. - /// - public static EntityGetInsightsResponse GetInsights(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId, EntityGetInsightsParameters parameters) - { - return operations.GetInsightsAsync(resourceGroupName, workspaceName, entityId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Execute Insights for an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute insights on the given entity. - /// - /// - /// The cancellation token. - /// - public static async Task GetInsightsAsync(this IEntitiesOperations operations, string resourceGroupName, string workspaceName, string entityId, EntityGetInsightsParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInsightsWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all entities. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IEntitiesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all entities. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IEntitiesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs deleted file mode 100644 index 3821405ef9ce..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs +++ /dev/null @@ -1,492 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntitiesRelationsOperations operations. - /// - internal partial class EntitiesRelationsOperations : IServiceOperations, IEntitiesRelationsOperations - { - /// - /// Initializes a new instance of the EntitiesRelationsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal EntitiesRelationsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets all relations of an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("odataQuery", odataQuery); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("skipToken", skipToken); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - List _queryParameters = new List(); - if (odataQuery != null) - { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) - { - _queryParameters.Add(_odataFilter); - } - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all relations of an entity. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperationsExtensions.cs deleted file mode 100644 index 9ccf2101ec47..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperationsExtensions.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for EntitiesRelationsOperations. - /// - public static partial class EntitiesRelationsOperationsExtensions - { - /// - /// Gets all relations of an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - public static IPage List(this IEntitiesRelationsOperations operations, string resourceGroupName, string workspaceName, string entityId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(resourceGroupName, workspaceName, entityId, odataQuery, skipToken).GetAwaiter().GetResult(); - } - - /// - /// Gets all relations of an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IEntitiesRelationsOperations operations, string resourceGroupName, string workspaceName, string entityId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all relations of an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IEntitiesRelationsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all relations of an entity. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IEntitiesRelationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperationsExtensions.cs deleted file mode 100644 index b84201f7531e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperationsExtensions.cs +++ /dev/null @@ -1,248 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for EntityQueriesOperations. - /// - public static partial class EntityQueriesOperationsExtensions - { - /// - /// Gets all entity queries. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The entity query kind we want to fetch. Possible values include: - /// 'Expansion', 'Activity' - /// - public static IPage List(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string kind = default(string)) - { - return operations.ListAsync(resourceGroupName, workspaceName, kind).GetAwaiter().GetResult(); - } - - /// - /// Gets all entity queries. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The entity query kind we want to fetch. Possible values include: - /// 'Expansion', 'Activity' - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string kind = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, kind, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query ID - /// - public static EntityQuery Get(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string entityQueryId) - { - return operations.GetAsync(resourceGroupName, workspaceName, entityQueryId).GetAwaiter().GetResult(); - } - - /// - /// Gets an entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query ID - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string entityQueryId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, entityQueryId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates the entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query ID - /// - /// - /// The entity query we want to create or update - /// - public static EntityQuery CreateOrUpdate(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string entityQueryId, CustomEntityQuery entityQuery) - { - return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates the entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query ID - /// - /// - /// The entity query we want to create or update - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string entityQueryId, CustomEntityQuery entityQuery, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query ID - /// - public static void Delete(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string entityQueryId) - { - operations.DeleteAsync(resourceGroupName, workspaceName, entityQueryId).GetAwaiter().GetResult(); - } - - /// - /// Delete the entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query ID - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IEntityQueriesOperations operations, string resourceGroupName, string workspaceName, string entityQueryId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, entityQueryId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets all entity queries. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IEntityQueriesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all entity queries. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IEntityQueriesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs deleted file mode 100644 index 14011393b0d7..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs +++ /dev/null @@ -1,709 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntityQueryTemplatesOperations operations. - /// - internal partial class EntityQueryTemplatesOperations : IServiceOperations, IEntityQueryTemplatesOperations - { - /// - /// Initializes a new instance of the EntityQueryTemplatesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal EntityQueryTemplatesOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets all entity query templates. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The entity template query kind we want to fetch. Possible values include: - /// 'Activity' - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string kind = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("kind", kind); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (kind != null) - { - _queryParameters.Add(string.Format("kind={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(kind, Client.SerializationSettings).Trim('"')))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets an entity query. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query template ID - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryTemplateId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityQueryTemplateId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityQueryTemplateId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityQueryTemplateId", entityQueryTemplateId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates/{entityQueryTemplateId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityQueryTemplateId}", System.Uri.EscapeDataString(entityQueryTemplateId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all entity query templates. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperationsExtensions.cs deleted file mode 100644 index fd670bd827f4..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperationsExtensions.cs +++ /dev/null @@ -1,153 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for EntityQueryTemplatesOperations. - /// - public static partial class EntityQueryTemplatesOperationsExtensions - { - /// - /// Gets all entity query templates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The entity template query kind we want to fetch. Possible values include: - /// 'Activity' - /// - public static IPage List(this IEntityQueryTemplatesOperations operations, string resourceGroupName, string workspaceName, string kind = default(string)) - { - return operations.ListAsync(resourceGroupName, workspaceName, kind).GetAwaiter().GetResult(); - } - - /// - /// Gets all entity query templates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The entity template query kind we want to fetch. Possible values include: - /// 'Activity' - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IEntityQueryTemplatesOperations operations, string resourceGroupName, string workspaceName, string kind = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, kind, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query template ID - /// - public static EntityQueryTemplate Get(this IEntityQueryTemplatesOperations operations, string resourceGroupName, string workspaceName, string entityQueryTemplateId) - { - return operations.GetAsync(resourceGroupName, workspaceName, entityQueryTemplateId).GetAwaiter().GetResult(); - } - - /// - /// Gets an entity query. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query template ID - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IEntityQueryTemplatesOperations operations, string resourceGroupName, string workspaceName, string entityQueryTemplateId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, entityQueryTemplateId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all entity query templates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IEntityQueryTemplatesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all entity query templates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IEntityQueryTemplatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs deleted file mode 100644 index 428fb38c44f1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs +++ /dev/null @@ -1,304 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntityRelationsOperations operations. - /// - internal partial class EntityRelationsOperations : IServiceOperations, IEntityRelationsOperations - { - /// - /// Initializes a new instance of the EntityRelationsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal EntityRelationsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets an entity relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// Relation Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetRelationWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (entityId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityId"); - } - if (relationName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relationName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityId", entityId); - tracingParameters.Add("relationName", relationName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRelation", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations/{relationName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityId}", System.Uri.EscapeDataString(entityId)); - _url = _url.Replace("{relationName}", System.Uri.EscapeDataString(relationName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperationsExtensions.cs deleted file mode 100644 index ce9a35a4a2fd..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperationsExtensions.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for EntityRelationsOperations. - /// - public static partial class EntityRelationsOperationsExtensions - { - /// - /// Gets an entity relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// Relation Name - /// - public static Relation GetRelation(this IEntityRelationsOperations operations, string resourceGroupName, string workspaceName, string entityId, string relationName) - { - return operations.GetRelationAsync(resourceGroupName, workspaceName, entityId, relationName).GetAwaiter().GetResult(); - } - - /// - /// Gets an entity relation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// Relation Name - /// - /// - /// The cancellation token. - /// - public static async Task GetRelationAsync(this IEntityRelationsOperations operations, string resourceGroupName, string workspaceName, string entityId, string relationName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRelationWithHttpMessagesAsync(resourceGroupName, workspaceName, entityId, relationName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkOperations.cs deleted file mode 100644 index 5e888c72e246..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkOperations.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// BookmarkOperations operations. - /// - public partial interface IBookmarkOperations - { - /// - /// Expand an bookmark - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// The parameters required to execute an expand operation on the given - /// bookmark. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ExpandWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, BookmarkExpandParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkRelationsOperations.cs deleted file mode 100644 index 6c5a2d2bb1da..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IBookmarkRelationsOperations.cs +++ /dev/null @@ -1,184 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// BookmarkRelationsOperations operations. - /// - public partial interface IBookmarkRelationsOperations - { - /// - /// Gets all bookmark relations. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a bookmark relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates the bookmark relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The resource ID of the related resource - /// - /// - /// Etag of the azure resource - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, string relationName, string relatedResourceId, string etag = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete the bookmark relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Bookmark ID - /// - /// - /// Relation Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string bookmarkId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all bookmark relations. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsCheckRequirementsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsCheckRequirementsOperations.cs deleted file mode 100644 index 0046fdadc774..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsCheckRequirementsOperations.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DataConnectorsCheckRequirementsOperations operations. - /// - public partial interface IDataConnectorsCheckRequirementsOperations - { - /// - /// Get requirements state for a data connector type. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The parameters for requirements check message - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> PostWithHttpMessagesAsync(string resourceGroupName, string workspaceName, DataConnectorsCheckRequirements dataConnectorsCheckRequirements, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs index 1cb78903bcf7..a48eb5bc64f2 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs @@ -133,59 +133,6 @@ public partial interface IDataConnectorsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataConnectorId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Connects a data connector. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// The data connector - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task ConnectWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataConnectorId, DataConnectorConnectBody connectBody, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Disconnect a data connector. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Connector ID - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DisconnectWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataConnectorId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Gets all data connectors. /// /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDomainWhoisOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDomainWhoisOperations.cs deleted file mode 100644 index 973e79f84f89..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDomainWhoisOperations.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DomainWhoisOperations operations. - /// - public partial interface IDomainWhoisOperations - { - /// - /// Get whois information for a single domain name - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Domain name to be enriched - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesGetTimelineOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesGetTimelineOperations.cs deleted file mode 100644 index a44caf37e1fa..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesGetTimelineOperations.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntitiesGetTimelineOperations operations. - /// - public partial interface IEntitiesGetTimelineOperations - { - /// - /// Timeline for an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an timeline operation on the - /// given entity. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, EntityTimelineParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesOperations.cs deleted file mode 100644 index a124a9ada827..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesOperations.cs +++ /dev/null @@ -1,193 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntitiesOperations operations. - /// - public partial interface IEntitiesOperations - { - /// - /// Gets all entities. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Expands an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute an expand operation on the given - /// entity. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ExpandWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, EntityExpandParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Insights and Activities for an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> QueriesWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Execute Insights for an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// The parameters required to execute insights on the given entity. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetInsightsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, EntityGetInsightsParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all entities. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesRelationsOperations.cs deleted file mode 100644 index f4b99d294269..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntitiesRelationsOperations.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntitiesRelationsOperations operations. - /// - public partial interface IEntitiesRelationsOperations - { - /// - /// Gets all relations of an entity. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// 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. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all relations of an entity. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueryTemplatesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueryTemplatesOperations.cs deleted file mode 100644 index f4227ba5d6a1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueryTemplatesOperations.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntityQueryTemplatesOperations operations. - /// - public partial interface IEntityQueryTemplatesOperations - { - /// - /// Gets all entity query templates. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The entity template query kind we want to fetch. Possible values - /// include: 'Activity' - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string kind = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an entity query. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity query template ID - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryTemplateId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all entity query templates. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityRelationsOperations.cs deleted file mode 100644 index 2327e9e21585..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityRelationsOperations.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// EntityRelationsOperations operations. - /// - public partial interface IEntityRelationsOperations - { - /// - /// Gets an entity relation. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// entity ID - /// - /// - /// Relation Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetRelationWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIPGeodataOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIPGeodataOperations.cs deleted file mode 100644 index 2976916878e5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIPGeodataOperations.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// IPGeodataOperations operations. - /// - public partial interface IIPGeodataOperations - { - /// - /// Get geodata for a single IP address - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// IP address (v4 or v6) to be enriched - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string ipAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentCommentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentCommentsOperations.cs index 106eec83a124..f3dfdc35aa25 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentCommentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentCommentsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public partial interface IIncidentCommentsOperations { /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -63,7 +63,7 @@ public partial interface IIncidentCommentsOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets an incident comment. + /// Gets a comment for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -94,7 +94,7 @@ public partial interface IIncidentCommentsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates the incident comment. + /// Creates or updates a comment for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -131,7 +131,7 @@ public partial interface IIncidentCommentsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, string message, string etag = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete the incident comment. + /// Deletes a comment for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -159,7 +159,7 @@ public partial interface IIncidentCommentsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, string incidentCommentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentRelationsOperations.cs index cb998bfce8c3..17d631a546ad 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentRelationsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentRelationsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public partial interface IIncidentRelationsOperations { /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -63,7 +63,7 @@ public partial interface IIncidentRelationsOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets an incident relation. + /// Gets a relation for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -94,7 +94,7 @@ public partial interface IIncidentRelationsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates the incident relation. + /// Creates or updates a relation for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -131,7 +131,7 @@ public partial interface IIncidentRelationsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, string relationName, string relatedResourceId, string etag = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete the incident relation. + /// Deletes a relation for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -159,7 +159,7 @@ public partial interface IIncidentRelationsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, string relationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentsOperations.cs index f5b147d54528..e03381a2ad67 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IIncidentsOperations.cs @@ -23,37 +23,6 @@ namespace Microsoft.Azure.Management.SecurityInsights /// public partial interface IIncidentsOperations { - /// - /// Triggers playbook on a specific incident - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> RunPlaybookWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all incidents. /// @@ -96,7 +65,7 @@ public partial interface IIncidentsOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets an incident. + /// Gets a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -124,7 +93,7 @@ public partial interface IIncidentsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates the incident. + /// Creates or updates an incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -155,7 +124,7 @@ public partial interface IIncidentsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, Incident incident, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete the incident. + /// Deletes a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -180,39 +149,7 @@ public partial interface IIncidentsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates a Microsoft team to investigate the incident by sharing - /// information and insights between participants. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Incident ID - /// - /// - /// Team properties - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateTeamWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, TeamProperties teamProperties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all incident alerts. + /// Gets all alerts for an incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -240,7 +177,7 @@ public partial interface IIncidentsOperations /// Task> ListAlertsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all incident bookmarks. + /// Gets all bookmarks for an incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -268,7 +205,7 @@ public partial interface IIncidentsOperations /// Task> ListBookmarksWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all incident related entities. + /// Gets all entities for an incident. /// /// /// The name of the resource group. The name is case insensitive. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IMetadataOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IMetadataOperations.cs deleted file mode 100644 index ee00376f1e77..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IMetadataOperations.cs +++ /dev/null @@ -1,202 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// MetadataOperations operations. - /// - public partial interface IMetadataOperations - { - /// - /// List of all metadata - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Filters the results, based on a Boolean condition. Optional. - /// - /// - /// Sorts the results. Optional. - /// - /// - /// Returns only the first n results. Optional. - /// - /// - /// Used to skip n elements in the OData query (offset). Returns a - /// nextLink to the next page of results if there are any left. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create a Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Metadata resource. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, MetadataModel metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update an existing Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Partial metadata request. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, MetadataPatch metadataPatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List of all metadata - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IOfficeConsentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IOfficeConsentsOperations.cs deleted file mode 100644 index 7240c468adfe..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IOfficeConsentsOperations.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// OfficeConsentsOperations operations. - /// - public partial interface IOfficeConsentsOperations - { - /// - /// Gets all office365 consents. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an office365 consent. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string consentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete the office365 consent. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string consentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all office365 consents. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs deleted file mode 100644 index 9ecfbdce7dd0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs +++ /dev/null @@ -1,278 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// IPGeodataOperations operations. - /// - internal partial class IPGeodataOperations : IServiceOperations, IIPGeodataOperations - { - /// - /// Initializes a new instance of the IPGeodataOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal IPGeodataOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Get geodata for a single IP address - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// IP address (v4 or v6) to be enriched - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string ipAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (ipAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ipAddress"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("ipAddress", ipAddress); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/ip/geodata/").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (ipAddress != null) - { - _queryParameters.Add(string.Format("ipAddress={0}", System.Uri.EscapeDataString(ipAddress))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperationsExtensions.cs deleted file mode 100644 index 398f6f9cac95..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperationsExtensions.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for IPGeodataOperations. - /// - public static partial class IPGeodataOperationsExtensions - { - /// - /// Get geodata for a single IP address - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// IP address (v4 or v6) to be enriched - /// - public static EnrichmentIpGeodata Get(this IIPGeodataOperations operations, string resourceGroupName, string ipAddress) - { - return operations.GetAsync(resourceGroupName, ipAddress).GetAwaiter().GetResult(); - } - - /// - /// Get geodata for a single IP address - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// IP address (v4 or v6) to be enriched - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IIPGeodataOperations operations, string resourceGroupName, string ipAddress, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, ipAddress, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IProductSettingsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IProductSettingsOperations.cs deleted file mode 100644 index 07f6ac3da8ed..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IProductSettingsOperations.cs +++ /dev/null @@ -1,139 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ProductSettingsOperations operations. - /// - public partial interface IProductSettingsOperations - { - /// - /// List of all the settings - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a setting. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, - /// Ueba - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete setting of the product. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, - /// Ueba - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates setting. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, - /// Ueba - /// - /// - /// The setting - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsName, Settings settings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs index 48a9d8edc1a1..e1b8160f5f54 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs @@ -90,65 +90,20 @@ public partial interface ISecurityInsights : System.IDisposable /// IAutomationRulesOperations AutomationRules { get; } - /// - /// Gets the IIncidentsOperations. - /// - IIncidentsOperations Incidents { get; } - /// /// Gets the IBookmarksOperations. /// IBookmarksOperations Bookmarks { get; } /// - /// Gets the IBookmarkRelationsOperations. - /// - IBookmarkRelationsOperations BookmarkRelations { get; } - - /// - /// Gets the IBookmarkOperations. - /// - IBookmarkOperations Bookmark { get; } - - /// - /// Gets the IIPGeodataOperations. - /// - IIPGeodataOperations IPGeodata { get; } - - /// - /// Gets the IDomainWhoisOperations. - /// - IDomainWhoisOperations DomainWhois { get; } - - /// - /// Gets the IEntitiesOperations. - /// - IEntitiesOperations Entities { get; } - - /// - /// Gets the IEntitiesGetTimelineOperations. - /// - IEntitiesGetTimelineOperations EntitiesGetTimeline { get; } - - /// - /// Gets the IEntitiesRelationsOperations. - /// - IEntitiesRelationsOperations EntitiesRelations { get; } - - /// - /// Gets the IEntityRelationsOperations. - /// - IEntityRelationsOperations EntityRelations { get; } - - /// - /// Gets the IEntityQueriesOperations. + /// Gets the IDataConnectorsOperations. /// - IEntityQueriesOperations EntityQueries { get; } + IDataConnectorsOperations DataConnectors { get; } /// - /// Gets the IEntityQueryTemplatesOperations. + /// Gets the IIncidentsOperations. /// - IEntityQueryTemplatesOperations EntityQueryTemplates { get; } + IIncidentsOperations Incidents { get; } /// /// Gets the IIncidentCommentsOperations. @@ -160,35 +115,15 @@ public partial interface ISecurityInsights : System.IDisposable /// IIncidentRelationsOperations IncidentRelations { get; } - /// - /// Gets the IMetadataOperations. - /// - IMetadataOperations Metadata { get; } - - /// - /// Gets the IOfficeConsentsOperations. - /// - IOfficeConsentsOperations OfficeConsents { get; } - /// /// Gets the ISentinelOnboardingStatesOperations. /// ISentinelOnboardingStatesOperations SentinelOnboardingStates { get; } /// - /// Gets the IProductSettingsOperations. - /// - IProductSettingsOperations ProductSettings { get; } - - /// - /// Gets the ISourceControlOperations. + /// Gets the ISecurityMLAnalyticsSettingsOperations. /// - ISourceControlOperations SourceControl { get; } - - /// - /// Gets the ISourceControlsOperations. - /// - ISourceControlsOperations SourceControls { get; } + ISecurityMLAnalyticsSettingsOperations SecurityMLAnalyticsSettings { get; } /// /// Gets the IThreatIntelligenceIndicatorOperations. @@ -215,16 +150,6 @@ public partial interface ISecurityInsights : System.IDisposable /// IWatchlistItemsOperations WatchlistItems { get; } - /// - /// Gets the IDataConnectorsOperations. - /// - IDataConnectorsOperations DataConnectors { get; } - - /// - /// Gets the IDataConnectorsCheckRequirementsOperations. - /// - IDataConnectorsCheckRequirementsOperations DataConnectorsCheckRequirements { get; } - /// /// Gets the IOperations. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueriesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityMLAnalyticsSettingsOperations.cs similarity index 72% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueriesOperations.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityMLAnalyticsSettingsOperations.cs index 06e5a5ffd4eb..f3389cf76edd 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IEntityQueriesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityMLAnalyticsSettingsOperations.cs @@ -19,12 +19,12 @@ namespace Microsoft.Azure.Management.SecurityInsights using System.Threading.Tasks; /// - /// EntityQueriesOperations operations. + /// SecurityMLAnalyticsSettingsOperations operations. /// - public partial interface IEntityQueriesOperations + public partial interface ISecurityMLAnalyticsSettingsOperations { /// - /// Gets all entity queries. + /// Gets all Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -32,10 +32,6 @@ public partial interface IEntityQueriesOperations /// /// The name of the workspace. /// - /// - /// The entity query kind we want to fetch. Possible values include: - /// 'Expansion', 'Activity' - /// /// /// The headers that will be added to request. /// @@ -51,9 +47,9 @@ public partial interface IEntityQueriesOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string kind = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets an entity query. + /// Gets the Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -61,8 +57,8 @@ public partial interface IEntityQueriesOperations /// /// The name of the workspace. /// - /// - /// entity query ID + /// + /// Security ML Analytics Settings resource name /// /// /// The headers that will be added to request. @@ -79,9 +75,9 @@ public partial interface IEntityQueriesOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates the entity query. + /// Creates or updates the Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -89,11 +85,11 @@ public partial interface IEntityQueriesOperations /// /// The name of the workspace. /// - /// - /// entity query ID + /// + /// Security ML Analytics Settings resource name /// - /// - /// The entity query we want to create or update + /// + /// The security ML Analytics setting /// /// /// The headers that will be added to request. @@ -110,9 +106,9 @@ public partial interface IEntityQueriesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryId, CustomEntityQuery entityQuery, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsResourceName, SecurityMLAnalyticsSetting securityMLAnalyticsSetting, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete the entity query. + /// Delete the Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -120,8 +116,8 @@ public partial interface IEntityQueriesOperations /// /// The name of the workspace. /// - /// - /// entity query ID + /// + /// Security ML Analytics Settings resource name /// /// /// The headers that will be added to request. @@ -135,9 +131,9 @@ public partial interface IEntityQueriesOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all entity queries. + /// Gets all Security ML Analytics Settings. /// /// /// The NextLink from the previous successful call to List operation. @@ -157,6 +153,6 @@ public partial interface IEntityQueriesOperations /// /// Thrown when a required parameter is null /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlOperations.cs deleted file mode 100644 index 36b54b12ffb4..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlOperations.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// SourceControlOperations operations. - /// - public partial interface ISourceControlOperations - { - /// - /// Gets a list of repositories metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The repo type. Possible values include: 'Github', 'DevOps' - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListRepositoriesWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string repoType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of repositories metadata. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListRepositoriesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlsOperations.cs deleted file mode 100644 index bf036e3388e6..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISourceControlsOperations.cs +++ /dev/null @@ -1,158 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// SourceControlsOperations operations. - /// - public partial interface ISourceControlsOperations - { - /// - /// Gets all source controls, without source control items. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a source control byt its identifier. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Source control Id - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sourceControlId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a source control. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Source control Id - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sourceControlId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a source control. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Source control Id - /// - /// - /// The SourceControl - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sourceControlId, SourceControl sourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all source controls, without source control items. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IThreatIntelligenceIndicatorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IThreatIntelligenceIndicatorsOperations.cs index 8b6f8e4bbbe9..af6b614b1b48 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IThreatIntelligenceIndicatorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IThreatIntelligenceIndicatorsOperations.cs @@ -35,9 +35,6 @@ public partial interface IThreatIntelligenceIndicatorsOperations /// /// Filters the results, based on a Boolean condition. Optional. /// - /// - /// Sorts the results. Optional. - /// /// /// Returns only the first n results. Optional. /// @@ -48,6 +45,9 @@ public partial interface IThreatIntelligenceIndicatorsOperations /// that specifies a starting point to use for subsequent calls. /// Optional. /// + /// + /// Sorts the results. Optional. + /// /// /// The headers that will be added to request. /// @@ -63,7 +63,7 @@ public partial interface IThreatIntelligenceIndicatorsOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), int? top = default(int?), string skipToken = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get all threat intelligence indicators. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs index 838c99b07be6..a9f0331aac18 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public partial interface IWatchlistItemsOperations { /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The name of the resource group. The name is case insensitive. @@ -33,7 +33,7 @@ public partial interface IWatchlistItemsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// Skiptoken is only used if a previous operation returned a partial @@ -59,7 +59,7 @@ public partial interface IWatchlistItemsOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist item. /// /// /// The name of the resource group. The name is case insensitive. @@ -68,10 +68,10 @@ public partial interface IWatchlistItemsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The headers that will be added to request. @@ -99,10 +99,10 @@ public partial interface IWatchlistItemsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The headers that will be added to request. @@ -118,7 +118,7 @@ public partial interface IWatchlistItemsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, string watchlistItemId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates a watchlist item. + /// Create or update a watchlist item. /// /// /// The name of the resource group. The name is case insensitive. @@ -127,10 +127,10 @@ public partial interface IWatchlistItemsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The watchlist item @@ -152,7 +152,7 @@ public partial interface IWatchlistItemsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, string watchlistItemId, WatchlistItem watchlistItem, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs index 7d0d5291f7c0..8879808d5312 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public partial interface IWatchlistsOperations { /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The name of the resource group. The name is case insensitive. @@ -56,7 +56,7 @@ public partial interface IWatchlistsOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist, without its watchlist items. /// /// /// The name of the resource group. The name is case insensitive. @@ -65,7 +65,7 @@ public partial interface IWatchlistsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The headers that will be added to request. @@ -93,7 +93,7 @@ public partial interface IWatchlistsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The headers that will be added to request. @@ -107,17 +107,12 @@ public partial interface IWatchlistsOperations /// /// Thrown when a required parameter is null /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// 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. + /// Watchlist and its Items, we should call this endpoint with + /// rawContent and contentType properties. /// /// /// The name of the resource group. The name is case insensitive. @@ -126,7 +121,7 @@ public partial interface IWatchlistsOperations /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The watchlist @@ -146,9 +141,9 @@ public partial interface IWatchlistsOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs index 20668fe8068b..f1737a0dba6d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs @@ -52,7 +52,7 @@ internal IncidentCommentsOperations(SecurityInsights client) public SecurityInsights Client { get; private set; } /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -316,7 +316,7 @@ internal IncidentCommentsOperations(SecurityInsights client) } /// - /// Gets an incident comment. + /// Gets a comment for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -566,7 +566,7 @@ internal IncidentCommentsOperations(SecurityInsights client) } /// - /// Creates or updates the incident comment. + /// Creates or updates a comment for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -857,7 +857,7 @@ internal IncidentCommentsOperations(SecurityInsights client) } /// - /// Delete the incident comment. + /// Deletes a comment for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -1086,7 +1086,7 @@ internal IncidentCommentsOperations(SecurityInsights client) } /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperationsExtensions.cs index 4092f845a6fb..d3f1b21bd0c0 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperationsExtensions.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public static partial class IncidentCommentsOperationsExtensions { /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The operations group for this extension method. @@ -52,7 +52,7 @@ public static partial class IncidentCommentsOperationsExtensions } /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The operations group for this extension method. @@ -87,7 +87,7 @@ public static partial class IncidentCommentsOperationsExtensions } /// - /// Gets an incident comment. + /// Gets a comment for a given incident. /// /// /// The operations group for this extension method. @@ -110,7 +110,7 @@ public static IncidentComment Get(this IIncidentCommentsOperations operations, s } /// - /// Gets an incident comment. + /// Gets a comment for a given incident. /// /// /// The operations group for this extension method. @@ -139,7 +139,7 @@ public static IncidentComment Get(this IIncidentCommentsOperations operations, s } /// - /// Creates or updates the incident comment. + /// Creates or updates a comment for a given incident. /// /// /// The operations group for this extension method. @@ -168,7 +168,7 @@ public static IncidentComment Get(this IIncidentCommentsOperations operations, s } /// - /// Creates or updates the incident comment. + /// Creates or updates a comment for a given incident. /// /// /// The operations group for this extension method. @@ -203,7 +203,7 @@ public static IncidentComment Get(this IIncidentCommentsOperations operations, s } /// - /// Delete the incident comment. + /// Deletes a comment for a given incident. /// /// /// The operations group for this extension method. @@ -226,7 +226,7 @@ public static void Delete(this IIncidentCommentsOperations operations, string re } /// - /// Delete the incident comment. + /// Deletes a comment for a given incident. /// /// /// The operations group for this extension method. @@ -252,7 +252,7 @@ public static void Delete(this IIncidentCommentsOperations operations, string re } /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The operations group for this extension method. @@ -266,7 +266,7 @@ public static IPage ListNext(this IIncidentCommentsOperations o } /// - /// Gets all incident comments. + /// Gets all comments for a given incident. /// /// /// The operations group for this extension method. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs index a9f18a98b415..e4b5af733064 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs @@ -52,7 +52,7 @@ internal IncidentRelationsOperations(SecurityInsights client) public SecurityInsights Client { get; private set; } /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -316,7 +316,7 @@ internal IncidentRelationsOperations(SecurityInsights client) } /// - /// Gets an incident relation. + /// Gets a relation for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -566,7 +566,7 @@ internal IncidentRelationsOperations(SecurityInsights client) } /// - /// Creates or updates the incident relation. + /// Creates or updates a relation for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -857,7 +857,7 @@ internal IncidentRelationsOperations(SecurityInsights client) } /// - /// Delete the incident relation. + /// Deletes a relation for a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -1086,7 +1086,7 @@ internal IncidentRelationsOperations(SecurityInsights client) } /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperationsExtensions.cs index 55b7fcf2aa7d..c64e1c93e45c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperationsExtensions.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public static partial class IncidentRelationsOperationsExtensions { /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The operations group for this extension method. @@ -52,7 +52,7 @@ public static partial class IncidentRelationsOperationsExtensions } /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The operations group for this extension method. @@ -87,7 +87,7 @@ public static partial class IncidentRelationsOperationsExtensions } /// - /// Gets an incident relation. + /// Gets a relation for a given incident. /// /// /// The operations group for this extension method. @@ -110,7 +110,7 @@ public static Relation Get(this IIncidentRelationsOperations operations, string } /// - /// Gets an incident relation. + /// Gets a relation for a given incident. /// /// /// The operations group for this extension method. @@ -139,7 +139,7 @@ public static Relation Get(this IIncidentRelationsOperations operations, string } /// - /// Creates or updates the incident relation. + /// Creates or updates a relation for a given incident. /// /// /// The operations group for this extension method. @@ -168,7 +168,7 @@ public static Relation Get(this IIncidentRelationsOperations operations, string } /// - /// Creates or updates the incident relation. + /// Creates or updates a relation for a given incident. /// /// /// The operations group for this extension method. @@ -203,7 +203,7 @@ public static Relation Get(this IIncidentRelationsOperations operations, string } /// - /// Delete the incident relation. + /// Deletes a relation for a given incident. /// /// /// The operations group for this extension method. @@ -226,7 +226,7 @@ public static void Delete(this IIncidentRelationsOperations operations, string r } /// - /// Delete the incident relation. + /// Deletes a relation for a given incident. /// /// /// The operations group for this extension method. @@ -252,7 +252,7 @@ public static void Delete(this IIncidentRelationsOperations operations, string r } /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The operations group for this extension method. @@ -266,7 +266,7 @@ public static IPage ListNext(this IIncidentRelationsOperations operati } /// - /// Gets all incident relations. + /// Gets all relations for a given incident. /// /// /// The operations group for this extension method. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs index 7d4ebaa00a57..7a961feb41d4 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs @@ -50,264 +50,6 @@ internal IncidentsOperations(SecurityInsights client) /// public SecurityInsights Client { get; private set; } - /// - /// Triggers playbook on a specific incident - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> RunPlaybookWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (incidentIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "incidentIdentifier"); - } - ManualTriggerRequestBody requestBody = default(ManualTriggerRequestBody); - if (tenantId != null || logicAppsResourceId != null) - { - requestBody = new ManualTriggerRequestBody(); - requestBody.TenantId = tenantId; - requestBody.LogicAppsResourceId = logicAppsResourceId; - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("incidentIdentifier", incidentIdentifier); - tracingParameters.Add("requestBody", requestBody); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunPlaybook", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}/runPlaybook").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{incidentIdentifier}", System.Uri.EscapeDataString(incidentIdentifier)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(requestBody != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(requestBody, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - /// /// Gets all incidents. /// @@ -576,7 +318,7 @@ internal IncidentsOperations(SecurityInsights client) } /// - /// Gets an incident. + /// Gets a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -817,7 +559,7 @@ internal IncidentsOperations(SecurityInsights client) } /// - /// Creates or updates the incident. + /// Creates or updates an incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -1094,7 +836,7 @@ internal IncidentsOperations(SecurityInsights client) } /// - /// Delete the incident. + /// Deletes a given incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -1314,267 +1056,7 @@ internal IncidentsOperations(SecurityInsights client) } /// - /// Creates a Microsoft team to investigate the incident by sharing information - /// and insights between participants. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Incident ID - /// - /// - /// Team properties - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CreateTeamWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentId, TeamProperties teamProperties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (incidentId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "incidentId"); - } - if (teamProperties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "teamProperties"); - } - if (teamProperties != null) - { - teamProperties.Validate(); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("incidentId", incidentId); - tracingParameters.Add("teamProperties", teamProperties); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateTeam", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/createTeam").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{incidentId}", System.Uri.EscapeDataString(incidentId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(teamProperties != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(teamProperties, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all incident alerts. + /// Gets all alerts for an incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -1815,7 +1297,7 @@ internal IncidentsOperations(SecurityInsights client) } /// - /// Gets all incident bookmarks. + /// Gets all bookmarks for an incident. /// /// /// The name of the resource group. The name is case insensitive. @@ -2056,7 +1538,7 @@ internal IncidentsOperations(SecurityInsights client) } /// - /// Gets all incident related entities. + /// Gets all entities for an incident. /// /// /// The name of the resource group. The name is case insensitive. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperationsExtensions.cs index f3ee8378cffd..e6e378c2de1d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperationsExtensions.cs @@ -21,58 +21,6 @@ namespace Microsoft.Azure.Management.SecurityInsights /// public static partial class IncidentsOperationsExtensions { - /// - /// Triggers playbook on a specific incident - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// - /// - /// - /// - /// - public static object RunPlaybook(this IIncidentsOperations operations, string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string)) - { - return operations.RunPlaybookAsync(resourceGroupName, workspaceName, incidentIdentifier, tenantId, logicAppsResourceId).GetAwaiter().GetResult(); - } - - /// - /// Triggers playbook on a specific incident - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task RunPlaybookAsync(this IIncidentsOperations operations, string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RunPlaybookWithHttpMessagesAsync(resourceGroupName, workspaceName, incidentIdentifier, tenantId, logicAppsResourceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Gets all incidents. /// @@ -144,7 +92,7 @@ public static partial class IncidentsOperationsExtensions } /// - /// Gets an incident. + /// Gets a given incident. /// /// /// The operations group for this extension method. @@ -164,7 +112,7 @@ public static Incident Get(this IIncidentsOperations operations, string resource } /// - /// Gets an incident. + /// Gets a given incident. /// /// /// The operations group for this extension method. @@ -190,7 +138,7 @@ public static Incident Get(this IIncidentsOperations operations, string resource } /// - /// Creates or updates the incident. + /// Creates or updates an incident. /// /// /// The operations group for this extension method. @@ -213,7 +161,7 @@ public static Incident CreateOrUpdate(this IIncidentsOperations operations, stri } /// - /// Creates or updates the incident. + /// Creates or updates an incident. /// /// /// The operations group for this extension method. @@ -242,7 +190,7 @@ public static Incident CreateOrUpdate(this IIncidentsOperations operations, stri } /// - /// Delete the incident. + /// Deletes a given incident. /// /// /// The operations group for this extension method. @@ -262,7 +210,7 @@ public static void Delete(this IIncidentsOperations operations, string resourceG } /// - /// Delete the incident. + /// Deletes a given incident. /// /// /// The operations group for this extension method. @@ -285,61 +233,7 @@ public static void Delete(this IIncidentsOperations operations, string resourceG } /// - /// Creates a Microsoft team to investigate the incident by sharing information - /// and insights between participants. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Incident ID - /// - /// - /// Team properties - /// - public static TeamInformation CreateTeam(this IIncidentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, TeamProperties teamProperties) - { - return operations.CreateTeamAsync(resourceGroupName, workspaceName, incidentId, teamProperties).GetAwaiter().GetResult(); - } - - /// - /// Creates a Microsoft team to investigate the incident by sharing information - /// and insights between participants. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Incident ID - /// - /// - /// Team properties - /// - /// - /// The cancellation token. - /// - public static async Task CreateTeamAsync(this IIncidentsOperations operations, string resourceGroupName, string workspaceName, string incidentId, TeamProperties teamProperties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateTeamWithHttpMessagesAsync(resourceGroupName, workspaceName, incidentId, teamProperties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all incident alerts. + /// Gets all alerts for an incident. /// /// /// The operations group for this extension method. @@ -359,7 +253,7 @@ public static IncidentAlertList ListAlerts(this IIncidentsOperations operations, } /// - /// Gets all incident alerts. + /// Gets all alerts for an incident. /// /// /// The operations group for this extension method. @@ -385,7 +279,7 @@ public static IncidentAlertList ListAlerts(this IIncidentsOperations operations, } /// - /// Gets all incident bookmarks. + /// Gets all bookmarks for an incident. /// /// /// The operations group for this extension method. @@ -405,7 +299,7 @@ public static IncidentBookmarkList ListBookmarks(this IIncidentsOperations opera } /// - /// Gets all incident bookmarks. + /// Gets all bookmarks for an incident. /// /// /// The operations group for this extension method. @@ -431,7 +325,7 @@ public static IncidentBookmarkList ListBookmarks(this IIncidentsOperations opera } /// - /// Gets all incident related entities. + /// Gets all entities for an incident. /// /// /// The operations group for this extension method. @@ -451,7 +345,7 @@ public static IncidentEntitiesResponse ListEntities(this IIncidentsOperations op } /// - /// Gets all incident related entities. + /// Gets all entities for an incident. /// /// /// The operations group for this extension method. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs deleted file mode 100644 index 45ebdac256b0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs +++ /dev/null @@ -1,1485 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// MetadataOperations operations. - /// - internal partial class MetadataOperations : IServiceOperations, IMetadataOperations - { - /// - /// Initializes a new instance of the MetadataOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal MetadataOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// List of all metadata - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Filters the results, based on a Boolean condition. Optional. - /// - /// - /// Sorts the results. Optional. - /// - /// - /// Returns only the first n results. Optional. - /// - /// - /// Used to skip n elements in the OData query (offset). Returns a nextLink to - /// the next page of results if there are any left. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("filter", filter); - tracingParameters.Add("orderby", orderby); - tracingParameters.Add("top", top); - tracingParameters.Add("skip", skip); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); - } - if (orderby != null) - { - _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); - } - if (top != null) - { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); - } - if (skip != null) - { - _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (metadataName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadataName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("metadataName", metadataName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{metadataName}", System.Uri.EscapeDataString(metadataName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (metadataName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadataName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("metadataName", metadataName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{metadataName}", System.Uri.EscapeDataString(metadataName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create a Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Metadata resource. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, MetadataModel metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (metadataName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadataName"); - } - if (metadata == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); - } - if (metadata != null) - { - metadata.Validate(); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("metadataName", metadataName); - tracingParameters.Add("metadata", metadata); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{metadataName}", System.Uri.EscapeDataString(metadataName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(metadata != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadata, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Update an existing Metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Partial metadata request. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string metadataName, MetadataPatch metadataPatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (metadataName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadataName"); - } - if (metadataPatch == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadataPatch"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("metadataName", metadataName); - tracingParameters.Add("metadataPatch", metadataPatch); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{metadataName}", System.Uri.EscapeDataString(metadataName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(metadataPatch != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadataPatch, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List of all metadata - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperationsExtensions.cs deleted file mode 100644 index 3216145a0853..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperationsExtensions.cs +++ /dev/null @@ -1,318 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for MetadataOperations. - /// - public static partial class MetadataOperationsExtensions - { - /// - /// List of all metadata - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Filters the results, based on a Boolean condition. Optional. - /// - /// - /// Sorts the results. Optional. - /// - /// - /// Returns only the first n results. Optional. - /// - /// - /// Used to skip n elements in the OData query (offset). Returns a nextLink to - /// the next page of results if there are any left. - /// - public static IPage List(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), int? skip = default(int?)) - { - return operations.ListAsync(resourceGroupName, workspaceName, filter, orderby, top, skip).GetAwaiter().GetResult(); - } - - /// - /// List of all metadata - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Filters the results, based on a Boolean condition. Optional. - /// - /// - /// Sorts the results. Optional. - /// - /// - /// Returns only the first n results. Optional. - /// - /// - /// Used to skip n elements in the OData query (offset). Returns a nextLink to - /// the next page of results if there are any left. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), int? skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, filter, orderby, top, skip, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - public static MetadataModel Get(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName) - { - return operations.GetAsync(resourceGroupName, workspaceName, metadataName).GetAwaiter().GetResult(); - } - - /// - /// Get a Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, metadataName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - public static void Delete(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName) - { - operations.DeleteAsync(resourceGroupName, workspaceName, metadataName).GetAwaiter().GetResult(); - } - - /// - /// Delete a Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, metadataName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create a Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Metadata resource. - /// - public static MetadataModel Create(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName, MetadataModel metadata) - { - return operations.CreateAsync(resourceGroupName, workspaceName, metadataName, metadata).GetAwaiter().GetResult(); - } - - /// - /// Create a Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Metadata resource. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName, MetadataModel metadata, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, workspaceName, metadataName, metadata, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Update an existing Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Partial metadata request. - /// - public static MetadataModel Update(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName, MetadataPatch metadataPatch) - { - return operations.UpdateAsync(resourceGroupName, workspaceName, metadataName, metadataPatch).GetAwaiter().GetResult(); - } - - /// - /// Update an existing Metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The Metadata name. - /// - /// - /// Partial metadata request. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IMetadataOperations operations, string resourceGroupName, string workspaceName, string metadataName, MetadataPatch metadataPatch, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List of all metadata - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IMetadataOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List of all metadata - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADCheckRequirements.cs deleted file mode 100644 index 0e22351790dd..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADCheckRequirements.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents AAD (Azure Active Directory) requirements check request. - /// - [Newtonsoft.Json.JsonObject("AzureActiveDirectory")] - [Rest.Serialization.JsonTransformation] - public partial class AADCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the AADCheckRequirements class. - /// - public AADCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AADCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public AADCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADDataConnector.cs index 1502d8f7844f..6fdabb52432d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AADDataConnector.cs @@ -33,8 +33,6 @@ public AADDataConnector() /// /// Initializes a new instance of the AADDataConnector class. /// - /// The tenant id to connect to, and get the - /// data from. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -44,9 +42,11 @@ public AADDataConnector() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource + /// The tenant id to connect to, and get the + /// data from. /// The available data types for the /// connector. - public AADDataConnector(string tenantId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) + public AADDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string tenantId = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) : base(id, name, type, systemData, etag) { TenantId = tenantId; @@ -71,22 +71,5 @@ public AADDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public AlertsDataTypeOfDataConnector DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPCheckRequirements.cs deleted file mode 100644 index 8a131fbe25e5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPCheckRequirements.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents AATP (Azure Advanced Threat Protection) requirements check - /// request. - /// - [Newtonsoft.Json.JsonObject("AzureAdvancedThreatProtection")] - [Rest.Serialization.JsonTransformation] - public partial class AATPCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the AATPCheckRequirements class. - /// - public AATPCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AATPCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public AATPCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPDataConnector.cs index c53d16bdb616..54ec2417383e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AATPDataConnector.cs @@ -33,8 +33,6 @@ public AATPDataConnector() /// /// Initializes a new instance of the AATPDataConnector class. /// - /// The tenant id to connect to, and get the - /// data from. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -44,9 +42,11 @@ public AATPDataConnector() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource + /// The tenant id to connect to, and get the + /// data from. /// The available data types for the /// connector. - public AATPDataConnector(string tenantId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) + public AATPDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string tenantId = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) : base(id, name, type, systemData, etag) { TenantId = tenantId; @@ -71,22 +71,5 @@ public AATPDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public AlertsDataTypeOfDataConnector DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCCheckRequirements.cs deleted file mode 100644 index 167c786fb229..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCCheckRequirements.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents ASC (Azure Security Center) requirements check request. - /// - [Newtonsoft.Json.JsonObject("AzureSecurityCenter")] - [Rest.Serialization.JsonTransformation] - public partial class ASCCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the ASCCheckRequirements class. - /// - public ASCCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ASCCheckRequirements class. - /// - /// The subscription id to connect to, and - /// get the data from. - public ASCCheckRequirements(string subscriptionId = default(string)) - { - SubscriptionId = subscriptionId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the subscription id to connect to, and get the data - /// from. - /// - [JsonProperty(PropertyName = "properties.subscriptionId")] - public string SubscriptionId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCDataConnector.cs index 8aa1fbd95fd4..6a84a1a08616 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ASCDataConnector.cs @@ -72,18 +72,5 @@ public ASCDataConnector() [JsonProperty(PropertyName = "properties.subscriptionId")] public string SubscriptionId { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AccountEntity.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AccountEntity.cs index 3dc4c56fcb18..2aba242363d4 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AccountEntity.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AccountEntity.cs @@ -60,7 +60,7 @@ public AccountEntity() /// Determines whether this is a domain /// account. /// The NetBIOS domain name as it appears in the - /// alert format domain/username. Examples: NT AUTHORITY. + /// alert format - domain\username. Examples: NT AUTHORITY. /// The objectGUID attribute is a single-value /// attribute that is the unique identifier for the object, assigned by /// active directory. @@ -152,8 +152,8 @@ public AccountEntity() public bool? IsDomainJoined { get; private set; } /// - /// Gets the NetBIOS domain name as it appears in the alert format - /// domain/username. Examples: NT AUTHORITY. + /// Gets the NetBIOS domain name as it appears in the alert format - + /// domain\username. Examples: NT AUTHORITY. /// [JsonProperty(PropertyName = "properties.ntDomain")] public string NtDomain { get; private set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionResponse.cs index b51e400611b3..ddd0355e6341 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionResponse.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionResponse.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models /// Action for alert rule. /// [Rest.Serialization.JsonTransformation] - public partial class ActionResponse : ResourceWithEtag + public partial class ActionResponse : Resource { /// /// Initializes a new instance of the ActionResponse class. @@ -42,12 +42,13 @@ public ActionResponse() /// "Microsoft.Storage/storageAccounts" /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. - /// Etag of the azure resource + /// Etag of the action. /// The name of the logic app's /// workflow. public ActionResponse(string logicAppResourceId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string workflowId = default(string)) - : base(id, name, type, systemData, etag) + : base(id, name, type, systemData) { + Etag = etag; LogicAppResourceId = logicAppResourceId; WorkflowId = workflowId; CustomInit(); @@ -58,6 +59,12 @@ public ActionResponse() /// partial void CustomInit(); + /// + /// Gets or sets etag of the action. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; set; } + /// /// Gets or sets logic App Resource Id, /// /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.cs deleted file mode 100644 index 90d755c93950..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.cs +++ /dev/null @@ -1,169 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Activity entity query. - /// - [Newtonsoft.Json.JsonObject("Activity")] - [Rest.Serialization.JsonTransformation] - public partial class ActivityCustomEntityQuery : CustomEntityQuery - { - /// - /// Initializes a new instance of the ActivityCustomEntityQuery class. - /// - public ActivityCustomEntityQuery() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ActivityCustomEntityQuery class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The entity query title - /// The entity query content to display in - /// timeline - /// The entity query description - /// The Activity query - /// definitions - /// The type of the query's source - /// entity. Possible values include: 'Account', 'Host', 'File', - /// 'AzureResource', 'CloudApplication', 'DNS', 'FileHash', 'IP', - /// 'Malware', 'Process', 'RegistryKey', 'RegistryValue', - /// 'SecurityGroup', 'URL', 'IoTDevice', 'SecurityAlert', - /// 'HuntingBookmark', 'MailCluster', 'MailMessage', 'Mailbox', - /// 'SubmissionMail' - /// List of the fields of the - /// source entity that are required to run the query - /// The query applied only to entities - /// matching to all filters - /// The template id this activity was - /// created from - /// Determines whether this activity is enabled - /// or disabled. - /// The time the activity was - /// created - /// The last time the activity was - /// updated - public ActivityCustomEntityQuery(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string title = default(string), string content = default(string), string description = default(string), ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions = default(ActivityEntityQueriesPropertiesQueryDefinitions), string inputEntityType = default(string), IList> requiredInputFieldsSets = default(IList>), IDictionary> entitiesFilter = default(IDictionary>), string templateName = default(string), bool? enabled = default(bool?), System.DateTime? createdTimeUtc = default(System.DateTime?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?)) - : base(id, name, type, systemData, etag) - { - Title = title; - Content = content; - Description = description; - QueryDefinitions = queryDefinitions; - InputEntityType = inputEntityType; - RequiredInputFieldsSets = requiredInputFieldsSets; - EntitiesFilter = entitiesFilter; - TemplateName = templateName; - Enabled = enabled; - CreatedTimeUtc = createdTimeUtc; - LastModifiedTimeUtc = lastModifiedTimeUtc; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the entity query title - /// - [JsonProperty(PropertyName = "properties.title")] - public string Title { get; set; } - - /// - /// Gets or sets the entity query content to display in timeline - /// - [JsonProperty(PropertyName = "properties.content")] - public string Content { get; set; } - - /// - /// Gets or sets the entity query description - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the Activity query definitions - /// - [JsonProperty(PropertyName = "properties.queryDefinitions")] - public ActivityEntityQueriesPropertiesQueryDefinitions QueryDefinitions { get; set; } - - /// - /// Gets or sets the type of the query's source entity. Possible values - /// include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DNS', 'FileHash', 'IP', 'Malware', 'Process', - /// 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', - /// 'IoTDevice', 'SecurityAlert', 'HuntingBookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// - [JsonProperty(PropertyName = "properties.inputEntityType")] - public string InputEntityType { get; set; } - - /// - /// Gets or sets list of the fields of the source entity that are - /// required to run the query - /// - [JsonProperty(PropertyName = "properties.requiredInputFieldsSets")] - public IList> RequiredInputFieldsSets { get; set; } - - /// - /// Gets or sets the query applied only to entities matching to all - /// filters - /// - [JsonProperty(PropertyName = "properties.entitiesFilter")] - public IDictionary> EntitiesFilter { get; set; } - - /// - /// Gets or sets the template id this activity was created from - /// - [JsonProperty(PropertyName = "properties.templateName")] - public string TemplateName { get; set; } - - /// - /// Gets or sets determines whether this activity is enabled or - /// disabled. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets the time the activity was created - /// - [JsonProperty(PropertyName = "properties.createdTimeUtc")] - public System.DateTime? CreatedTimeUtc { get; private set; } - - /// - /// Gets the last time the activity was updated - /// - [JsonProperty(PropertyName = "properties.lastModifiedTimeUtc")] - public System.DateTime? LastModifiedTimeUtc { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQuery.cs deleted file mode 100644 index de83406d7424..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQuery.cs +++ /dev/null @@ -1,169 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Activity entity query. - /// - [Newtonsoft.Json.JsonObject("Activity")] - [Rest.Serialization.JsonTransformation] - public partial class ActivityEntityQuery : EntityQuery - { - /// - /// Initializes a new instance of the ActivityEntityQuery class. - /// - public ActivityEntityQuery() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ActivityEntityQuery class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The entity query title - /// The entity query content to display in - /// timeline - /// The entity query description - /// The Activity query - /// definitions - /// The type of the query's source - /// entity. Possible values include: 'Account', 'Host', 'File', - /// 'AzureResource', 'CloudApplication', 'DNS', 'FileHash', 'IP', - /// 'Malware', 'Process', 'RegistryKey', 'RegistryValue', - /// 'SecurityGroup', 'URL', 'IoTDevice', 'SecurityAlert', - /// 'HuntingBookmark', 'MailCluster', 'MailMessage', 'Mailbox', - /// 'SubmissionMail' - /// List of the fields of the - /// source entity that are required to run the query - /// The query applied only to entities - /// matching to all filters - /// The template id this activity was - /// created from - /// Determines whether this activity is enabled - /// or disabled. - /// The time the activity was - /// created - /// The last time the activity was - /// updated - public ActivityEntityQuery(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string title = default(string), string content = default(string), string description = default(string), ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions = default(ActivityEntityQueriesPropertiesQueryDefinitions), string inputEntityType = default(string), IList> requiredInputFieldsSets = default(IList>), IDictionary> entitiesFilter = default(IDictionary>), string templateName = default(string), bool? enabled = default(bool?), System.DateTime? createdTimeUtc = default(System.DateTime?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?)) - : base(id, name, type, systemData, etag) - { - Title = title; - Content = content; - Description = description; - QueryDefinitions = queryDefinitions; - InputEntityType = inputEntityType; - RequiredInputFieldsSets = requiredInputFieldsSets; - EntitiesFilter = entitiesFilter; - TemplateName = templateName; - Enabled = enabled; - CreatedTimeUtc = createdTimeUtc; - LastModifiedTimeUtc = lastModifiedTimeUtc; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the entity query title - /// - [JsonProperty(PropertyName = "properties.title")] - public string Title { get; set; } - - /// - /// Gets or sets the entity query content to display in timeline - /// - [JsonProperty(PropertyName = "properties.content")] - public string Content { get; set; } - - /// - /// Gets or sets the entity query description - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the Activity query definitions - /// - [JsonProperty(PropertyName = "properties.queryDefinitions")] - public ActivityEntityQueriesPropertiesQueryDefinitions QueryDefinitions { get; set; } - - /// - /// Gets or sets the type of the query's source entity. Possible values - /// include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DNS', 'FileHash', 'IP', 'Malware', 'Process', - /// 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', - /// 'IoTDevice', 'SecurityAlert', 'HuntingBookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// - [JsonProperty(PropertyName = "properties.inputEntityType")] - public string InputEntityType { get; set; } - - /// - /// Gets or sets list of the fields of the source entity that are - /// required to run the query - /// - [JsonProperty(PropertyName = "properties.requiredInputFieldsSets")] - public IList> RequiredInputFieldsSets { get; set; } - - /// - /// Gets or sets the query applied only to entities matching to all - /// filters - /// - [JsonProperty(PropertyName = "properties.entitiesFilter")] - public IDictionary> EntitiesFilter { get; set; } - - /// - /// Gets or sets the template id this activity was created from - /// - [JsonProperty(PropertyName = "properties.templateName")] - public string TemplateName { get; set; } - - /// - /// Gets or sets determines whether this activity is enabled or - /// disabled. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets the time the activity was created - /// - [JsonProperty(PropertyName = "properties.createdTimeUtc")] - public System.DateTime? CreatedTimeUtc { get; private set; } - - /// - /// Gets the last time the activity was updated - /// - [JsonProperty(PropertyName = "properties.lastModifiedTimeUtc")] - public System.DateTime? LastModifiedTimeUtc { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.cs deleted file mode 100644 index 5c153c6a3c06..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.cs +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Activity entity query. - /// - [Newtonsoft.Json.JsonObject("Activity")] - [Rest.Serialization.JsonTransformation] - public partial class ActivityEntityQueryTemplate : EntityQueryTemplate - { - /// - /// Initializes a new instance of the ActivityEntityQueryTemplate - /// class. - /// - public ActivityEntityQueryTemplate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ActivityEntityQueryTemplate - /// class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// The entity query title - /// The entity query content to display in - /// timeline - /// The entity query description - /// The Activity query - /// definitions - /// List of required data types for the given - /// entity query template - /// The type of the query's source - /// entity. Possible values include: 'Account', 'Host', 'File', - /// 'AzureResource', 'CloudApplication', 'DNS', 'FileHash', 'IP', - /// 'Malware', 'Process', 'RegistryKey', 'RegistryValue', - /// 'SecurityGroup', 'URL', 'IoTDevice', 'SecurityAlert', - /// 'HuntingBookmark', 'MailCluster', 'MailMessage', 'Mailbox', - /// 'SubmissionMail' - /// List of the fields of the - /// source entity that are required to run the query - /// The query applied only to entities - /// matching to all filters - public ActivityEntityQueryTemplate(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string title = default(string), string content = default(string), string description = default(string), ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions = default(ActivityEntityQueryTemplatePropertiesQueryDefinitions), IList dataTypes = default(IList), string inputEntityType = default(string), IList> requiredInputFieldsSets = default(IList>), IDictionary> entitiesFilter = default(IDictionary>)) - : base(id, name, type, systemData) - { - Title = title; - Content = content; - Description = description; - QueryDefinitions = queryDefinitions; - DataTypes = dataTypes; - InputEntityType = inputEntityType; - RequiredInputFieldsSets = requiredInputFieldsSets; - EntitiesFilter = entitiesFilter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the entity query title - /// - [JsonProperty(PropertyName = "properties.title")] - public string Title { get; set; } - - /// - /// Gets or sets the entity query content to display in timeline - /// - [JsonProperty(PropertyName = "properties.content")] - public string Content { get; set; } - - /// - /// Gets or sets the entity query description - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the Activity query definitions - /// - [JsonProperty(PropertyName = "properties.queryDefinitions")] - public ActivityEntityQueryTemplatePropertiesQueryDefinitions QueryDefinitions { get; set; } - - /// - /// Gets or sets list of required data types for the given entity query - /// template - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public IList DataTypes { get; set; } - - /// - /// Gets or sets the type of the query's source entity. Possible values - /// include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DNS', 'FileHash', 'IP', 'Malware', 'Process', - /// 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', - /// 'IoTDevice', 'SecurityAlert', 'HuntingBookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// - [JsonProperty(PropertyName = "properties.inputEntityType")] - public string InputEntityType { get; set; } - - /// - /// Gets or sets list of the fields of the source entity that are - /// required to run the query - /// - [JsonProperty(PropertyName = "properties.requiredInputFieldsSets")] - public IList> RequiredInputFieldsSets { get; set; } - - /// - /// Gets or sets the query applied only to entities matching to all - /// filters - /// - [JsonProperty(PropertyName = "properties.entitiesFilter")] - public IDictionary> EntitiesFilter { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.cs deleted file mode 100644 index d4837740813d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The Activity query definitions - /// - public partial class ActivityEntityQueryTemplatePropertiesQueryDefinitions - { - /// - /// Initializes a new instance of the - /// ActivityEntityQueryTemplatePropertiesQueryDefinitions class. - /// - public ActivityEntityQueryTemplatePropertiesQueryDefinitions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ActivityEntityQueryTemplatePropertiesQueryDefinitions class. - /// - /// The Activity query to run on a given - /// entity - /// The dimensions we want to summarize the - /// timeline results on, this is comma separated list - public ActivityEntityQueryTemplatePropertiesQueryDefinitions(string query = default(string), string summarizeBy = default(string)) - { - Query = query; - SummarizeBy = summarizeBy; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Activity query to run on a given entity - /// - [JsonProperty(PropertyName = "query")] - public string Query { get; set; } - - /// - /// Gets or sets the dimensions we want to summarize the timeline - /// results on, this is comma separated list - /// - [JsonProperty(PropertyName = "summarizeBy")] - public string SummarizeBy { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityTimelineItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityTimelineItem.cs deleted file mode 100644 index a894fde412f0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityTimelineItem.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Activity timeline item. - /// - [Newtonsoft.Json.JsonObject("Activity")] - public partial class ActivityTimelineItem : EntityTimelineItem - { - /// - /// Initializes a new instance of the ActivityTimelineItem class. - /// - public ActivityTimelineItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ActivityTimelineItem class. - /// - /// The activity query id. - /// The grouping bucket start - /// time. - /// The grouping bucket end - /// time. - /// The time of the first activity - /// in the grouping bucket. - /// The time of the last activity in - /// the grouping bucket. - /// The activity timeline content. - /// The activity timeline title. - public ActivityTimelineItem(string queryId, System.DateTime bucketStartTimeUTC, System.DateTime bucketEndTimeUTC, System.DateTime firstActivityTimeUTC, System.DateTime lastActivityTimeUTC, string content, string title) - { - QueryId = queryId; - BucketStartTimeUTC = bucketStartTimeUTC; - BucketEndTimeUTC = bucketEndTimeUTC; - FirstActivityTimeUTC = firstActivityTimeUTC; - LastActivityTimeUTC = lastActivityTimeUTC; - Content = content; - Title = title; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the activity query id. - /// - [JsonProperty(PropertyName = "queryId")] - public string QueryId { get; set; } - - /// - /// Gets or sets the grouping bucket start time. - /// - [JsonProperty(PropertyName = "bucketStartTimeUTC")] - public System.DateTime BucketStartTimeUTC { get; set; } - - /// - /// Gets or sets the grouping bucket end time. - /// - [JsonProperty(PropertyName = "bucketEndTimeUTC")] - public System.DateTime BucketEndTimeUTC { get; set; } - - /// - /// Gets or sets the time of the first activity in the grouping bucket. - /// - [JsonProperty(PropertyName = "firstActivityTimeUTC")] - public System.DateTime FirstActivityTimeUTC { get; set; } - - /// - /// Gets or sets the time of the last activity in the grouping bucket. - /// - [JsonProperty(PropertyName = "lastActivityTimeUTC")] - public System.DateTime LastActivityTimeUTC { get; set; } - - /// - /// Gets or sets the activity timeline content. - /// - [JsonProperty(PropertyName = "content")] - public string Content { get; set; } - - /// - /// Gets or sets the activity timeline title. - /// - [JsonProperty(PropertyName = "title")] - public string Title { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (QueryId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "QueryId"); - } - if (Content == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Content"); - } - if (Title == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Title"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleKind.cs index f097dcd28189..f5b94178a49b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleKind.cs @@ -19,8 +19,5 @@ public static class AlertRuleKind public const string Scheduled = "Scheduled"; public const string MicrosoftSecurityIncidentCreation = "MicrosoftSecurityIncidentCreation"; public const string Fusion = "Fusion"; - public const string MLBehaviorAnalytics = "MLBehaviorAnalytics"; - public const string ThreatIntelligence = "ThreatIntelligence"; - public const string NRT = "NRT"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplatePropertiesBase.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplatePropertiesBase.cs deleted file mode 100644 index 037b1d2d4a48..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplatePropertiesBase.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Base alert rule template property bag. - /// - public partial class AlertRuleTemplatePropertiesBase - { - /// - /// Initializes a new instance of the AlertRuleTemplatePropertiesBase - /// class. - /// - public AlertRuleTemplatePropertiesBase() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AlertRuleTemplatePropertiesBase - /// class. - /// - /// the number of alert - /// rules that were created by this template - /// The last time that this alert rule - /// template has been updated. - /// The time that this alert rule template - /// has been added. - /// The description of the alert rule - /// template. - /// The display name for alert rule - /// template. - /// The required data sources for - /// this template - /// The alert rule template status. Possible - /// values include: 'Installed', 'Available', 'NotAvailable' - public AlertRuleTemplatePropertiesBase(int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string)) - { - AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - LastUpdatedDateUTC = lastUpdatedDateUTC; - CreatedDateUTC = createdDateUTC; - Description = description; - DisplayName = displayName; - RequiredDataConnectors = requiredDataConnectors; - Status = status; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the number of alert rules that were created by this - /// template - /// - [JsonProperty(PropertyName = "alertRulesCreatedByTemplateCount")] - public int? AlertRulesCreatedByTemplateCount { get; set; } - - /// - /// Gets the last time that this alert rule template has been updated. - /// - [JsonProperty(PropertyName = "lastUpdatedDateUTC")] - public System.DateTime? LastUpdatedDateUTC { get; private set; } - - /// - /// Gets the time that this alert rule template has been added. - /// - [JsonProperty(PropertyName = "createdDateUTC")] - public System.DateTime? CreatedDateUTC { get; private set; } - - /// - /// Gets or sets the description of the alert rule template. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets the display name for alert rule template. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the required data sources for this template - /// - [JsonProperty(PropertyName = "requiredDataConnectors")] - public IList RequiredDataConnectors { get; set; } - - /// - /// Gets or sets the alert rule template status. Possible values - /// include: 'Installed', 'Available', 'NotAvailable' - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs deleted file mode 100644 index 3482cc685955..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Alert rule template with MITRE property bag. - /// - public partial class AlertRuleTemplateWithMitreProperties : AlertRuleTemplatePropertiesBase - { - /// - /// Initializes a new instance of the - /// AlertRuleTemplateWithMitreProperties class. - /// - public AlertRuleTemplateWithMitreProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AlertRuleTemplateWithMitreProperties class. - /// - /// the number of alert - /// rules that were created by this template - /// The last time that this alert rule - /// template has been updated. - /// The time that this alert rule template - /// has been added. - /// The description of the alert rule - /// template. - /// The display name for alert rule - /// template. - /// The required data sources for - /// this template - /// The alert rule template status. Possible - /// values include: 'Installed', 'Available', 'NotAvailable' - /// The tactics of the alert rule - /// The techniques of the alert rule - public AlertRuleTemplateWithMitreProperties(int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) - : base(alertRulesCreatedByTemplateCount, lastUpdatedDateUTC, createdDateUTC, description, displayName, requiredDataConnectors, status) - { - Tactics = tactics; - Techniques = techniques; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "tactics")] - public IList Tactics { get; set; } - - /// - /// Gets or sets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "techniques")] - public IList Techniques { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertsDataTypeOfDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertsDataTypeOfDataConnector.cs index 3e047c992b32..3a96fcd1dfe5 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertsDataTypeOfDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertsDataTypeOfDataConnector.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -33,7 +32,7 @@ public AlertsDataTypeOfDataConnector() /// class. /// /// Alerts data type connection. - public AlertsDataTypeOfDataConnector(DataConnectorDataTypeCommon alerts) + public AlertsDataTypeOfDataConnector(DataConnectorDataTypeCommon alerts = default(DataConnectorDataTypeCommon)) { Alerts = alerts; CustomInit(); @@ -50,22 +49,5 @@ public AlertsDataTypeOfDataConnector(DataConnectorDataTypeCommon alerts) [JsonProperty(PropertyName = "alerts")] public DataConnectorDataTypeCommon Alerts { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Alerts == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Alerts"); - } - if (Alerts != null) - { - Alerts.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Anomalies.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Anomalies.cs deleted file mode 100644 index f59c61d4e96c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Anomalies.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Settings with single toggle. - /// - [Rest.Serialization.JsonTransformation] - public partial class Anomalies : Settings - { - /// - /// Initializes a new instance of the Anomalies class. - /// - public Anomalies() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Anomalies class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Determines whether the setting is enable or - /// disabled. - public Anomalies(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), bool? isEnabled = default(bool?)) - : base(id, name, type, systemData, etag) - { - IsEnabled = isEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets determines whether the setting is enable or disabled. - /// - [JsonProperty(PropertyName = "properties.isEnabled")] - public bool? IsEnabled { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.cs new file mode 100644 index 000000000000..73f762f8aae4 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.cs @@ -0,0 +1,221 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents Anomaly Security ML Analytics Settings + /// + [Newtonsoft.Json.JsonObject("Anomaly")] + [Rest.Serialization.JsonTransformation] + public partial class AnomalySecurityMLAnalyticsSettings : SecurityMLAnalyticsSetting + { + /// + /// Initializes a new instance of the + /// AnomalySecurityMLAnalyticsSettings class. + /// + public AnomalySecurityMLAnalyticsSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AnomalySecurityMLAnalyticsSettings class. + /// + /// The display name for settings created by + /// this SecurityMLAnalyticsSettings. + /// Determines whether this settings is enabled + /// or disabled. + /// The anomaly version of the + /// AnomalySecurityMLAnalyticsSettings. + /// The frequency that this + /// SecurityMLAnalyticsSettings will be run. + /// The anomaly + /// SecurityMLAnalyticsSettings status. Possible values include: + /// 'Production', 'Flighting' + /// Determines whether this anomaly + /// security ml analytics settings is a default settings + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. + /// Etag of the azure resource + /// The description of the + /// SecurityMLAnalyticsSettings. + /// The last time that this + /// SecurityMLAnalyticsSettings has been modified. + /// The required data sources for + /// this SecurityMLAnalyticsSettings + /// The tactics of the + /// SecurityMLAnalyticsSettings + /// The techniques of the + /// SecurityMLAnalyticsSettings + /// The customizable + /// observations of the AnomalySecurityMLAnalyticsSettings. + /// The anomaly settings version + /// of the Anomaly security ml analytics settings that dictates whether + /// job version gets updated or not. + /// The anomaly settings definition + /// Id + public AnomalySecurityMLAnalyticsSettings(string displayName, bool enabled, string anomalyVersion, System.TimeSpan frequency, string settingsStatus, bool isDefaultSettings, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), IList requiredDataConnectors = default(IList), IList tactics = default(IList), IList techniques = default(IList), object customizableObservations = default(object), int? anomalySettingsVersion = default(int?), System.Guid? settingsDefinitionId = default(System.Guid?)) + : base(id, name, type, systemData, etag) + { + Description = description; + DisplayName = displayName; + Enabled = enabled; + LastModifiedUtc = lastModifiedUtc; + RequiredDataConnectors = requiredDataConnectors; + Tactics = tactics; + Techniques = techniques; + AnomalyVersion = anomalyVersion; + CustomizableObservations = customizableObservations; + Frequency = frequency; + SettingsStatus = settingsStatus; + IsDefaultSettings = isDefaultSettings; + AnomalySettingsVersion = anomalySettingsVersion; + SettingsDefinitionId = settingsDefinitionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the description of the SecurityMLAnalyticsSettings. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets the display name for settings created by this + /// SecurityMLAnalyticsSettings. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets determines whether this settings is enabled or + /// disabled. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool Enabled { get; set; } + + /// + /// Gets the last time that this SecurityMLAnalyticsSettings has been + /// modified. + /// + [JsonProperty(PropertyName = "properties.lastModifiedUtc")] + public System.DateTime? LastModifiedUtc { get; private set; } + + /// + /// Gets or sets the required data sources for this + /// SecurityMLAnalyticsSettings + /// + [JsonProperty(PropertyName = "properties.requiredDataConnectors")] + public IList RequiredDataConnectors { get; set; } + + /// + /// Gets or sets the tactics of the SecurityMLAnalyticsSettings + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the SecurityMLAnalyticsSettings + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + + /// + /// Gets or sets the anomaly version of the + /// AnomalySecurityMLAnalyticsSettings. + /// + [JsonProperty(PropertyName = "properties.anomalyVersion")] + public string AnomalyVersion { get; set; } + + /// + /// Gets or sets the customizable observations of the + /// AnomalySecurityMLAnalyticsSettings. + /// + [JsonProperty(PropertyName = "properties.customizableObservations")] + public object CustomizableObservations { get; set; } + + /// + /// Gets or sets the frequency that this SecurityMLAnalyticsSettings + /// will be run. + /// + [JsonProperty(PropertyName = "properties.frequency")] + public System.TimeSpan Frequency { get; set; } + + /// + /// Gets or sets the anomaly SecurityMLAnalyticsSettings status. + /// Possible values include: 'Production', 'Flighting' + /// + [JsonProperty(PropertyName = "properties.settingsStatus")] + public string SettingsStatus { get; set; } + + /// + /// Gets or sets determines whether this anomaly security ml analytics + /// settings is a default settings + /// + [JsonProperty(PropertyName = "properties.isDefaultSettings")] + public bool IsDefaultSettings { get; set; } + + /// + /// Gets or sets the anomaly settings version of the Anomaly security + /// ml analytics settings that dictates whether job version gets + /// updated or not. + /// + [JsonProperty(PropertyName = "properties.anomalySettingsVersion")] + public int? AnomalySettingsVersion { get; set; } + + /// + /// Gets or sets the anomaly settings definition Id + /// + [JsonProperty(PropertyName = "properties.settingsDefinitionId")] + public System.Guid? SettingsDefinitionId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (AnomalyVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AnomalyVersion"); + } + if (SettingsStatus == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SettingsStatus"); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs index dc0a44be99ce..24634eab5a0b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs @@ -25,7 +25,6 @@ public partial class AutomationRule : ResourceWithEtag /// public AutomationRule() { - TriggeringLogic = new AutomationRuleTriggeringLogic(); CustomInit(); } @@ -33,11 +32,11 @@ public AutomationRule() /// Initializes a new instance of the AutomationRule class. /// /// The display name of the automation - /// rule + /// rule. /// The order of execution of the automation - /// rule + /// rule. /// The actions to execute when the automation - /// rule is triggered + /// rule is triggered. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -48,9 +47,9 @@ public AutomationRule() /// createdBy and modifiedBy information. /// Etag of the azure resource /// The last time the automation rule - /// was updated + /// was updated. /// The time the automation rule was - /// created + /// created. public AutomationRule(string displayName, int order, AutomationRuleTriggeringLogic triggeringLogic, IList actions, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), System.DateTime? createdTimeUtc = default(System.DateTime?), ClientInfo lastModifiedBy = default(ClientInfo), ClientInfo createdBy = default(ClientInfo)) : base(id, name, type, systemData, etag) { @@ -71,13 +70,13 @@ public AutomationRule() partial void CustomInit(); /// - /// Gets or sets the display name of the automation rule + /// Gets or sets the display name of the automation rule. /// [JsonProperty(PropertyName = "properties.displayName")] public string DisplayName { get; set; } /// - /// Gets or sets the order of execution of the automation rule + /// Gets or sets the order of execution of the automation rule. /// [JsonProperty(PropertyName = "properties.order")] public int Order { get; set; } @@ -89,19 +88,19 @@ public AutomationRule() /// /// Gets or sets the actions to execute when the automation rule is - /// triggered + /// triggered. /// [JsonProperty(PropertyName = "properties.actions")] public IList Actions { get; set; } /// - /// Gets the last time the automation rule was updated + /// Gets the last time the automation rule was updated. /// [JsonProperty(PropertyName = "properties.lastModifiedTimeUtc")] public System.DateTime? LastModifiedTimeUtc { get; private set; } /// - /// Gets the time the automation rule was created + /// Gets the time the automation rule was created. /// [JsonProperty(PropertyName = "properties.createdTimeUtc")] public System.DateTime? CreatedTimeUtc { get; private set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs index 8cbf8dfe910e..352c5358710a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Describes an automation rule action + /// Describes an automation rule action. /// public partial class AutomationRuleAction { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleCondition.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleCondition.cs index 3647e487416a..1dfdb1fe6b7d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleCondition.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleCondition.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Describes an automation rule condition + /// Describes an automation rule condition. /// public partial class AutomationRuleCondition { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.cs new file mode 100644 index 000000000000..73d06e54f4af --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.cs @@ -0,0 +1,37 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for + /// AutomationRulePropertyArrayChangedConditionSupportedArrayType. + /// + public static class AutomationRulePropertyArrayChangedConditionSupportedArrayType + { + /// + /// Evaluate the condition on the alerts + /// + public const string Alerts = "Alerts"; + /// + /// Evaluate the condition on the labels + /// + public const string Labels = "Labels"; + /// + /// Evaluate the condition on the tactics + /// + public const string Tactics = "Tactics"; + /// + /// Evaluate the condition on the comments + /// + public const string Comments = "Comments"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQueryKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.cs similarity index 57% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQueryKind.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.cs index 67fafc2169c4..0e2d123cac5b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQueryKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.cs @@ -12,10 +12,14 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for CustomEntityQueryKind. + /// Defines values for + /// AutomationRulePropertyArrayChangedConditionSupportedChangeType. /// - public static class CustomEntityQueryKind + public static class AutomationRulePropertyArrayChangedConditionSupportedChangeType { - public const string Activity = "Activity"; + /// + /// Evaluate the condition on items added to the array + /// + public const string Added = "Added"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.cs new file mode 100644 index 000000000000..48a1dee07db4 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class AutomationRulePropertyArrayChangedValuesCondition + { + /// + /// Initializes a new instance of the + /// AutomationRulePropertyArrayChangedValuesCondition class. + /// + public AutomationRulePropertyArrayChangedValuesCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AutomationRulePropertyArrayChangedValuesCondition class. + /// + /// Possible values include: 'Alerts', + /// 'Labels', 'Tactics', 'Comments' + /// Possible values include: 'Added' + public AutomationRulePropertyArrayChangedValuesCondition(string arrayType = default(string), string changeType = default(string)) + { + ArrayType = arrayType; + ChangeType = changeType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'Alerts', 'Labels', + /// 'Tactics', 'Comments' + /// + [JsonProperty(PropertyName = "arrayType")] + public string ArrayType { get; set; } + + /// + /// Gets or sets possible values include: 'Added' + /// + [JsonProperty(PropertyName = "changeType")] + public string ChangeType { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyChangedConditionSupportedChangedType.cs similarity index 56% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineItem.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyChangedConditionSupportedChangedType.cs index c371b8308801..de73b52a43a3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineItem.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyChangedConditionSupportedChangedType.cs @@ -10,26 +10,20 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using System.Linq; /// - /// Entity timeline Item. + /// Defines values for + /// AutomationRulePropertyChangedConditionSupportedChangedType. /// - public partial class EntityTimelineItem + public static class AutomationRulePropertyChangedConditionSupportedChangedType { /// - /// Initializes a new instance of the EntityTimelineItem class. + /// Evaluate the condition on the previous value of the property /// - public EntityTimelineItem() - { - CustomInit(); - } - - + public const string ChangedFrom = "ChangedFrom"; /// - /// An initialization method that performs custom operations like setting defaults + /// Evaluate the condition on the updated value of the property /// - partial void CustomInit(); - + public const string ChangedTo = "ChangedTo"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyChangedConditionSupportedPropertyType.cs similarity index 52% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineKind.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyChangedConditionSupportedPropertyType.cs index 7187fa5452ad..c4471dc0f620 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyChangedConditionSupportedPropertyType.cs @@ -12,21 +12,22 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for EntityTimelineKind. + /// Defines values for + /// AutomationRulePropertyChangedConditionSupportedPropertyType. /// - public static class EntityTimelineKind + public static class AutomationRulePropertyChangedConditionSupportedPropertyType { /// - /// activity + /// Evaluate the condition on the incident severity /// - public const string Activity = "Activity"; + public const string IncidentSeverity = "IncidentSeverity"; /// - /// bookmarks + /// Evaluate the condition on the incident status /// - public const string Bookmark = "Bookmark"; + public const string IncidentStatus = "IncidentStatus"; /// - /// security alerts + /// Evaluate the condition on the incident owner /// - public const string SecurityAlert = "SecurityAlert"; + public const string IncidentOwner = "IncidentOwner"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs index 64c9fbc6512e..7002d5c1784b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs @@ -49,6 +49,10 @@ public static class AutomationRulePropertyConditionSupportedProperty /// public const string IncidentProviderName = "IncidentProviderName"; /// + /// The update source of the incident + /// + public const string IncidentUpdatedBySource = "IncidentUpdatedBySource"; + /// /// The account Azure Active Directory tenant id /// public const string AccountAadTenantId = "AccountAadTenantId"; @@ -85,6 +89,10 @@ public static class AutomationRulePropertyConditionSupportedProperty /// public const string AlertProductNames = "AlertProductNames"; /// + /// The analytic rule ids of the alert + /// + public const string AlertAnalyticRuleIds = "AlertAnalyticRuleIds"; + /// /// The Azure resource id /// public const string AzureResourceResourceId = "AzureResourceResourceId"; diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.cs new file mode 100644 index 000000000000..72ce6fa4e962 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class AutomationRulePropertyValuesChangedCondition + { + /// + /// Initializes a new instance of the + /// AutomationRulePropertyValuesChangedCondition class. + /// + public AutomationRulePropertyValuesChangedCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AutomationRulePropertyValuesChangedCondition class. + /// + /// Possible values include: + /// 'IncidentSeverity', 'IncidentStatus', 'IncidentOwner' + /// Possible values include: 'ChangedFrom', + /// 'ChangedTo' + /// Possible values include: 'Equals', + /// 'NotEquals', 'Contains', 'NotContains', 'StartsWith', + /// 'NotStartsWith', 'EndsWith', 'NotEndsWith' + public AutomationRulePropertyValuesChangedCondition(string propertyName = default(string), string changeType = default(string), string operatorProperty = default(string), IList propertyValues = default(IList)) + { + PropertyName = propertyName; + ChangeType = changeType; + OperatorProperty = operatorProperty; + PropertyValues = propertyValues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'IncidentSeverity', + /// 'IncidentStatus', 'IncidentOwner' + /// + [JsonProperty(PropertyName = "propertyName")] + public string PropertyName { get; set; } + + /// + /// Gets or sets possible values include: 'ChangedFrom', 'ChangedTo' + /// + [JsonProperty(PropertyName = "changeType")] + public string ChangeType { get; set; } + + /// + /// Gets or sets possible values include: 'Equals', 'NotEquals', + /// 'Contains', 'NotContains', 'StartsWith', 'NotStartsWith', + /// 'EndsWith', 'NotEndsWith' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// + [JsonProperty(PropertyName = "propertyValues")] + public IList PropertyValues { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs index 4c9cb6e89b2f..07ee545a254a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs @@ -34,9 +34,10 @@ public AutomationRulePropertyValuesCondition() /// 'IncidentTitle', 'IncidentDescription', 'IncidentSeverity', /// 'IncidentStatus', 'IncidentRelatedAnalyticRuleIds', /// 'IncidentTactics', 'IncidentLabel', 'IncidentProviderName', - /// 'AccountAadTenantId', 'AccountAadUserId', 'AccountName', - /// 'AccountNTDomain', 'AccountPUID', 'AccountSid', - /// 'AccountObjectGuid', 'AccountUPNSuffix', 'AlertProductNames', + /// 'IncidentUpdatedBySource', 'AccountAadTenantId', + /// 'AccountAadUserId', 'AccountName', 'AccountNTDomain', + /// 'AccountPUID', 'AccountSid', 'AccountObjectGuid', + /// 'AccountUPNSuffix', 'AlertProductNames', 'AlertAnalyticRuleIds', /// 'AzureResourceResourceId', 'AzureResourceSubscriptionId', /// 'CloudApplicationAppId', 'CloudApplicationAppName', /// 'DNSDomainName', 'FileDirectory', 'FileName', 'FileHashValue', @@ -70,10 +71,11 @@ public AutomationRulePropertyValuesCondition() /// Gets or sets possible values include: 'IncidentTitle', /// 'IncidentDescription', 'IncidentSeverity', 'IncidentStatus', /// 'IncidentRelatedAnalyticRuleIds', 'IncidentTactics', - /// 'IncidentLabel', 'IncidentProviderName', 'AccountAadTenantId', - /// 'AccountAadUserId', 'AccountName', 'AccountNTDomain', - /// 'AccountPUID', 'AccountSid', 'AccountObjectGuid', - /// 'AccountUPNSuffix', 'AlertProductNames', 'AzureResourceResourceId', + /// 'IncidentLabel', 'IncidentProviderName', 'IncidentUpdatedBySource', + /// 'AccountAadTenantId', 'AccountAadUserId', 'AccountName', + /// 'AccountNTDomain', 'AccountPUID', 'AccountSid', + /// 'AccountObjectGuid', 'AccountUPNSuffix', 'AlertProductNames', + /// 'AlertAnalyticRuleIds', 'AzureResourceResourceId', /// 'AzureResourceSubscriptionId', 'CloudApplicationAppId', /// 'CloudApplicationAppName', 'DNSDomainName', 'FileDirectory', /// 'FileName', 'FileHashValue', 'HostAzureID', 'HostName', diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs index bbea4145bc82..9d949d296651 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs @@ -58,6 +58,10 @@ public AutomationRuleRunPlaybookAction() public override void Validate() { base.Validate(); + if (ActionConfiguration != null) + { + ActionConfiguration.Validate(); + } } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs index de85e5c02bd4..2fc9c4072f2f 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Describes automation rule triggering logic + /// Describes automation rule triggering logic. /// public partial class AutomationRuleTriggeringLogic { @@ -35,26 +35,24 @@ public AutomationRuleTriggeringLogic() /// class. /// /// Determines whether the automation rule is - /// enabled or disabled + /// enabled or disabled. + /// Possible values include: 'Incidents', + /// 'Alerts' + /// Possible values include: 'Created', + /// 'Updated' /// Determines when the automation rule /// should automatically expire and be disabled. /// The conditions to evaluate to determine if - /// the automation rule should be triggered on a given object - public AutomationRuleTriggeringLogic(bool isEnabled, System.DateTime? expirationTimeUtc = default(System.DateTime?), IList conditions = default(IList)) + /// the automation rule should be triggered on a given object. + public AutomationRuleTriggeringLogic(bool isEnabled, string triggersOn, string triggersWhen, System.DateTime? expirationTimeUtc = default(System.DateTime?), IList conditions = default(IList)) { IsEnabled = isEnabled; ExpirationTimeUtc = expirationTimeUtc; + TriggersOn = triggersOn; + TriggersWhen = triggersWhen; Conditions = conditions; CustomInit(); } - /// - /// Static constructor for AutomationRuleTriggeringLogic class. - /// - static AutomationRuleTriggeringLogic() - { - TriggersOn = "Incidents"; - TriggersWhen = "Created"; - } /// /// An initialization method that performs custom operations like setting defaults @@ -63,7 +61,7 @@ static AutomationRuleTriggeringLogic() /// /// Gets or sets determines whether the automation rule is enabled or - /// disabled + /// disabled. /// [JsonProperty(PropertyName = "isEnabled")] public bool IsEnabled { get; set; } @@ -76,21 +74,23 @@ static AutomationRuleTriggeringLogic() public System.DateTime? ExpirationTimeUtc { get; set; } /// - /// Gets or sets the conditions to evaluate to determine if the - /// automation rule should be triggered on a given object + /// Gets or sets possible values include: 'Incidents', 'Alerts' /// - [JsonProperty(PropertyName = "conditions")] - public IList Conditions { get; set; } + [JsonProperty(PropertyName = "triggersOn")] + public string TriggersOn { get; set; } /// + /// Gets or sets possible values include: 'Created', 'Updated' /// - [JsonProperty(PropertyName = "triggersOn")] - public static string TriggersOn { get; private set; } + [JsonProperty(PropertyName = "triggersWhen")] + public string TriggersWhen { get; set; } /// + /// Gets or sets the conditions to evaluate to determine if the + /// automation rule should be triggered on a given object. /// - [JsonProperty(PropertyName = "triggersWhen")] - public static string TriggersWhen { get; private set; } + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } /// /// Validate the object. @@ -100,6 +100,14 @@ static AutomationRuleTriggeringLogic() /// public virtual void Validate() { + if (TriggersOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TriggersOn"); + } + if (TriggersWhen == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TriggersWhen"); + } if (Conditions != null) { if (Conditions.Count > 50) diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Availability.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Availability.cs deleted file mode 100644 index d4cd9363276f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Availability.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Connector Availability Status - /// - public partial class Availability - { - /// - /// Initializes a new instance of the Availability class. - /// - public Availability() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Availability class. - /// - /// The connector Availability Status - /// Set connector as preview - public Availability(int? status = default(int?), bool? isPreview = default(bool?)) - { - Status = status; - IsPreview = isPreview; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the connector Availability Status - /// - [JsonProperty(PropertyName = "status")] - public int? Status { get; set; } - - /// - /// Gets or sets set connector as preview - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.cs deleted file mode 100644 index d09f16f2f7ed..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Amazon Web Services CloudTrail requirements check request. - /// - [Newtonsoft.Json.JsonObject("AmazonWebServicesCloudTrail")] - public partial class AwsCloudTrailCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the AwsCloudTrailCheckRequirements - /// class. - /// - public AwsCloudTrailCheckRequirements() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnector.cs index c8e56112896e..658b9ba5881d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnector.cs @@ -33,8 +33,6 @@ public AwsCloudTrailDataConnector() /// /// Initializes a new instance of the AwsCloudTrailDataConnector class. /// - /// The available data types for the - /// connector. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -46,7 +44,9 @@ public AwsCloudTrailDataConnector() /// Etag of the azure resource /// The Aws Role Arn (with CloudTrailReadOnly /// policy) that is used to access the Aws account. - public AwsCloudTrailDataConnector(AwsCloudTrailDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string awsRoleArn = default(string)) + /// The available data types for the + /// connector. + public AwsCloudTrailDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string awsRoleArn = default(string), AwsCloudTrailDataConnectorDataTypes dataTypes = default(AwsCloudTrailDataConnectorDataTypes)) : base(id, name, type, systemData, etag) { AwsRoleArn = awsRoleArn; @@ -72,22 +72,5 @@ public AwsCloudTrailDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public AwsCloudTrailDataConnectorDataTypes DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypes.cs index cb1ee91fc878..279ef3f6a6fd 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypes.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypes.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -34,7 +33,7 @@ public AwsCloudTrailDataConnectorDataTypes() /// AwsCloudTrailDataConnectorDataTypes class. /// /// Logs data type. - public AwsCloudTrailDataConnectorDataTypes(AwsCloudTrailDataConnectorDataTypesLogs logs) + public AwsCloudTrailDataConnectorDataTypes(AwsCloudTrailDataConnectorDataTypesLogs logs = default(AwsCloudTrailDataConnectorDataTypesLogs)) { Logs = logs; CustomInit(); @@ -51,22 +50,5 @@ public AwsCloudTrailDataConnectorDataTypes(AwsCloudTrailDataConnectorDataTypesLo [JsonProperty(PropertyName = "logs")] public AwsCloudTrailDataConnectorDataTypesLogs Logs { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Logs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Logs"); - } - if (Logs != null) - { - Logs.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypesLogs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypesLogs.cs index 6f771243230b..02803069b81e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypesLogs.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsCloudTrailDataConnectorDataTypesLogs.cs @@ -33,7 +33,7 @@ public AwsCloudTrailDataConnectorDataTypesLogs() /// Describe whether this data type connection is /// enabled or not. Possible values include: 'Enabled', /// 'Disabled' - public AwsCloudTrailDataConnectorDataTypesLogs(string state) + public AwsCloudTrailDataConnectorDataTypesLogs(string state = default(string)) : base(state) { CustomInit(); @@ -44,15 +44,5 @@ public AwsCloudTrailDataConnectorDataTypesLogs(string state) /// partial void CustomInit(); - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.cs deleted file mode 100644 index de3dc86562f5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Amazon Web Services S3 requirements check request. - /// - [Newtonsoft.Json.JsonObject("AmazonWebServicesS3")] - public partial class AwsS3CheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the AwsS3CheckRequirements class. - /// - public AwsS3CheckRequirements() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnector.cs deleted file mode 100644 index 4beedd3351ef..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnector.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Amazon Web Services S3 data connector. - /// - [Newtonsoft.Json.JsonObject("AmazonWebServicesS3")] - [Rest.Serialization.JsonTransformation] - public partial class AwsS3DataConnector : DataConnector - { - /// - /// Initializes a new instance of the AwsS3DataConnector class. - /// - public AwsS3DataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AwsS3DataConnector class. - /// - /// The logs destination table name in - /// LogAnalytics. - /// The AWS sqs urls for the connector. - /// The Aws Role Arn that is used to access the - /// Aws account. - /// The available data types for the - /// connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public AwsS3DataConnector(string destinationTable, IList sqsUrls, string roleArn, AwsS3DataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - DestinationTable = destinationTable; - SqsUrls = sqsUrls; - RoleArn = roleArn; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the logs destination table name in LogAnalytics. - /// - [JsonProperty(PropertyName = "properties.destinationTable")] - public string DestinationTable { get; set; } - - /// - /// Gets or sets the AWS sqs urls for the connector. - /// - [JsonProperty(PropertyName = "properties.sqsUrls")] - public IList SqsUrls { get; set; } - - /// - /// Gets or sets the Aws Role Arn that is used to access the Aws - /// account. - /// - [JsonProperty(PropertyName = "properties.roleArn")] - public string RoleArn { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public AwsS3DataConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DestinationTable == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DestinationTable"); - } - if (SqsUrls == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SqsUrls"); - } - if (RoleArn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "RoleArn"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypes.cs deleted file mode 100644 index 42ef89fee1fa..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypes.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Amazon Web Services S3 data connector. - /// - public partial class AwsS3DataConnectorDataTypes - { - /// - /// Initializes a new instance of the AwsS3DataConnectorDataTypes - /// class. - /// - public AwsS3DataConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AwsS3DataConnectorDataTypes - /// class. - /// - /// Logs data type. - public AwsS3DataConnectorDataTypes(AwsS3DataConnectorDataTypesLogs logs) - { - Logs = logs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets logs data type. - /// - [JsonProperty(PropertyName = "logs")] - public AwsS3DataConnectorDataTypesLogs Logs { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Logs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Logs"); - } - if (Logs != null) - { - Logs.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypesLogs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypesLogs.cs deleted file mode 100644 index 4db4cdd6249a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AwsS3DataConnectorDataTypesLogs.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Logs data type. - /// - public partial class AwsS3DataConnectorDataTypesLogs : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the AwsS3DataConnectorDataTypesLogs - /// class. - /// - public AwsS3DataConnectorDataTypesLogs() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AwsS3DataConnectorDataTypesLogs - /// class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - public AwsS3DataConnectorDataTypesLogs(string state) - : base(state) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs deleted file mode 100644 index c85fc4c77271..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Resources created in Azure DevOps repository. - /// - public partial class AzureDevOpsResourceInfo - { - /// - /// Initializes a new instance of the AzureDevOpsResourceInfo class. - /// - public AzureDevOpsResourceInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureDevOpsResourceInfo class. - /// - /// Id of the pipeline created for the - /// source-control. - /// Id of the service-connection - /// created for the source-control. - public AzureDevOpsResourceInfo(string pipelineId = default(string), string serviceConnectionId = default(string)) - { - PipelineId = pipelineId; - ServiceConnectionId = serviceConnectionId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets id of the pipeline created for the source-control. - /// - [JsonProperty(PropertyName = "pipelineId")] - public string PipelineId { get; set; } - - /// - /// Gets or sets id of the service-connection created for the - /// source-control. - /// - [JsonProperty(PropertyName = "serviceConnectionId")] - public string ServiceConnectionId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs index aae6c9867326..8b2f0342eb46 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs @@ -61,12 +61,7 @@ public Bookmark() /// The end time for the query /// Describes an incident that relates to /// bookmark - /// Describes the entity mappings of the - /// bookmark - /// A list of relevant mitre attacks - /// A list of relevant mitre - /// techniques - public Bookmark(string displayName, string query, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? created = default(System.DateTime?), UserInfo createdBy = default(UserInfo), IList labels = default(IList), string notes = default(string), string queryResult = default(string), System.DateTime? updated = default(System.DateTime?), UserInfo updatedBy = default(UserInfo), System.DateTime? eventTime = default(System.DateTime?), System.DateTime? queryStartTime = default(System.DateTime?), System.DateTime? queryEndTime = default(System.DateTime?), IncidentInfo incidentInfo = default(IncidentInfo), IList entityMappings = default(IList), IList tactics = default(IList), IList techniques = default(IList)) + public Bookmark(string displayName, string query, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? created = default(System.DateTime?), UserInfo createdBy = default(UserInfo), IList labels = default(IList), string notes = default(string), string queryResult = default(string), System.DateTime? updated = default(System.DateTime?), UserInfo updatedBy = default(UserInfo), System.DateTime? eventTime = default(System.DateTime?), System.DateTime? queryStartTime = default(System.DateTime?), System.DateTime? queryEndTime = default(System.DateTime?), IncidentInfo incidentInfo = default(IncidentInfo)) : base(id, name, type, systemData, etag) { Created = created; @@ -82,9 +77,6 @@ public Bookmark() QueryStartTime = queryStartTime; QueryEndTime = queryEndTime; IncidentInfo = incidentInfo; - EntityMappings = entityMappings; - Tactics = tactics; - Techniques = techniques; CustomInit(); } @@ -171,24 +163,6 @@ public Bookmark() [JsonProperty(PropertyName = "properties.incidentInfo")] public IncidentInfo IncidentInfo { get; set; } - /// - /// Gets or sets describes the entity mappings of the bookmark - /// - [JsonProperty(PropertyName = "properties.entityMappings")] - public IList EntityMappings { get; set; } - - /// - /// Gets or sets a list of relevant mitre attacks - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - - /// - /// Gets or sets a list of relevant mitre techniques - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; set; } - /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs deleted file mode 100644 index c07aaa2b8944..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the entity mappings of a single entity - /// - public partial class BookmarkEntityMappings - { - /// - /// Initializes a new instance of the BookmarkEntityMappings class. - /// - public BookmarkEntityMappings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BookmarkEntityMappings class. - /// - /// The entity type - /// Array of fields mapping for that entity - /// type - public BookmarkEntityMappings(string entityType = default(string), IList fieldMappings = default(IList)) - { - EntityType = entityType; - FieldMappings = fieldMappings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the entity type - /// - [JsonProperty(PropertyName = "entityType")] - public string EntityType { get; set; } - - /// - /// Gets or sets array of fields mapping for that entity type - /// - [JsonProperty(PropertyName = "fieldMappings")] - public IList FieldMappings { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandParameters.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandParameters.cs deleted file mode 100644 index 49692692a3f7..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandParameters.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The parameters required to execute an expand operation on the given - /// bookmark. - /// - public partial class BookmarkExpandParameters - { - /// - /// Initializes a new instance of the BookmarkExpandParameters class. - /// - public BookmarkExpandParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BookmarkExpandParameters class. - /// - /// The end date filter, so the only expansion - /// results returned are before this date. - /// The Id of the expansion to - /// perform. - /// The start date filter, so the only - /// expansion results returned are after this date. - public BookmarkExpandParameters(System.DateTime? endTime = default(System.DateTime?), System.Guid? expansionId = default(System.Guid?), System.DateTime? startTime = default(System.DateTime?)) - { - EndTime = endTime; - ExpansionId = expansionId; - StartTime = startTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the end date filter, so the only expansion results - /// returned are before this date. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets the Id of the expansion to perform. - /// - [JsonProperty(PropertyName = "expansionId")] - public System.Guid? ExpansionId { get; set; } - - /// - /// Gets or sets the start date filter, so the only expansion results - /// returned are after this date. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponse.cs deleted file mode 100644 index 1d0025851f08..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponse.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The entity expansion result operation response. - /// - public partial class BookmarkExpandResponse - { - /// - /// Initializes a new instance of the BookmarkExpandResponse class. - /// - public BookmarkExpandResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BookmarkExpandResponse class. - /// - /// The metadata from the expansion operation - /// results. - /// The expansion result values. - public BookmarkExpandResponse(ExpansionResultsMetadata metaData = default(ExpansionResultsMetadata), BookmarkExpandResponseValue value = default(BookmarkExpandResponseValue)) - { - MetaData = metaData; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the metadata from the expansion operation results. - /// - [JsonProperty(PropertyName = "metaData")] - public ExpansionResultsMetadata MetaData { get; set; } - - /// - /// Gets or sets the expansion result values. - /// - [JsonProperty(PropertyName = "value")] - public BookmarkExpandResponseValue Value { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.cs deleted file mode 100644 index 528b47f0a0e0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The expansion result values. - /// - public partial class BookmarkExpandResponseValue - { - /// - /// Initializes a new instance of the BookmarkExpandResponseValue - /// class. - /// - public BookmarkExpandResponseValue() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BookmarkExpandResponseValue - /// class. - /// - /// Array of the expansion result - /// entities. - /// Array of expansion result connected - /// entities - public BookmarkExpandResponseValue(IList entities = default(IList), IList edges = default(IList)) - { - Entities = entities; - Edges = edges; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets array of the expansion result entities. - /// - [JsonProperty(PropertyName = "entities")] - public IList Entities { get; set; } - - /// - /// Gets or sets array of expansion result connected entities - /// - [JsonProperty(PropertyName = "edges")] - public IList Edges { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.cs deleted file mode 100644 index dc53041ebffa..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents bookmark timeline item. - /// - [Newtonsoft.Json.JsonObject("Bookmark")] - public partial class BookmarkTimelineItem : EntityTimelineItem - { - /// - /// Initializes a new instance of the BookmarkTimelineItem class. - /// - public BookmarkTimelineItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BookmarkTimelineItem class. - /// - /// The bookmark azure resource - /// id. - /// The bookmark display name. - /// The notes of the bookmark - /// The bookmark end time. - /// The bookmark start time. - /// The bookmark event time. - /// Describes a user that created the - /// bookmark - /// List of labels relevant to this - /// bookmark - public BookmarkTimelineItem(string azureResourceId, string displayName = default(string), string notes = default(string), System.DateTime? endTimeUtc = default(System.DateTime?), System.DateTime? startTimeUtc = default(System.DateTime?), System.DateTime? eventTime = default(System.DateTime?), UserInfo createdBy = default(UserInfo), IList labels = default(IList)) - { - AzureResourceId = azureResourceId; - DisplayName = displayName; - Notes = notes; - EndTimeUtc = endTimeUtc; - StartTimeUtc = startTimeUtc; - EventTime = eventTime; - CreatedBy = createdBy; - Labels = labels; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the bookmark azure resource id. - /// - [JsonProperty(PropertyName = "azureResourceId")] - public string AzureResourceId { get; set; } - - /// - /// Gets or sets the bookmark display name. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the notes of the bookmark - /// - [JsonProperty(PropertyName = "notes")] - public string Notes { get; set; } - - /// - /// Gets or sets the bookmark end time. - /// - [JsonProperty(PropertyName = "endTimeUtc")] - public System.DateTime? EndTimeUtc { get; set; } - - /// - /// Gets or sets the bookmark start time. - /// - [JsonProperty(PropertyName = "startTimeUtc")] - public System.DateTime? StartTimeUtc { get; set; } - - /// - /// Gets or sets the bookmark event time. - /// - [JsonProperty(PropertyName = "eventTime")] - public System.DateTime? EventTime { get; set; } - - /// - /// Gets or sets describes a user that created the bookmark - /// - [JsonProperty(PropertyName = "createdBy")] - public UserInfo CreatedBy { get; set; } - - /// - /// Gets or sets list of labels relevant to this bookmark - /// - [JsonProperty(PropertyName = "labels")] - public IList Labels { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AzureResourceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AzureResourceId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.cs deleted file mode 100644 index 375f06f55099..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Codeless API Polling data connector. - /// - [Newtonsoft.Json.JsonObject("APIPolling")] - [Rest.Serialization.JsonTransformation] - public partial class CodelessApiPollingDataConnector : DataConnector - { - /// - /// Initializes a new instance of the CodelessApiPollingDataConnector - /// class. - /// - public CodelessApiPollingDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CodelessApiPollingDataConnector - /// class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Config to describe the instructions - /// blade - /// Config to describe the polling - /// instructions - public CodelessApiPollingDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), CodelessUiConnectorConfigProperties connectorUiConfig = default(CodelessUiConnectorConfigProperties), CodelessConnectorPollingConfigProperties pollingConfig = default(CodelessConnectorPollingConfigProperties)) - : base(id, name, type, systemData, etag) - { - ConnectorUiConfig = connectorUiConfig; - PollingConfig = pollingConfig; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets config to describe the instructions blade - /// - [JsonProperty(PropertyName = "properties.connectorUiConfig")] - public CodelessUiConnectorConfigProperties ConnectorUiConfig { get; set; } - - /// - /// Gets or sets config to describe the polling instructions - /// - [JsonProperty(PropertyName = "properties.pollingConfig")] - public CodelessConnectorPollingConfigProperties PollingConfig { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ConnectorUiConfig != null) - { - ConnectorUiConfig.Validate(); - } - if (PollingConfig != null) - { - PollingConfig.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.cs deleted file mode 100644 index e354316669b3..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.cs +++ /dev/null @@ -1,184 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describe the authentication properties needed to successfully - /// authenticate with the server - /// - public partial class CodelessConnectorPollingAuthProperties - { - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingAuthProperties class. - /// - public CodelessConnectorPollingAuthProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingAuthProperties class. - /// - /// The authentication type - /// The header name which the token is sent - /// with - /// A prefix send in the header before - /// the actual token - /// Marks if the key should sent in - /// header - /// Describes the flow name, for example - /// 'AuthCode' for Oauth 2.0 - /// The endpoint used to issue a token, - /// used in Oauth 2.0 flow - /// The endpoint used to authorize - /// the user, used in Oauth 2.0 flow - /// The query - /// parameters used in authorization request, used in Oauth 2.0 - /// flow - /// The redirect endpoint where we - /// will get the authorization code, used in Oauth 2.0 flow - /// The query headers used in token - /// request, used in Oauth 2.0 flow - /// The query parameters - /// used in token request, used in Oauth 2.0 flow - /// Marks if we should send the - /// client secret in header or payload, used in Oauth 2.0 flow - /// The OAuth token scope - public CodelessConnectorPollingAuthProperties(string authType, string apiKeyName = default(string), string apiKeyIdentifier = default(string), string isApiKeyInPostPayload = default(string), string flowName = default(string), string tokenEndpoint = default(string), string authorizationEndpoint = default(string), object authorizationEndpointQueryParameters = default(object), string redirectionEndpoint = default(string), object tokenEndpointHeaders = default(object), object tokenEndpointQueryParameters = default(object), bool? isClientSecretInHeader = default(bool?), string scope = default(string)) - { - AuthType = authType; - ApiKeyName = apiKeyName; - ApiKeyIdentifier = apiKeyIdentifier; - IsApiKeyInPostPayload = isApiKeyInPostPayload; - FlowName = flowName; - TokenEndpoint = tokenEndpoint; - AuthorizationEndpoint = authorizationEndpoint; - AuthorizationEndpointQueryParameters = authorizationEndpointQueryParameters; - RedirectionEndpoint = redirectionEndpoint; - TokenEndpointHeaders = tokenEndpointHeaders; - TokenEndpointQueryParameters = tokenEndpointQueryParameters; - IsClientSecretInHeader = isClientSecretInHeader; - Scope = scope; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the authentication type - /// - [JsonProperty(PropertyName = "authType")] - public string AuthType { get; set; } - - /// - /// Gets or sets the header name which the token is sent with - /// - [JsonProperty(PropertyName = "apiKeyName")] - public string ApiKeyName { get; set; } - - /// - /// Gets or sets a prefix send in the header before the actual token - /// - [JsonProperty(PropertyName = "apiKeyIdentifier")] - public string ApiKeyIdentifier { get; set; } - - /// - /// Gets or sets marks if the key should sent in header - /// - [JsonProperty(PropertyName = "isApiKeyInPostPayload")] - public string IsApiKeyInPostPayload { get; set; } - - /// - /// Gets or sets describes the flow name, for example 'AuthCode' for - /// Oauth 2.0 - /// - [JsonProperty(PropertyName = "flowName")] - public string FlowName { get; set; } - - /// - /// Gets or sets the endpoint used to issue a token, used in Oauth 2.0 - /// flow - /// - [JsonProperty(PropertyName = "tokenEndpoint")] - public string TokenEndpoint { get; set; } - - /// - /// Gets or sets the endpoint used to authorize the user, used in Oauth - /// 2.0 flow - /// - [JsonProperty(PropertyName = "authorizationEndpoint")] - public string AuthorizationEndpoint { get; set; } - - /// - /// Gets or sets the query parameters used in authorization request, - /// used in Oauth 2.0 flow - /// - [JsonProperty(PropertyName = "authorizationEndpointQueryParameters")] - public object AuthorizationEndpointQueryParameters { get; set; } - - /// - /// Gets or sets the redirect endpoint where we will get the - /// authorization code, used in Oauth 2.0 flow - /// - [JsonProperty(PropertyName = "redirectionEndpoint")] - public string RedirectionEndpoint { get; set; } - - /// - /// Gets or sets the query headers used in token request, used in Oauth - /// 2.0 flow - /// - [JsonProperty(PropertyName = "tokenEndpointHeaders")] - public object TokenEndpointHeaders { get; set; } - - /// - /// Gets or sets the query parameters used in token request, used in - /// Oauth 2.0 flow - /// - [JsonProperty(PropertyName = "tokenEndpointQueryParameters")] - public object TokenEndpointQueryParameters { get; set; } - - /// - /// Gets or sets marks if we should send the client secret in header or - /// payload, used in Oauth 2.0 flow - /// - [JsonProperty(PropertyName = "isClientSecretInHeader")] - public bool? IsClientSecretInHeader { get; set; } - - /// - /// Gets or sets the OAuth token scope - /// - [JsonProperty(PropertyName = "scope")] - public string Scope { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AuthType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AuthType"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.cs deleted file mode 100644 index 8ab895f12109..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Config to describe the polling config for API poller connector - /// - public partial class CodelessConnectorPollingConfigProperties - { - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingConfigProperties class. - /// - public CodelessConnectorPollingConfigProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingConfigProperties class. - /// - /// Describe the authentication type of the - /// poller - /// Describe the poll request config parameters - /// of the poller - /// The poller active status - /// Describe the poll request paging config of the - /// poller - /// Describe the response config parameters of - /// the poller - public CodelessConnectorPollingConfigProperties(CodelessConnectorPollingAuthProperties auth, CodelessConnectorPollingRequestProperties request, bool? isActive = default(bool?), CodelessConnectorPollingPagingProperties paging = default(CodelessConnectorPollingPagingProperties), CodelessConnectorPollingResponseProperties response = default(CodelessConnectorPollingResponseProperties)) - { - IsActive = isActive; - Auth = auth; - Request = request; - Paging = paging; - Response = response; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the poller active status - /// - [JsonProperty(PropertyName = "isActive")] - public bool? IsActive { get; set; } - - /// - /// Gets or sets describe the authentication type of the poller - /// - [JsonProperty(PropertyName = "auth")] - public CodelessConnectorPollingAuthProperties Auth { get; set; } - - /// - /// Gets or sets describe the poll request config parameters of the - /// poller - /// - [JsonProperty(PropertyName = "request")] - public CodelessConnectorPollingRequestProperties Request { get; set; } - - /// - /// Gets or sets describe the poll request paging config of the poller - /// - [JsonProperty(PropertyName = "paging")] - public CodelessConnectorPollingPagingProperties Paging { get; set; } - - /// - /// Gets or sets describe the response config parameters of the poller - /// - [JsonProperty(PropertyName = "response")] - public CodelessConnectorPollingResponseProperties Response { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Auth == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Auth"); - } - if (Request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Request"); - } - if (Auth != null) - { - Auth.Validate(); - } - if (Request != null) - { - Request.Validate(); - } - if (Paging != null) - { - Paging.Validate(); - } - if (Response != null) - { - Response.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.cs deleted file mode 100644 index 3a763555d31d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.cs +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describe the properties needed to make a pagination call - /// - public partial class CodelessConnectorPollingPagingProperties - { - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingPagingProperties class. - /// - public CodelessConnectorPollingPagingProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingPagingProperties class. - /// - /// Describes the type. could be 'None', - /// 'PageToken', 'PageCount', 'TimeStamp' - /// Defines the name of a next page - /// attribute - /// Defines the path to a next page - /// token JSON - /// Defines the path to a page - /// count attribute - /// Defines the path to a - /// page total count attribute - /// Defines the path to a - /// paging time stamp attribute - /// Determines - /// whether to search for the latest time stamp in the events - /// list - /// Defines the name of the page size - /// parameter - /// Defines the paging size - public CodelessConnectorPollingPagingProperties(string pagingType, string nextPageParaName = default(string), string nextPageTokenJsonPath = default(string), string pageCountAttributePath = default(string), string pageTotalCountAttributePath = default(string), string pageTimeStampAttributePath = default(string), string searchTheLatestTimeStampFromEventsList = default(string), string pageSizeParaName = default(string), int? pageSize = default(int?)) - { - PagingType = pagingType; - NextPageParaName = nextPageParaName; - NextPageTokenJsonPath = nextPageTokenJsonPath; - PageCountAttributePath = pageCountAttributePath; - PageTotalCountAttributePath = pageTotalCountAttributePath; - PageTimeStampAttributePath = pageTimeStampAttributePath; - SearchTheLatestTimeStampFromEventsList = searchTheLatestTimeStampFromEventsList; - PageSizeParaName = pageSizeParaName; - PageSize = pageSize; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets describes the type. could be 'None', 'PageToken', - /// 'PageCount', 'TimeStamp' - /// - [JsonProperty(PropertyName = "pagingType")] - public string PagingType { get; set; } - - /// - /// Gets or sets defines the name of a next page attribute - /// - [JsonProperty(PropertyName = "nextPageParaName")] - public string NextPageParaName { get; set; } - - /// - /// Gets or sets defines the path to a next page token JSON - /// - [JsonProperty(PropertyName = "nextPageTokenJsonPath")] - public string NextPageTokenJsonPath { get; set; } - - /// - /// Gets or sets defines the path to a page count attribute - /// - [JsonProperty(PropertyName = "pageCountAttributePath")] - public string PageCountAttributePath { get; set; } - - /// - /// Gets or sets defines the path to a page total count attribute - /// - [JsonProperty(PropertyName = "pageTotalCountAttributePath")] - public string PageTotalCountAttributePath { get; set; } - - /// - /// Gets or sets defines the path to a paging time stamp attribute - /// - [JsonProperty(PropertyName = "pageTimeStampAttributePath")] - public string PageTimeStampAttributePath { get; set; } - - /// - /// Gets or sets determines whether to search for the latest time stamp - /// in the events list - /// - [JsonProperty(PropertyName = "searchTheLatestTimeStampFromEventsList")] - public string SearchTheLatestTimeStampFromEventsList { get; set; } - - /// - /// Gets or sets defines the name of the page size parameter - /// - [JsonProperty(PropertyName = "pageSizeParaName")] - public string PageSizeParaName { get; set; } - - /// - /// Gets or sets defines the paging size - /// - [JsonProperty(PropertyName = "pageSize")] - public int? PageSize { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (PagingType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "PagingType"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.cs deleted file mode 100644 index 3f3860246f4c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describe the request properties needed to successfully pull from the - /// server - /// - public partial class CodelessConnectorPollingRequestProperties - { - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingRequestProperties class. - /// - public CodelessConnectorPollingRequestProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingRequestProperties class. - /// - /// Describe the endpoint we should pull the - /// data from - /// The window interval we will use the - /// pull the data - /// The http method type we will use in the - /// poll request, GET or POST - /// The time format will be used the - /// query events in a specific window - /// Defines the rate limit QPS - /// Describe the amount of time we should try - /// and poll the data in case of failure - /// The number of seconds we will - /// consider as a request timeout - /// Describe the headers sent in the poll - /// request - /// Describe the query parameters sent in - /// the poll request - /// For advanced scenarios for - /// example user name/password embedded in nested JSON payload - /// This will be used the query - /// events from a start of the time window - /// This will be used the query - /// events from the end of the time window - public CodelessConnectorPollingRequestProperties(string apiEndpoint, int queryWindowInMin, string httpMethod, string queryTimeFormat, int? rateLimitQps = default(int?), int? retryCount = default(int?), int? timeoutInSeconds = default(int?), object headers = default(object), object queryParameters = default(object), string queryParametersTemplate = default(string), string startTimeAttributeName = default(string), string endTimeAttributeName = default(string)) - { - ApiEndpoint = apiEndpoint; - RateLimitQps = rateLimitQps; - QueryWindowInMin = queryWindowInMin; - HttpMethod = httpMethod; - QueryTimeFormat = queryTimeFormat; - RetryCount = retryCount; - TimeoutInSeconds = timeoutInSeconds; - Headers = headers; - QueryParameters = queryParameters; - QueryParametersTemplate = queryParametersTemplate; - StartTimeAttributeName = startTimeAttributeName; - EndTimeAttributeName = endTimeAttributeName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets describe the endpoint we should pull the data from - /// - [JsonProperty(PropertyName = "apiEndpoint")] - public string ApiEndpoint { get; set; } - - /// - /// Gets or sets defines the rate limit QPS - /// - [JsonProperty(PropertyName = "rateLimitQps")] - public int? RateLimitQps { get; set; } - - /// - /// Gets or sets the window interval we will use the pull the data - /// - [JsonProperty(PropertyName = "queryWindowInMin")] - public int QueryWindowInMin { get; set; } - - /// - /// Gets or sets the http method type we will use in the poll request, - /// GET or POST - /// - [JsonProperty(PropertyName = "httpMethod")] - public string HttpMethod { get; set; } - - /// - /// Gets or sets the time format will be used the query events in a - /// specific window - /// - [JsonProperty(PropertyName = "queryTimeFormat")] - public string QueryTimeFormat { get; set; } - - /// - /// Gets or sets describe the amount of time we should try and poll the - /// data in case of failure - /// - [JsonProperty(PropertyName = "retryCount")] - public int? RetryCount { get; set; } - - /// - /// Gets or sets the number of seconds we will consider as a request - /// timeout - /// - [JsonProperty(PropertyName = "timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } - - /// - /// Gets or sets describe the headers sent in the poll request - /// - [JsonProperty(PropertyName = "headers")] - public object Headers { get; set; } - - /// - /// Gets or sets describe the query parameters sent in the poll request - /// - [JsonProperty(PropertyName = "queryParameters")] - public object QueryParameters { get; set; } - - /// - /// Gets or sets for advanced scenarios for example user name/password - /// embedded in nested JSON payload - /// - [JsonProperty(PropertyName = "queryParametersTemplate")] - public string QueryParametersTemplate { get; set; } - - /// - /// Gets or sets this will be used the query events from a start of the - /// time window - /// - [JsonProperty(PropertyName = "startTimeAttributeName")] - public string StartTimeAttributeName { get; set; } - - /// - /// Gets or sets this will be used the query events from the end of the - /// time window - /// - [JsonProperty(PropertyName = "endTimeAttributeName")] - public string EndTimeAttributeName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ApiEndpoint == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ApiEndpoint"); - } - if (HttpMethod == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "HttpMethod"); - } - if (QueryTimeFormat == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "QueryTimeFormat"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.cs deleted file mode 100644 index a319eac6737f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the response from the external server - /// - public partial class CodelessConnectorPollingResponseProperties - { - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingResponseProperties class. - /// - public CodelessConnectorPollingResponseProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessConnectorPollingResponseProperties class. - /// - /// Describes the path we should extract - /// the data in the response - /// Describes the path we should - /// extract the status code in the response - /// Describes the path we should - /// extract the status value in the response - /// Describes if the data in the - /// response is Gzip - public CodelessConnectorPollingResponseProperties(IList eventsJsonPaths, string successStatusJsonPath = default(string), string successStatusValue = default(string), bool? isGzipCompressed = default(bool?)) - { - EventsJsonPaths = eventsJsonPaths; - SuccessStatusJsonPath = successStatusJsonPath; - SuccessStatusValue = successStatusValue; - IsGzipCompressed = isGzipCompressed; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets describes the path we should extract the data in the - /// response - /// - [JsonProperty(PropertyName = "eventsJsonPaths")] - public IList EventsJsonPaths { get; set; } - - /// - /// Gets or sets describes the path we should extract the status code - /// in the response - /// - [JsonProperty(PropertyName = "successStatusJsonPath")] - public string SuccessStatusJsonPath { get; set; } - - /// - /// Gets or sets describes the path we should extract the status value - /// in the response - /// - [JsonProperty(PropertyName = "successStatusValue")] - public string SuccessStatusValue { get; set; } - - /// - /// Gets or sets describes if the data in the response is Gzip - /// - [JsonProperty(PropertyName = "isGzipCompressed")] - public bool? IsGzipCompressed { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (EventsJsonPaths == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "EventsJsonPaths"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.cs deleted file mode 100644 index 39c3032f73c8..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.cs +++ /dev/null @@ -1,208 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Config to describe the instructions blade - /// - public partial class CodelessUiConnectorConfigProperties - { - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigProperties class. - /// - public CodelessUiConnectorConfigProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigProperties class. - /// - /// Connector blade title - /// Connector publisher name - /// Connector description - /// Name of the table the connector - /// will insert the data to - /// The graph query to show the current data - /// status - /// The sample queries for the - /// connector - /// Data types to check for last data - /// received - /// Define the way the connector - /// check connectivity - /// Connector Availability Status - /// Permissions required for the - /// connector - /// Instruction steps to enable the - /// connector - /// An optional custom image to be used when - /// displaying the connector within Azure Sentinel's connector's - /// gallery - public CodelessUiConnectorConfigProperties(string title, string publisher, string descriptionMarkdown, string graphQueriesTableName, IList graphQueries, IList sampleQueries, IList dataTypes, IList connectivityCriteria, Availability availability, Permissions permissions, IList instructionSteps, string customImage = default(string)) - { - Title = title; - Publisher = publisher; - DescriptionMarkdown = descriptionMarkdown; - CustomImage = customImage; - GraphQueriesTableName = graphQueriesTableName; - GraphQueries = graphQueries; - SampleQueries = sampleQueries; - DataTypes = dataTypes; - ConnectivityCriteria = connectivityCriteria; - Availability = availability; - Permissions = permissions; - InstructionSteps = instructionSteps; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets connector blade title - /// - [JsonProperty(PropertyName = "title")] - public string Title { get; set; } - - /// - /// Gets or sets connector publisher name - /// - [JsonProperty(PropertyName = "publisher")] - public string Publisher { get; set; } - - /// - /// Gets or sets connector description - /// - [JsonProperty(PropertyName = "descriptionMarkdown")] - public string DescriptionMarkdown { get; set; } - - /// - /// Gets or sets an optional custom image to be used when displaying - /// the connector within Azure Sentinel's connector's gallery - /// - [JsonProperty(PropertyName = "customImage")] - public string CustomImage { get; set; } - - /// - /// Gets or sets name of the table the connector will insert the data - /// to - /// - [JsonProperty(PropertyName = "graphQueriesTableName")] - public string GraphQueriesTableName { get; set; } - - /// - /// Gets or sets the graph query to show the current data status - /// - [JsonProperty(PropertyName = "graphQueries")] - public IList GraphQueries { get; set; } - - /// - /// Gets or sets the sample queries for the connector - /// - [JsonProperty(PropertyName = "sampleQueries")] - public IList SampleQueries { get; set; } - - /// - /// Gets or sets data types to check for last data received - /// - [JsonProperty(PropertyName = "dataTypes")] - public IList DataTypes { get; set; } - - /// - /// Gets or sets define the way the connector check connectivity - /// - [JsonProperty(PropertyName = "connectivityCriteria")] - public IList ConnectivityCriteria { get; set; } - - /// - /// Gets or sets connector Availability Status - /// - [JsonProperty(PropertyName = "availability")] - public Availability Availability { get; set; } - - /// - /// Gets or sets permissions required for the connector - /// - [JsonProperty(PropertyName = "permissions")] - public Permissions Permissions { get; set; } - - /// - /// Gets or sets instruction steps to enable the connector - /// - [JsonProperty(PropertyName = "instructionSteps")] - public IList InstructionSteps { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Title == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Title"); - } - if (Publisher == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Publisher"); - } - if (DescriptionMarkdown == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DescriptionMarkdown"); - } - if (GraphQueriesTableName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "GraphQueriesTableName"); - } - if (GraphQueries == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "GraphQueries"); - } - if (SampleQueries == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SampleQueries"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (ConnectivityCriteria == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ConnectivityCriteria"); - } - if (Availability == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Availability"); - } - if (Permissions == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Permissions"); - } - if (InstructionSteps == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "InstructionSteps"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.cs deleted file mode 100644 index 896db48d07f0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem : ConnectivityCriteria - { - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem class. - /// - public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem class. - /// - /// type of connectivity. Possible values include: - /// 'IsConnectedQuery' - /// Queries for checking connectivity - public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem(string type = default(string), IList value = default(IList)) - : base(type, value) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesDataTypesItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesDataTypesItem.cs deleted file mode 100644 index 17ae57788645..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesDataTypesItem.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - public partial class CodelessUiConnectorConfigPropertiesDataTypesItem : LastDataReceivedDataType - { - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesDataTypesItem class. - /// - public CodelessUiConnectorConfigPropertiesDataTypesItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesDataTypesItem class. - /// - /// Name of the data type to show in the graph. can - /// be use with {{graphQueriesTableName}} placeholder - /// Query for indicate last data - /// received - public CodelessUiConnectorConfigPropertiesDataTypesItem(string name = default(string), string lastDataReceivedQuery = default(string)) - : base(name, lastDataReceivedQuery) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.cs deleted file mode 100644 index 0f533610c63c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - public partial class CodelessUiConnectorConfigPropertiesGraphQueriesItem : GraphQueries - { - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesGraphQueriesItem class. - /// - public CodelessUiConnectorConfigPropertiesGraphQueriesItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesGraphQueriesItem class. - /// - /// the metric that the query is - /// checking - /// The legend for the graph - /// The base query for the graph - public CodelessUiConnectorConfigPropertiesGraphQueriesItem(string metricName = default(string), string legend = default(string), string baseQuery = default(string)) - : base(metricName, legend, baseQuery) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.cs deleted file mode 100644 index 8344fd179590..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class CodelessUiConnectorConfigPropertiesInstructionStepsItem : InstructionSteps - { - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesInstructionStepsItem class. - /// - public CodelessUiConnectorConfigPropertiesInstructionStepsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesInstructionStepsItem class. - /// - /// Instruction step title - /// Instruction step description - /// Instruction step details - public CodelessUiConnectorConfigPropertiesInstructionStepsItem(string title = default(string), string description = default(string), IList instructions = default(IList)) - : base(title, description, instructions) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.cs deleted file mode 100644 index 3c41833cdc01..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - public partial class CodelessUiConnectorConfigPropertiesSampleQueriesItem : SampleQueries - { - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesSampleQueriesItem class. - /// - public CodelessUiConnectorConfigPropertiesSampleQueriesItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CodelessUiConnectorConfigPropertiesSampleQueriesItem class. - /// - /// The sample query description - /// the sample query - public CodelessUiConnectorConfigPropertiesSampleQueriesItem(string description = default(string), string query = default(string)) - : base(description, query) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.cs deleted file mode 100644 index 322e5adea866..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Codeless UI data connector. - /// - [Newtonsoft.Json.JsonObject("GenericUI")] - [Rest.Serialization.JsonTransformation] - public partial class CodelessUiDataConnector : DataConnector - { - /// - /// Initializes a new instance of the CodelessUiDataConnector class. - /// - public CodelessUiDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CodelessUiDataConnector class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Config to describe the instructions - /// blade - public CodelessUiDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), CodelessUiConnectorConfigProperties connectorUiConfig = default(CodelessUiConnectorConfigProperties)) - : base(id, name, type, systemData, etag) - { - ConnectorUiConfig = connectorUiConfig; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets config to describe the instructions blade - /// - [JsonProperty(PropertyName = "properties.connectorUiConfig")] - public CodelessUiConnectorConfigProperties ConnectorUiConfig { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ConnectorUiConfig != null) - { - ConnectorUiConfig.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs index 48cf53f0bb52..379c7f55bd6e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs @@ -20,5 +20,13 @@ public static class ConditionType /// Evaluate an object property value /// public const string Property = "Property"; + /// + /// Evaluate an object property changed value + /// + public const string PropertyChanged = "PropertyChanged"; + /// + /// Evaluate an object array property changed value + /// + public const string PropertyArrayChanged = "PropertyArrayChanged"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectAuthKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectAuthKind.cs deleted file mode 100644 index cd386e546aff..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectAuthKind.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for ConnectAuthKind. - /// - public static class ConnectAuthKind - { - public const string Basic = "Basic"; - public const string OAuth2 = "OAuth2"; - public const string APIKey = "APIKey"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectedEntity.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectedEntity.cs deleted file mode 100644 index 95b71f80e37a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectedEntity.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Expansion result connected entities - /// - public partial class ConnectedEntity - { - /// - /// Initializes a new instance of the ConnectedEntity class. - /// - public ConnectedEntity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ConnectedEntity class. - /// - /// Entity Id of the connected - /// entity - /// key-value pairs for a connected entity - /// mapping - public ConnectedEntity(string targetEntityId = default(string), object additionalData = default(object)) - { - TargetEntityId = targetEntityId; - AdditionalData = additionalData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets entity Id of the connected entity - /// - [JsonProperty(PropertyName = "targetEntityId")] - public string TargetEntityId { get; set; } - - /// - /// Gets or sets key-value pairs for a connected entity mapping - /// - [JsonProperty(PropertyName = "additionalData")] - public object AdditionalData { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityCriteria.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityCriteria.cs deleted file mode 100644 index 1d906edbff87..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityCriteria.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Setting for the connector check connectivity - /// - public partial class ConnectivityCriteria - { - /// - /// Initializes a new instance of the ConnectivityCriteria class. - /// - public ConnectivityCriteria() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ConnectivityCriteria class. - /// - /// type of connectivity. Possible values include: - /// 'IsConnectedQuery' - /// Queries for checking connectivity - public ConnectivityCriteria(string type = default(string), IList value = default(IList)) - { - Type = type; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets type of connectivity. Possible values include: - /// 'IsConnectedQuery' - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets queries for checking connectivity - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityType.cs deleted file mode 100644 index 8b5d84f0479f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectivityType.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for ConnectivityType. - /// - public static class ConnectivityType - { - public const string IsConnectedQuery = "IsConnectedQuery"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.cs deleted file mode 100644 index 00f58006eec1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Instruction step details - /// - public partial class ConnectorInstructionModelBase - { - /// - /// Initializes a new instance of the ConnectorInstructionModelBase - /// class. - /// - public ConnectorInstructionModelBase() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ConnectorInstructionModelBase - /// class. - /// - /// The kind of the setting. Possible values - /// include: 'CopyableLabel', 'InstructionStepsGroup', - /// 'InfoMessage' - /// The parameters for the setting - public ConnectorInstructionModelBase(string type, object parameters = default(object)) - { - Parameters = parameters; - Type = type; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the parameters for the setting - /// - [JsonProperty(PropertyName = "parameters")] - public object Parameters { get; set; } - - /// - /// Gets or sets the kind of the setting. Possible values include: - /// 'CopyableLabel', 'InstructionStepsGroup', 'InfoMessage' - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Type == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Type"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentPathMap.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentPathMap.cs deleted file mode 100644 index 2582dea1203b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentPathMap.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The mapping of content type to a repo path. - /// - public partial class ContentPathMap - { - /// - /// Initializes a new instance of the ContentPathMap class. - /// - public ContentPathMap() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContentPathMap class. - /// - /// Content type. Possible values include: - /// 'AnalyticRule', 'Workbook' - /// The path to the content. - public ContentPathMap(string contentType = default(string), string path = default(string)) - { - ContentType = contentType; - Path = path; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets content type. Possible values include: 'AnalyticRule', - /// 'Workbook' - /// - [JsonProperty(PropertyName = "contentType")] - public string ContentType { get; set; } - - /// - /// Gets or sets the path to the content. - /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentType.cs deleted file mode 100644 index d8b28b7c6b7f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ContentType.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for ContentType. - /// - public static class ContentType - { - public const string AnalyticRule = "AnalyticRule"; - public const string Workbook = "Workbook"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQuery.cs deleted file mode 100644 index f7749fa7514b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomEntityQuery.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Specific entity query that supports put requests. - /// - public partial class CustomEntityQuery : ResourceWithEtag - { - /// - /// Initializes a new instance of the CustomEntityQuery class. - /// - public CustomEntityQuery() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CustomEntityQuery class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public CustomEntityQuery(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Customs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Customs.cs deleted file mode 100644 index fb60cd116889..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Customs.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Customs permissions required for the connector - /// - public partial class Customs : CustomsPermission - { - /// - /// Initializes a new instance of the Customs class. - /// - public Customs() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Customs class. - /// - /// Customs permissions name - /// Customs permissions description - public Customs(string name = default(string), string description = default(string)) - : base(name, description) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomsPermission.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomsPermission.cs deleted file mode 100644 index 6d503f1cf0c3..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/CustomsPermission.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Customs permissions required for the connector - /// - public partial class CustomsPermission - { - /// - /// Initializes a new instance of the CustomsPermission class. - /// - public CustomsPermission() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CustomsPermission class. - /// - /// Customs permissions name - /// Customs permissions description - public CustomsPermission(string name = default(string), string description = default(string)) - { - Name = name; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets customs permissions name - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets customs permissions description - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnector.cs index c6aeaefdb1a4..c1a0ce290d2b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnector.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Data connector + /// Data connector. /// public partial class DataConnector : ResourceWithEtag { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorAuthorizationState.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorAuthorizationState.cs deleted file mode 100644 index 2a43f735cd07..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorAuthorizationState.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for DataConnectorAuthorizationState. - /// - public static class DataConnectorAuthorizationState - { - public const string Valid = "Valid"; - public const string Invalid = "Invalid"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorConnectBody.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorConnectBody.cs deleted file mode 100644 index a188ff4b082c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorConnectBody.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Codeless API Polling data connector. - /// - public partial class DataConnectorConnectBody - { - /// - /// Initializes a new instance of the DataConnectorConnectBody class. - /// - public DataConnectorConnectBody() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataConnectorConnectBody class. - /// - /// The authentication kind used to poll the data. - /// Possible values include: 'Basic', 'OAuth2', 'APIKey' - /// The API key of the audit server. - /// The client secret of the OAuth 2.0 - /// application. - /// The client id of the OAuth 2.0 - /// application. - /// The authorization code used in - /// OAuth 2.0 code flow to issue a token. - /// The user name in the audit log - /// server. - /// The user password in the audit log - /// server. - public DataConnectorConnectBody(string kind = default(string), string apiKey = default(string), string clientSecret = default(string), string clientId = default(string), string authorizationCode = default(string), string userName = default(string), string password = default(string), IList requestConfigUserInputValues = default(IList)) - { - Kind = kind; - ApiKey = apiKey; - ClientSecret = clientSecret; - ClientId = clientId; - AuthorizationCode = authorizationCode; - UserName = userName; - Password = password; - RequestConfigUserInputValues = requestConfigUserInputValues; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the authentication kind used to poll the data. - /// Possible values include: 'Basic', 'OAuth2', 'APIKey' - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets or sets the API key of the audit server. - /// - [JsonProperty(PropertyName = "apiKey")] - public string ApiKey { get; set; } - - /// - /// Gets or sets the client secret of the OAuth 2.0 application. - /// - [JsonProperty(PropertyName = "clientSecret")] - public string ClientSecret { get; set; } - - /// - /// Gets or sets the client id of the OAuth 2.0 application. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the authorization code used in OAuth 2.0 code flow to - /// issue a token. - /// - [JsonProperty(PropertyName = "authorizationCode")] - public string AuthorizationCode { get; set; } - - /// - /// Gets or sets the user name in the audit log server. - /// - [JsonProperty(PropertyName = "userName")] - public string UserName { get; set; } - - /// - /// Gets or sets the user password in the audit log server. - /// - [JsonProperty(PropertyName = "password")] - public string Password { get; set; } - - /// - /// - [JsonProperty(PropertyName = "requestConfigUserInputValues")] - public IList RequestConfigUserInputValues { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.cs index b02c3130bd20..322fd804d6c7 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -35,7 +34,7 @@ public DataConnectorDataTypeCommon() /// Describe whether this data type connection is /// enabled or not. Possible values include: 'Enabled', /// 'Disabled' - public DataConnectorDataTypeCommon(string state) + public DataConnectorDataTypeCommon(string state = default(string)) { State = state; CustomInit(); @@ -53,18 +52,5 @@ public DataConnectorDataTypeCommon(string state) [JsonProperty(PropertyName = "state")] public string State { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (State == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "State"); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs index baf20cc0f17b..6db67ec03c55 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs @@ -20,21 +20,9 @@ public static class DataConnectorKind public const string AzureSecurityCenter = "AzureSecurityCenter"; public const string MicrosoftCloudAppSecurity = "MicrosoftCloudAppSecurity"; public const string ThreatIntelligence = "ThreatIntelligence"; - public const string ThreatIntelligenceTaxii = "ThreatIntelligenceTaxii"; public const string Office365 = "Office365"; - public const string OfficeATP = "OfficeATP"; - public const string OfficeIRM = "OfficeIRM"; - public const string Office365Project = "Office365Project"; - public const string OfficePowerBI = "OfficePowerBI"; public const string AmazonWebServicesCloudTrail = "AmazonWebServicesCloudTrail"; - public const string AmazonWebServicesS3 = "AmazonWebServicesS3"; public const string AzureAdvancedThreatProtection = "AzureAdvancedThreatProtection"; public const string MicrosoftDefenderAdvancedThreatProtection = "MicrosoftDefenderAdvancedThreatProtection"; - public const string Dynamics365 = "Dynamics365"; - public const string MicrosoftThreatProtection = "MicrosoftThreatProtection"; - public const string MicrosoftThreatIntelligence = "MicrosoftThreatIntelligence"; - public const string GenericUI = "GenericUI"; - public const string APIPolling = "APIPolling"; - public const string IOT = "IOT"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorLicenseState.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorLicenseState.cs deleted file mode 100644 index 231fab963a02..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorLicenseState.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for DataConnectorLicenseState. - /// - public static class DataConnectorLicenseState - { - public const string Valid = "Valid"; - public const string Invalid = "Invalid"; - public const string Unknown = "Unknown"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.cs deleted file mode 100644 index a213cdd5427e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Data connector requirements status. - /// - public partial class DataConnectorRequirementsState - { - /// - /// Initializes a new instance of the DataConnectorRequirementsState - /// class. - /// - public DataConnectorRequirementsState() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataConnectorRequirementsState - /// class. - /// - /// Authorization state for this - /// connector. Possible values include: 'Valid', 'Invalid' - /// License state for this connector. - /// Possible values include: 'Valid', 'Invalid', 'Unknown' - public DataConnectorRequirementsState(string authorizationState = default(string), string licenseState = default(string)) - { - AuthorizationState = authorizationState; - LicenseState = licenseState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets authorization state for this connector. Possible - /// values include: 'Valid', 'Invalid' - /// - [JsonProperty(PropertyName = "authorizationState")] - public string AuthorizationState { get; set; } - - /// - /// Gets or sets license state for this connector. Possible values - /// include: 'Valid', 'Invalid', 'Unknown' - /// - [JsonProperty(PropertyName = "licenseState")] - public string LicenseState { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorTenantId.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorTenantId.cs index 05f76fd6c767..58c3b3457f4c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorTenantId.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorTenantId.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -32,7 +31,7 @@ public DataConnectorTenantId() /// /// The tenant id to connect to, and get the /// data from. - public DataConnectorTenantId(string tenantId) + public DataConnectorTenantId(string tenantId = default(string)) { TenantId = tenantId; CustomInit(); @@ -49,18 +48,5 @@ public DataConnectorTenantId(string tenantId) [JsonProperty(PropertyName = "tenantId")] public string TenantId { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorWithAlertsProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorWithAlertsProperties.cs index 513a9a2f07fe..b11f7fa33d1b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorWithAlertsProperties.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorWithAlertsProperties.cs @@ -50,18 +50,5 @@ public DataConnectorWithAlertsProperties() [JsonProperty(PropertyName = "dataTypes")] public AlertsDataTypeOfDataConnector DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.cs deleted file mode 100644 index 9adbf44a09a9..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Data connector requirements properties. - /// - public partial class DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the DataConnectorsCheckRequirements - /// class. - /// - public DataConnectorsCheckRequirements() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataTypeDefinitions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataTypeDefinitions.cs deleted file mode 100644 index 39588a7f5217..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataTypeDefinitions.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The data type definition - /// - public partial class DataTypeDefinitions - { - /// - /// Initializes a new instance of the DataTypeDefinitions class. - /// - public DataTypeDefinitions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataTypeDefinitions class. - /// - /// The data type name - public DataTypeDefinitions(string dataType = default(string)) - { - DataType = dataType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the data type name - /// - [JsonProperty(PropertyName = "dataType")] - public string DataType { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs deleted file mode 100644 index a01c72b9585f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Description about a deployment. - /// - public partial class Deployment - { - /// - /// Initializes a new instance of the Deployment class. - /// - public Deployment() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Deployment class. - /// - /// Deployment identifier. - /// Current status of the deployment. - /// Possible values include: 'In_Progress', 'Completed', 'Queued', - /// 'Canceling' - /// The outcome of the deployment. - /// Possible values include: 'Success', 'Canceled', 'Failed' - /// The time when the deployment - /// finished. - /// Url to access repository action - /// logs. - public Deployment(string deploymentId = default(string), string deploymentState = default(string), string deploymentResult = default(string), System.DateTime? deploymentTime = default(System.DateTime?), string deploymentLogsUrl = default(string)) - { - DeploymentId = deploymentId; - DeploymentState = deploymentState; - DeploymentResult = deploymentResult; - DeploymentTime = deploymentTime; - DeploymentLogsUrl = deploymentLogsUrl; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets deployment identifier. - /// - [JsonProperty(PropertyName = "deploymentId")] - public string DeploymentId { get; set; } - - /// - /// Gets or sets current status of the deployment. Possible values - /// include: 'In_Progress', 'Completed', 'Queued', 'Canceling' - /// - [JsonProperty(PropertyName = "deploymentState")] - public string DeploymentState { get; set; } - - /// - /// Gets or sets the outcome of the deployment. Possible values - /// include: 'Success', 'Canceled', 'Failed' - /// - [JsonProperty(PropertyName = "deploymentResult")] - public string DeploymentResult { get; set; } - - /// - /// Gets or sets the time when the deployment finished. - /// - [JsonProperty(PropertyName = "deploymentTime")] - public System.DateTime? DeploymentTime { get; set; } - - /// - /// Gets or sets url to access repository action logs. - /// - [JsonProperty(PropertyName = "deploymentLogsUrl")] - public string DeploymentLogsUrl { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs deleted file mode 100644 index 53aa96e59130..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for DeploymentFetchStatus. - /// - public static class DeploymentFetchStatus - { - public const string Success = "Success"; - public const string Unauthorized = "Unauthorized"; - public const string NotFound = "NotFound"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs deleted file mode 100644 index aa8fdee35728..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Information regarding a deployment. - /// - public partial class DeploymentInfo - { - /// - /// Initializes a new instance of the DeploymentInfo class. - /// - public DeploymentInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentInfo class. - /// - /// Status while fetching the last - /// deployment. Possible values include: 'Success', 'Unauthorized', - /// 'NotFound' - /// Deployment information. - /// Additional details about the deployment that - /// can be shown to the user. - public DeploymentInfo(string deploymentFetchStatus = default(string), Deployment deployment = default(Deployment), string message = default(string)) - { - DeploymentFetchStatus = deploymentFetchStatus; - Deployment = deployment; - Message = message; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets status while fetching the last deployment. Possible - /// values include: 'Success', 'Unauthorized', 'NotFound' - /// - [JsonProperty(PropertyName = "deploymentFetchStatus")] - public string DeploymentFetchStatus { get; set; } - - /// - /// Gets or sets deployment information. - /// - [JsonProperty(PropertyName = "deployment")] - public Deployment Deployment { get; set; } - - /// - /// Gets or sets additional details about the deployment that can be - /// shown to the user. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs deleted file mode 100644 index 9e44cbf65b6f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for DeploymentResult. - /// - public static class DeploymentResult - { - public const string Success = "Success"; - public const string Canceled = "Canceled"; - public const string Failed = "Failed"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs deleted file mode 100644 index bbefb06b6e3f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for DeploymentState. - /// - public static class DeploymentState - { - public const string InProgress = "In_Progress"; - public const string Completed = "Completed"; - public const string Queued = "Queued"; - public const string Canceling = "Canceling"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.cs deleted file mode 100644 index e067d340ba9f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Dynamics365 requirements check request. - /// - [Newtonsoft.Json.JsonObject("Dynamics365")] - [Rest.Serialization.JsonTransformation] - public partial class Dynamics365CheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the Dynamics365CheckRequirements - /// class. - /// - public Dynamics365CheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Dynamics365CheckRequirements - /// class. - /// - /// The tenant id to connect to, and get the - /// data from. - public Dynamics365CheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.cs deleted file mode 100644 index ff5abeb191b8..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Dynamics365 data connector. - /// - [Newtonsoft.Json.JsonObject("Dynamics365")] - [Rest.Serialization.JsonTransformation] - public partial class Dynamics365DataConnector : DataConnector - { - /// - /// Initializes a new instance of the Dynamics365DataConnector class. - /// - public Dynamics365DataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Dynamics365DataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public Dynamics365DataConnector(string tenantId, Dynamics365DataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public Dynamics365DataConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypes.cs deleted file mode 100644 index 53ae1aa5485c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypes.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Dynamics365 data connector. - /// - public partial class Dynamics365DataConnectorDataTypes - { - /// - /// Initializes a new instance of the Dynamics365DataConnectorDataTypes - /// class. - /// - public Dynamics365DataConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Dynamics365DataConnectorDataTypes - /// class. - /// - /// Common Data Service data - /// type connection. - public Dynamics365DataConnectorDataTypes(Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities) - { - Dynamics365CdsActivities = dynamics365CdsActivities; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets common Data Service data type connection. - /// - [JsonProperty(PropertyName = "dynamics365CdsActivities")] - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities Dynamics365CdsActivities { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Dynamics365CdsActivities == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Dynamics365CdsActivities"); - } - if (Dynamics365CdsActivities != null) - { - Dynamics365CdsActivities.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.cs deleted file mode 100644 index 1117fd13efe5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Common Data Service data type connection. - /// - public partial class Dynamics365DataConnectorDataTypesDynamics365CdsActivities : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// Dynamics365DataConnectorDataTypesDynamics365CdsActivities class. - /// - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// Dynamics365DataConnectorDataTypesDynamics365CdsActivities class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities(string state) - : base(state) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.cs deleted file mode 100644 index 3e8d2afcd571..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Whois information for a given domain and associated metadata - /// - public partial class EnrichmentDomainWhois - { - /// - /// Initializes a new instance of the EnrichmentDomainWhois class. - /// - public EnrichmentDomainWhois() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnrichmentDomainWhois class. - /// - /// The domain for this whois record - /// The hostname of this registrar's whois - /// server - /// The timestamp at which this record was - /// created - /// The timestamp at which this record was last - /// updated - /// The timestamp at which this record will - /// expire - /// The whois record for a given - /// domain - public EnrichmentDomainWhois(string domain = default(string), string server = default(string), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), System.DateTime? expires = default(System.DateTime?), EnrichmentDomainWhoisDetails parsedWhois = default(EnrichmentDomainWhoisDetails)) - { - Domain = domain; - Server = server; - Created = created; - Updated = updated; - Expires = expires; - ParsedWhois = parsedWhois; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the domain for this whois record - /// - [JsonProperty(PropertyName = "domain")] - public string Domain { get; set; } - - /// - /// Gets or sets the hostname of this registrar's whois server - /// - [JsonProperty(PropertyName = "server")] - public string Server { get; set; } - - /// - /// Gets or sets the timestamp at which this record was created - /// - [JsonProperty(PropertyName = "created")] - public System.DateTime? Created { get; set; } - - /// - /// Gets or sets the timestamp at which this record was last updated - /// - [JsonProperty(PropertyName = "updated")] - public System.DateTime? Updated { get; set; } - - /// - /// Gets or sets the timestamp at which this record will expire - /// - [JsonProperty(PropertyName = "expires")] - public System.DateTime? Expires { get; set; } - - /// - /// Gets or sets the whois record for a given domain - /// - [JsonProperty(PropertyName = "parsedWhois")] - public EnrichmentDomainWhoisDetails ParsedWhois { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.cs deleted file mode 100644 index f587afdd61a9..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// An individual contact associated with this domain - /// - public partial class EnrichmentDomainWhoisContact - { - /// - /// Initializes a new instance of the EnrichmentDomainWhoisContact - /// class. - /// - public EnrichmentDomainWhoisContact() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnrichmentDomainWhoisContact - /// class. - /// - /// The name of this contact - /// The organization for this contact - /// A list describing the street address for this - /// contact - /// The city for this contact - /// The state for this contact - /// The postal code for this contact - /// The country for this contact - /// The phone number for this contact - /// The fax number for this contact - /// The email address for this contact - public EnrichmentDomainWhoisContact(string name = default(string), string org = default(string), IList street = default(IList), string city = default(string), string state = default(string), string postal = default(string), string country = default(string), string phone = default(string), string fax = default(string), string email = default(string)) - { - Name = name; - Org = org; - Street = street; - City = city; - State = state; - Postal = postal; - Country = country; - Phone = phone; - Fax = fax; - Email = email; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of this contact - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the organization for this contact - /// - [JsonProperty(PropertyName = "org")] - public string Org { get; set; } - - /// - /// Gets or sets a list describing the street address for this contact - /// - [JsonProperty(PropertyName = "street")] - public IList Street { get; set; } - - /// - /// Gets or sets the city for this contact - /// - [JsonProperty(PropertyName = "city")] - public string City { get; set; } - - /// - /// Gets or sets the state for this contact - /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - - /// - /// Gets or sets the postal code for this contact - /// - [JsonProperty(PropertyName = "postal")] - public string Postal { get; set; } - - /// - /// Gets or sets the country for this contact - /// - [JsonProperty(PropertyName = "country")] - public string Country { get; set; } - - /// - /// Gets or sets the phone number for this contact - /// - [JsonProperty(PropertyName = "phone")] - public string Phone { get; set; } - - /// - /// Gets or sets the fax number for this contact - /// - [JsonProperty(PropertyName = "fax")] - public string Fax { get; set; } - - /// - /// Gets or sets the email address for this contact - /// - [JsonProperty(PropertyName = "email")] - public string Email { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.cs deleted file mode 100644 index 767d155e06b3..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The set of contacts associated with this domain - /// - public partial class EnrichmentDomainWhoisContacts - { - /// - /// Initializes a new instance of the EnrichmentDomainWhoisContacts - /// class. - /// - public EnrichmentDomainWhoisContacts() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnrichmentDomainWhoisContacts - /// class. - /// - /// The admin contact for this whois record - /// The billing contact for this whois - /// record - /// The registrant contact for this whois - /// record - /// The technical contact for this whois - /// record - public EnrichmentDomainWhoisContacts(EnrichmentDomainWhoisContact admin = default(EnrichmentDomainWhoisContact), EnrichmentDomainWhoisContact billing = default(EnrichmentDomainWhoisContact), EnrichmentDomainWhoisContact registrant = default(EnrichmentDomainWhoisContact), EnrichmentDomainWhoisContact tech = default(EnrichmentDomainWhoisContact)) - { - Admin = admin; - Billing = billing; - Registrant = registrant; - Tech = tech; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the admin contact for this whois record - /// - [JsonProperty(PropertyName = "admin")] - public EnrichmentDomainWhoisContact Admin { get; set; } - - /// - /// Gets or sets the billing contact for this whois record - /// - [JsonProperty(PropertyName = "billing")] - public EnrichmentDomainWhoisContact Billing { get; set; } - - /// - /// Gets or sets the registrant contact for this whois record - /// - [JsonProperty(PropertyName = "registrant")] - public EnrichmentDomainWhoisContact Registrant { get; set; } - - /// - /// Gets or sets the technical contact for this whois record - /// - [JsonProperty(PropertyName = "tech")] - public EnrichmentDomainWhoisContact Tech { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.cs deleted file mode 100644 index edb488b43b3a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The whois record for a given domain - /// - public partial class EnrichmentDomainWhoisDetails - { - /// - /// Initializes a new instance of the EnrichmentDomainWhoisDetails - /// class. - /// - public EnrichmentDomainWhoisDetails() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnrichmentDomainWhoisDetails - /// class. - /// - /// The registrar associated with this - /// domain - /// The set of contacts associated with this - /// domain - /// A list of name servers associated with - /// this domain - /// The set of status flags for this whois - /// record - public EnrichmentDomainWhoisDetails(EnrichmentDomainWhoisRegistrarDetails registrar = default(EnrichmentDomainWhoisRegistrarDetails), EnrichmentDomainWhoisContacts contacts = default(EnrichmentDomainWhoisContacts), IList nameServers = default(IList), IList statuses = default(IList)) - { - Registrar = registrar; - Contacts = contacts; - NameServers = nameServers; - Statuses = statuses; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the registrar associated with this domain - /// - [JsonProperty(PropertyName = "registrar")] - public EnrichmentDomainWhoisRegistrarDetails Registrar { get; set; } - - /// - /// Gets or sets the set of contacts associated with this domain - /// - [JsonProperty(PropertyName = "contacts")] - public EnrichmentDomainWhoisContacts Contacts { get; set; } - - /// - /// Gets or sets a list of name servers associated with this domain - /// - [JsonProperty(PropertyName = "nameServers")] - public IList NameServers { get; set; } - - /// - /// Gets or sets the set of status flags for this whois record - /// - [JsonProperty(PropertyName = "statuses")] - public IList Statuses { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.cs deleted file mode 100644 index 54bc98b28674..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The registrar associated with this domain - /// - public partial class EnrichmentDomainWhoisRegistrarDetails - { - /// - /// Initializes a new instance of the - /// EnrichmentDomainWhoisRegistrarDetails class. - /// - public EnrichmentDomainWhoisRegistrarDetails() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// EnrichmentDomainWhoisRegistrarDetails class. - /// - /// The name of this registrar - /// This registrar's abuse contact - /// email - /// This registrar's abuse contact - /// phone number - /// This registrar's Internet Assigned Numbers - /// Authority id - /// This registrar's URL - /// The hostname of this registrar's whois - /// server - public EnrichmentDomainWhoisRegistrarDetails(string name = default(string), string abuseContactEmail = default(string), string abuseContactPhone = default(string), string ianaId = default(string), string url = default(string), string whoisServer = default(string)) - { - Name = name; - AbuseContactEmail = abuseContactEmail; - AbuseContactPhone = abuseContactPhone; - IanaId = ianaId; - Url = url; - WhoisServer = whoisServer; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of this registrar - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets this registrar's abuse contact email - /// - [JsonProperty(PropertyName = "abuseContactEmail")] - public string AbuseContactEmail { get; set; } - - /// - /// Gets or sets this registrar's abuse contact phone number - /// - [JsonProperty(PropertyName = "abuseContactPhone")] - public string AbuseContactPhone { get; set; } - - /// - /// Gets or sets this registrar's Internet Assigned Numbers Authority - /// id - /// - [JsonProperty(PropertyName = "ianaId")] - public string IanaId { get; set; } - - /// - /// Gets or sets this registrar's URL - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } - - /// - /// Gets or sets the hostname of this registrar's whois server - /// - [JsonProperty(PropertyName = "whoisServer")] - public string WhoisServer { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentIpGeodata.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentIpGeodata.cs deleted file mode 100644 index 31266d1fddd1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EnrichmentIpGeodata.cs +++ /dev/null @@ -1,199 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Geodata information for a given IP address - /// - public partial class EnrichmentIpGeodata - { - /// - /// Initializes a new instance of the EnrichmentIpGeodata class. - /// - public EnrichmentIpGeodata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnrichmentIpGeodata class. - /// - /// The autonomous system number associated with this - /// IP address - /// The name of the carrier for this IP - /// address - /// The city this IP address is located in - /// A numeric rating of confidence that the value - /// in the 'city' field is correct, on a scale of 0-100 - /// The continent this IP address is located - /// on - /// The county this IP address is located - /// in - /// A numeric rating of confidence that the - /// value in the 'country' field is correct on a scale of 0-100 - /// The dotted-decimal or colon-separated string - /// representation of the IP address - /// A description of the connection type of - /// this IP address - /// The latitude of this IP address - /// The longitude of this IP address - /// The name of the organization for this IP - /// address - /// The type of the organization for - /// this IP address - /// The geographic region this IP address is - /// located in - /// The state this IP address is located in - /// A numeric rating of confidence that the value - /// in the 'state' field is correct on a scale of 0-100 - /// The abbreviated name for the state this IP - /// address is located in - public EnrichmentIpGeodata(string asn = default(string), string carrier = default(string), string city = default(string), int? cityCf = default(int?), string continent = default(string), string country = default(string), int? countryCf = default(int?), string ipAddr = default(string), string ipRoutingType = default(string), string latitude = default(string), string longitude = default(string), string organization = default(string), string organizationType = default(string), string region = default(string), string state = default(string), int? stateCf = default(int?), string stateCode = default(string)) - { - Asn = asn; - Carrier = carrier; - City = city; - CityCf = cityCf; - Continent = continent; - Country = country; - CountryCf = countryCf; - IpAddr = ipAddr; - IpRoutingType = ipRoutingType; - Latitude = latitude; - Longitude = longitude; - Organization = organization; - OrganizationType = organizationType; - Region = region; - State = state; - StateCf = stateCf; - StateCode = stateCode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the autonomous system number associated with this IP - /// address - /// - [JsonProperty(PropertyName = "asn")] - public string Asn { get; set; } - - /// - /// Gets or sets the name of the carrier for this IP address - /// - [JsonProperty(PropertyName = "carrier")] - public string Carrier { get; set; } - - /// - /// Gets or sets the city this IP address is located in - /// - [JsonProperty(PropertyName = "city")] - public string City { get; set; } - - /// - /// Gets or sets a numeric rating of confidence that the value in the - /// 'city' field is correct, on a scale of 0-100 - /// - [JsonProperty(PropertyName = "cityCf")] - public int? CityCf { get; set; } - - /// - /// Gets or sets the continent this IP address is located on - /// - [JsonProperty(PropertyName = "continent")] - public string Continent { get; set; } - - /// - /// Gets or sets the county this IP address is located in - /// - [JsonProperty(PropertyName = "country")] - public string Country { get; set; } - - /// - /// Gets or sets a numeric rating of confidence that the value in the - /// 'country' field is correct on a scale of 0-100 - /// - [JsonProperty(PropertyName = "countryCf")] - public int? CountryCf { get; set; } - - /// - /// Gets or sets the dotted-decimal or colon-separated string - /// representation of the IP address - /// - [JsonProperty(PropertyName = "ipAddr")] - public string IpAddr { get; set; } - - /// - /// Gets or sets a description of the connection type of this IP - /// address - /// - [JsonProperty(PropertyName = "ipRoutingType")] - public string IpRoutingType { get; set; } - - /// - /// Gets or sets the latitude of this IP address - /// - [JsonProperty(PropertyName = "latitude")] - public string Latitude { get; set; } - - /// - /// Gets or sets the longitude of this IP address - /// - [JsonProperty(PropertyName = "longitude")] - public string Longitude { get; set; } - - /// - /// Gets or sets the name of the organization for this IP address - /// - [JsonProperty(PropertyName = "organization")] - public string Organization { get; set; } - - /// - /// Gets or sets the type of the organization for this IP address - /// - [JsonProperty(PropertyName = "organizationType")] - public string OrganizationType { get; set; } - - /// - /// Gets or sets the geographic region this IP address is located in - /// - [JsonProperty(PropertyName = "region")] - public string Region { get; set; } - - /// - /// Gets or sets the state this IP address is located in - /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - - /// - /// Gets or sets a numeric rating of confidence that the value in the - /// 'state' field is correct on a scale of 0-100 - /// - [JsonProperty(PropertyName = "stateCf")] - public int? StateCf { get; set; } - - /// - /// Gets or sets the abbreviated name for the state this IP address is - /// located in - /// - [JsonProperty(PropertyName = "stateCode")] - public string StateCode { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityAnalytics.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityAnalytics.cs deleted file mode 100644 index 9cd4307b7aad..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityAnalytics.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Settings with single toggle. - /// - [Rest.Serialization.JsonTransformation] - public partial class EntityAnalytics : Settings - { - /// - /// Initializes a new instance of the EntityAnalytics class. - /// - public EntityAnalytics() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityAnalytics class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Determines whether the setting is enable or - /// disabled. - public EntityAnalytics(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), bool? isEnabled = default(bool?)) - : base(id, name, type, systemData, etag) - { - IsEnabled = isEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets determines whether the setting is enable or disabled. - /// - [JsonProperty(PropertyName = "properties.isEnabled")] - public bool? IsEnabled { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityEdges.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityEdges.cs deleted file mode 100644 index 440e7c2ed591..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityEdges.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The edge that connects the entity to the other entity. - /// - public partial class EntityEdges - { - /// - /// Initializes a new instance of the EntityEdges class. - /// - public EntityEdges() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityEdges class. - /// - /// The target entity Id. - /// A bag of custom fields that should be - /// part of the entity and will be presented to the user. - public EntityEdges(string targetEntityId = default(string), IDictionary additionalData = default(IDictionary)) - { - TargetEntityId = targetEntityId; - AdditionalData = additionalData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the target entity Id. - /// - [JsonProperty(PropertyName = "targetEntityId")] - public string TargetEntityId { get; set; } - - /// - /// Gets or sets a bag of custom fields that should be part of the - /// entity and will be presented to the user. - /// - [JsonProperty(PropertyName = "additionalData")] - public IDictionary AdditionalData { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandParameters.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandParameters.cs deleted file mode 100644 index 5a7f826262f8..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandParameters.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The parameters required to execute an expand operation on the given - /// entity. - /// - public partial class EntityExpandParameters - { - /// - /// Initializes a new instance of the EntityExpandParameters class. - /// - public EntityExpandParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityExpandParameters class. - /// - /// The end date filter, so the only expansion - /// results returned are before this date. - /// The Id of the expansion to - /// perform. - /// The start date filter, so the only - /// expansion results returned are after this date. - public EntityExpandParameters(System.DateTime? endTime = default(System.DateTime?), System.Guid? expansionId = default(System.Guid?), System.DateTime? startTime = default(System.DateTime?)) - { - EndTime = endTime; - ExpansionId = expansionId; - StartTime = startTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the end date filter, so the only expansion results - /// returned are before this date. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets the Id of the expansion to perform. - /// - [JsonProperty(PropertyName = "expansionId")] - public System.Guid? ExpansionId { get; set; } - - /// - /// Gets or sets the start date filter, so the only expansion results - /// returned are after this date. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponse.cs deleted file mode 100644 index d530f5493f6b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponse.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The entity expansion result operation response. - /// - public partial class EntityExpandResponse - { - /// - /// Initializes a new instance of the EntityExpandResponse class. - /// - public EntityExpandResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityExpandResponse class. - /// - /// The metadata from the expansion operation - /// results. - /// The expansion result values. - public EntityExpandResponse(ExpansionResultsMetadata metaData = default(ExpansionResultsMetadata), EntityExpandResponseValue value = default(EntityExpandResponseValue)) - { - MetaData = metaData; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the metadata from the expansion operation results. - /// - [JsonProperty(PropertyName = "metaData")] - public ExpansionResultsMetadata MetaData { get; set; } - - /// - /// Gets or sets the expansion result values. - /// - [JsonProperty(PropertyName = "value")] - public EntityExpandResponseValue Value { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.cs deleted file mode 100644 index b7208b1fe577..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The expansion result values. - /// - public partial class EntityExpandResponseValue - { - /// - /// Initializes a new instance of the EntityExpandResponseValue class. - /// - public EntityExpandResponseValue() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityExpandResponseValue class. - /// - /// Array of the expansion result - /// entities. - /// Array of edges that connects the entity to the - /// list of entities. - public EntityExpandResponseValue(IList entities = default(IList), IList edges = default(IList)) - { - Entities = entities; - Edges = edges; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets array of the expansion result entities. - /// - [JsonProperty(PropertyName = "entities")] - public IList Entities { get; set; } - - /// - /// Gets or sets array of edges that connects the entity to the list of - /// entities. - /// - [JsonProperty(PropertyName = "edges")] - public IList Edges { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs deleted file mode 100644 index 5b90d0af715d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Map identifiers of a single entity - /// - public partial class EntityFieldMapping - { - /// - /// Initializes a new instance of the EntityFieldMapping class. - /// - public EntityFieldMapping() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityFieldMapping class. - /// - /// Alert V3 identifier - /// The value of the identifier - public EntityFieldMapping(string identifier = default(string), string value = default(string)) - { - Identifier = identifier; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets alert V3 identifier - /// - [JsonProperty(PropertyName = "identifier")] - public string Identifier { get; set; } - - /// - /// Gets or sets the value of the identifier - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsParameters.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsParameters.cs deleted file mode 100644 index 57412ac7f6dd..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsParameters.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The parameters required to execute insights operation on the given - /// entity. - /// - public partial class EntityGetInsightsParameters - { - /// - /// Initializes a new instance of the EntityGetInsightsParameters - /// class. - /// - public EntityGetInsightsParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityGetInsightsParameters - /// class. - /// - /// The start timeline date, so the results - /// returned are after this date. - /// The end timeline date, so the results - /// returned are before this date. - /// Indicates if query time - /// range should be extended with default time range of the query. - /// Default value is false - /// List of Insights Query Id. If empty, - /// default value is all insights of this entity - public EntityGetInsightsParameters(System.DateTime startTime, System.DateTime endTime, bool? addDefaultExtendedTimeRange = default(bool?), IList insightQueryIds = default(IList)) - { - StartTime = startTime; - EndTime = endTime; - AddDefaultExtendedTimeRange = addDefaultExtendedTimeRange; - InsightQueryIds = insightQueryIds; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the start timeline date, so the results returned are - /// after this date. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime StartTime { get; set; } - - /// - /// Gets or sets the end timeline date, so the results returned are - /// before this date. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime EndTime { get; set; } - - /// - /// Gets or sets indicates if query time range should be extended with - /// default time range of the query. Default value is false - /// - [JsonProperty(PropertyName = "addDefaultExtendedTimeRange")] - public bool? AddDefaultExtendedTimeRange { get; set; } - - /// - /// Gets or sets list of Insights Query Id. If empty, default value is - /// all insights of this entity - /// - [JsonProperty(PropertyName = "insightQueryIds")] - public IList InsightQueryIds { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.cs deleted file mode 100644 index c92e0f54cae8..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The Get Insights result operation response. - /// - public partial class EntityGetInsightsResponse - { - /// - /// Initializes a new instance of the EntityGetInsightsResponse class. - /// - public EntityGetInsightsResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityGetInsightsResponse class. - /// - /// The metadata from the get insights operation - /// results. - /// The insights result values. - public EntityGetInsightsResponse(GetInsightsResultsMetadata metaData = default(GetInsightsResultsMetadata), IList value = default(IList)) - { - MetaData = metaData; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the metadata from the get insights operation results. - /// - [JsonProperty(PropertyName = "metaData")] - public GetInsightsResultsMetadata MetaData { get; set; } - - /// - /// Gets or sets the insights result values. - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (MetaData != null) - { - MetaData.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItem.cs deleted file mode 100644 index d46c305595dc..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItem.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Entity insight Item. - /// - public partial class EntityInsightItem - { - /// - /// Initializes a new instance of the EntityInsightItem class. - /// - public EntityInsightItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityInsightItem class. - /// - /// The query id of the insight - /// The Time interval that the query - /// actually executed on. - /// Query results for table insights - /// query. - /// Query results for table insights - /// query. - public EntityInsightItem(string queryId = default(string), EntityInsightItemQueryTimeInterval queryTimeInterval = default(EntityInsightItemQueryTimeInterval), InsightsTableResult tableQueryResults = default(InsightsTableResult), IList chartQueryResults = default(IList)) - { - QueryId = queryId; - QueryTimeInterval = queryTimeInterval; - TableQueryResults = tableQueryResults; - ChartQueryResults = chartQueryResults; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the query id of the insight - /// - [JsonProperty(PropertyName = "queryId")] - public string QueryId { get; set; } - - /// - /// Gets or sets the Time interval that the query actually executed on. - /// - [JsonProperty(PropertyName = "queryTimeInterval")] - public EntityInsightItemQueryTimeInterval QueryTimeInterval { get; set; } - - /// - /// Gets or sets query results for table insights query. - /// - [JsonProperty(PropertyName = "tableQueryResults")] - public InsightsTableResult TableQueryResults { get; set; } - - /// - /// Gets or sets query results for table insights query. - /// - [JsonProperty(PropertyName = "chartQueryResults")] - public IList ChartQueryResults { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.cs deleted file mode 100644 index 4da48fb89a74..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The Time interval that the query actually executed on. - /// - public partial class EntityInsightItemQueryTimeInterval - { - /// - /// Initializes a new instance of the - /// EntityInsightItemQueryTimeInterval class. - /// - public EntityInsightItemQueryTimeInterval() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// EntityInsightItemQueryTimeInterval class. - /// - /// Insight query start time - /// Insight query end time - public EntityInsightItemQueryTimeInterval(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) - { - StartTime = startTime; - EndTime = endTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets insight query start time - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets insight query end time - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityKindEnum.cs similarity index 97% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityKind.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityKindEnum.cs index 2547a43a7e72..9d2b8d711433 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityKindEnum.cs @@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for EntityKind. + /// Defines values for EntityKindEnum. /// - public static class EntityKind + public static class EntityKindEnum { /// /// Entity represents account in the system. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItem.cs deleted file mode 100644 index 3c014936cb7b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItem.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// An abstract Query item for entity - /// - public partial class EntityQueryItem - { - /// - /// Initializes a new instance of the EntityQueryItem class. - /// - public EntityQueryItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityQueryItem class. - /// - /// Query Template ARM ID - /// Query Template ARM Name - /// ARM Type - public EntityQueryItem(string id = default(string), string name = default(string), string type = default(string)) - { - Id = id; - Name = name; - Type = type; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets query Template ARM ID - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets or sets query Template ARM Name - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets ARM Type - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.cs deleted file mode 100644 index 50be53c5ad32..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// An properties abstract Query item for entity - /// - public partial class EntityQueryItemProperties - { - /// - /// Initializes a new instance of the EntityQueryItemProperties class. - /// - public EntityQueryItemProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityQueryItemProperties class. - /// - /// Data types for template - /// The type of the entity. Possible - /// values include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DNS', 'FileHash', 'IP', 'Malware', 'Process', - /// 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', - /// 'IoTDevice', 'SecurityAlert', 'HuntingBookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// Data types for - /// template - /// The query applied only to entities - /// matching to all filters - public EntityQueryItemProperties(IList dataTypes = default(IList), string inputEntityType = default(string), IList> requiredInputFieldsSets = default(IList>), object entitiesFilter = default(object)) - { - DataTypes = dataTypes; - InputEntityType = inputEntityType; - RequiredInputFieldsSets = requiredInputFieldsSets; - EntitiesFilter = entitiesFilter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets data types for template - /// - [JsonProperty(PropertyName = "dataTypes")] - public IList DataTypes { get; set; } - - /// - /// Gets or sets the type of the entity. Possible values include: - /// 'Account', 'Host', 'File', 'AzureResource', 'CloudApplication', - /// 'DNS', 'FileHash', 'IP', 'Malware', 'Process', 'RegistryKey', - /// 'RegistryValue', 'SecurityGroup', 'URL', 'IoTDevice', - /// 'SecurityAlert', 'HuntingBookmark', 'MailCluster', 'MailMessage', - /// 'Mailbox', 'SubmissionMail' - /// - [JsonProperty(PropertyName = "inputEntityType")] - public string InputEntityType { get; set; } - - /// - /// Gets or sets data types for template - /// - [JsonProperty(PropertyName = "requiredInputFieldsSets")] - public IList> RequiredInputFieldsSets { get; set; } - - /// - /// Gets or sets the query applied only to entities matching to all - /// filters - /// - [JsonProperty(PropertyName = "entitiesFilter")] - public object EntitiesFilter { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.cs deleted file mode 100644 index ef3caae09a0f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class EntityQueryItemPropertiesDataTypesItem - { - /// - /// Initializes a new instance of the - /// EntityQueryItemPropertiesDataTypesItem class. - /// - public EntityQueryItemPropertiesDataTypesItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// EntityQueryItemPropertiesDataTypesItem class. - /// - /// Data type name - public EntityQueryItemPropertiesDataTypesItem(string dataType = default(string)) - { - DataType = dataType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets data type name - /// - [JsonProperty(PropertyName = "dataType")] - public string DataType { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryKind.cs deleted file mode 100644 index cacfd57754ba..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryKind.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for EntityQueryKind. - /// - public static class EntityQueryKind - { - public const string Expansion = "Expansion"; - public const string Insight = "Insight"; - public const string Activity = "Activity"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplate.cs deleted file mode 100644 index a50456bcc086..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplate.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Specific entity query template. - /// - public partial class EntityQueryTemplate : Resource - { - /// - /// Initializes a new instance of the EntityQueryTemplate class. - /// - public EntityQueryTemplate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityQueryTemplate class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - public EntityQueryTemplate(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData)) - : base(id, name, type, systemData) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplateKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplateKind.cs deleted file mode 100644 index 6a5573517b80..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQueryTemplateKind.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for EntityQueryTemplateKind. - /// - public static class EntityQueryTemplateKind - { - public const string Activity = "Activity"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineParameters.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineParameters.cs deleted file mode 100644 index c1e111d61c0b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineParameters.cs +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The parameters required to execute s timeline operation on the given - /// entity. - /// - public partial class EntityTimelineParameters - { - /// - /// Initializes a new instance of the EntityTimelineParameters class. - /// - public EntityTimelineParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityTimelineParameters class. - /// - /// The start timeline date, so the results - /// returned are after this date. - /// The end timeline date, so the results - /// returned are before this date. - /// Array of timeline Item kinds. - /// The number of bucket for timeline - /// queries aggregation. - public EntityTimelineParameters(System.DateTime startTime, System.DateTime endTime, IList kinds = default(IList), int? numberOfBucket = default(int?)) - { - Kinds = kinds; - StartTime = startTime; - EndTime = endTime; - NumberOfBucket = numberOfBucket; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets array of timeline Item kinds. - /// - [JsonProperty(PropertyName = "kinds")] - public IList Kinds { get; set; } - - /// - /// Gets or sets the start timeline date, so the results returned are - /// after this date. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime StartTime { get; set; } - - /// - /// Gets or sets the end timeline date, so the results returned are - /// before this date. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime EndTime { get; set; } - - /// - /// Gets or sets the number of bucket for timeline queries aggregation. - /// - [JsonProperty(PropertyName = "numberOfBucket")] - public int? NumberOfBucket { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineResponse.cs deleted file mode 100644 index ee0834f9b2a1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityTimelineResponse.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The entity timeline result operation response. - /// - public partial class EntityTimelineResponse - { - /// - /// Initializes a new instance of the EntityTimelineResponse class. - /// - public EntityTimelineResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EntityTimelineResponse class. - /// - /// The metadata from the timeline operation - /// results. - /// The timeline result values. - public EntityTimelineResponse(TimelineResultsMetadata metaData = default(TimelineResultsMetadata), IList value = default(IList)) - { - MetaData = metaData; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the metadata from the timeline operation results. - /// - [JsonProperty(PropertyName = "metaData")] - public TimelineResultsMetadata MetaData { get; set; } - - /// - /// Gets or sets the timeline result values. - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (MetaData != null) - { - MetaData.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityType.cs deleted file mode 100644 index 0a6dc63eb8a1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityType.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for EntityType. - /// - public static class EntityType - { - /// - /// Entity represents account in the system. - /// - public const string Account = "Account"; - /// - /// Entity represents host in the system. - /// - public const string Host = "Host"; - /// - /// Entity represents file in the system. - /// - public const string File = "File"; - /// - /// Entity represents azure resource in the system. - /// - public const string AzureResource = "AzureResource"; - /// - /// Entity represents cloud application in the system. - /// - public const string CloudApplication = "CloudApplication"; - /// - /// Entity represents dns in the system. - /// - public const string DNS = "DNS"; - /// - /// Entity represents file hash in the system. - /// - public const string FileHash = "FileHash"; - /// - /// Entity represents ip in the system. - /// - public const string IP = "IP"; - /// - /// Entity represents malware in the system. - /// - public const string Malware = "Malware"; - /// - /// Entity represents process in the system. - /// - public const string Process = "Process"; - /// - /// Entity represents registry key in the system. - /// - public const string RegistryKey = "RegistryKey"; - /// - /// Entity represents registry value in the system. - /// - public const string RegistryValue = "RegistryValue"; - /// - /// Entity represents security group in the system. - /// - public const string SecurityGroup = "SecurityGroup"; - /// - /// Entity represents url in the system. - /// - public const string URL = "URL"; - /// - /// Entity represents IoT device in the system. - /// - public const string IoTDevice = "IoTDevice"; - /// - /// Entity represents security alert in the system. - /// - public const string SecurityAlert = "SecurityAlert"; - /// - /// Entity represents HuntingBookmark in the system. - /// - public const string HuntingBookmark = "HuntingBookmark"; - /// - /// Entity represents mail cluster in the system. - /// - public const string MailCluster = "MailCluster"; - /// - /// Entity represents mail message in the system. - /// - public const string MailMessage = "MailMessage"; - /// - /// Entity represents mailbox in the system. - /// - public const string Mailbox = "Mailbox"; - /// - /// Entity represents submission mail in the system. - /// - public const string SubmissionMail = "SubmissionMail"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.cs deleted file mode 100644 index 19b310286fbd..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.cs +++ /dev/null @@ -1,125 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Expansion entity query. - /// - [Newtonsoft.Json.JsonObject("Expansion")] - [Rest.Serialization.JsonTransformation] - public partial class ExpansionEntityQuery : EntityQuery - { - /// - /// Initializes a new instance of the ExpansionEntityQuery class. - /// - public ExpansionEntityQuery() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ExpansionEntityQuery class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// List of the data sources that are - /// required to run the query - /// The query display name - /// The type of the query's source - /// entity. Possible values include: 'Account', 'Host', 'File', - /// 'AzureResource', 'CloudApplication', 'DNS', 'FileHash', 'IP', - /// 'Malware', 'Process', 'RegistryKey', 'RegistryValue', - /// 'SecurityGroup', 'URL', 'IoTDevice', 'SecurityAlert', - /// 'HuntingBookmark', 'MailCluster', 'MailMessage', 'Mailbox', - /// 'SubmissionMail' - /// List of the fields of the source entity - /// that are required to run the query - /// List of the desired output types to - /// be constructed from the result - /// The template query string to be parsed - /// and formatted - public ExpansionEntityQuery(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), IList dataSources = default(IList), string displayName = default(string), string inputEntityType = default(string), IList inputFields = default(IList), IList outputEntityTypes = default(IList), string queryTemplate = default(string)) - : base(id, name, type, systemData, etag) - { - DataSources = dataSources; - DisplayName = displayName; - InputEntityType = inputEntityType; - InputFields = inputFields; - OutputEntityTypes = outputEntityTypes; - QueryTemplate = queryTemplate; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of the data sources that are required to run the - /// query - /// - [JsonProperty(PropertyName = "properties.dataSources")] - public IList DataSources { get; set; } - - /// - /// Gets or sets the query display name - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the type of the query's source entity. Possible values - /// include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DNS', 'FileHash', 'IP', 'Malware', 'Process', - /// 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', - /// 'IoTDevice', 'SecurityAlert', 'HuntingBookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// - [JsonProperty(PropertyName = "properties.inputEntityType")] - public string InputEntityType { get; set; } - - /// - /// Gets or sets list of the fields of the source entity that are - /// required to run the query - /// - [JsonProperty(PropertyName = "properties.inputFields")] - public IList InputFields { get; set; } - - /// - /// Gets or sets list of the desired output types to be constructed - /// from the result - /// - [JsonProperty(PropertyName = "properties.outputEntityTypes")] - public IList OutputEntityTypes { get; set; } - - /// - /// Gets or sets the template query string to be parsed and formatted - /// - [JsonProperty(PropertyName = "properties.queryTemplate")] - public string QueryTemplate { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.cs deleted file mode 100644 index dbc96904e981..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Information of a specific aggregation in the expansion result. - /// - public partial class ExpansionResultAggregation - { - /// - /// Initializes a new instance of the ExpansionResultAggregation class. - /// - public ExpansionResultAggregation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ExpansionResultAggregation class. - /// - /// Total number of aggregations of the given kind - /// (and aggregationType if given) in the expansion result. - /// The kind of the aggregated entity. - /// Possible values include: 'Account', 'Host', 'File', - /// 'AzureResource', 'CloudApplication', 'DnsResolution', 'FileHash', - /// 'Ip', 'Malware', 'Process', 'RegistryKey', 'RegistryValue', - /// 'SecurityGroup', 'Url', 'IoTDevice', 'SecurityAlert', 'Bookmark', - /// 'MailCluster', 'MailMessage', 'Mailbox', 'SubmissionMail' - /// The common type of the aggregation. - /// (for e.g. entity field name) - /// The display name of the aggregation by - /// type. - public ExpansionResultAggregation(int count, string entityKind, string aggregationType = default(string), string displayName = default(string)) - { - AggregationType = aggregationType; - Count = count; - DisplayName = displayName; - EntityKind = entityKind; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the common type of the aggregation. (for e.g. entity - /// field name) - /// - [JsonProperty(PropertyName = "aggregationType")] - public string AggregationType { get; set; } - - /// - /// Gets or sets total number of aggregations of the given kind (and - /// aggregationType if given) in the expansion result. - /// - [JsonProperty(PropertyName = "count")] - public int Count { get; set; } - - /// - /// Gets or sets the display name of the aggregation by type. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the kind of the aggregated entity. Possible values - /// include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DnsResolution', 'FileHash', 'Ip', 'Malware', - /// 'Process', 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'Url', - /// 'IoTDevice', 'SecurityAlert', 'Bookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// - [JsonProperty(PropertyName = "entityKind")] - public string EntityKind { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (EntityKind == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "EntityKind"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.cs deleted file mode 100644 index 49e89971e9aa..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Expansion result metadata. - /// - public partial class ExpansionResultsMetadata - { - /// - /// Initializes a new instance of the ExpansionResultsMetadata class. - /// - public ExpansionResultsMetadata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ExpansionResultsMetadata class. - /// - /// Information of the aggregated nodes in - /// the expansion result. - public ExpansionResultsMetadata(IList aggregations = default(IList)) - { - Aggregations = aggregations; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets information of the aggregated nodes in the expansion - /// result. - /// - [JsonProperty(PropertyName = "aggregations")] - public IList Aggregations { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EyesOn.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EyesOn.cs deleted file mode 100644 index 4a0c5b1d9af9..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EyesOn.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Settings with single toggle. - /// - [Rest.Serialization.JsonTransformation] - public partial class EyesOn : Settings - { - /// - /// Initializes a new instance of the EyesOn class. - /// - public EyesOn() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EyesOn class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Determines whether the setting is enable or - /// disabled. - public EyesOn(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), bool? isEnabled = default(bool?)) - : base(id, name, type, systemData, etag) - { - IsEnabled = isEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets determines whether the setting is enable or disabled. - /// - [JsonProperty(PropertyName = "properties.isEnabled")] - public bool? IsEnabled { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs index 8790b46ac50a..01e90d7c6b98 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs @@ -52,10 +52,6 @@ public FusionAlertRule() /// rule. /// The display name for alerts created by /// this alert rule. - /// Configuration for all supported source - /// signals in fusion detection. - /// Configuration to exclude - /// scenarios in fusion detection. /// The last time that this alert has /// been modified. /// The severity for alerts created by this @@ -63,15 +59,13 @@ public FusionAlertRule() /// 'Informational' /// The tactics of the alert rule /// The techniques of the alert rule - public FusionAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), IList sourceSettings = default(IList), IList scenarioExclusionPatterns = default(IList), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) + public FusionAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData, etag) { AlertRuleTemplateName = alertRuleTemplateName; Description = description; DisplayName = displayName; Enabled = enabled; - SourceSettings = sourceSettings; - ScenarioExclusionPatterns = scenarioExclusionPatterns; LastModifiedUtc = lastModifiedUtc; Severity = severity; Tactics = tactics; @@ -110,20 +104,6 @@ public FusionAlertRule() [JsonProperty(PropertyName = "properties.enabled")] public bool Enabled { get; set; } - /// - /// Gets or sets configuration for all supported source signals in - /// fusion detection. - /// - [JsonProperty(PropertyName = "properties.sourceSettings")] - public IList SourceSettings { get; set; } - - /// - /// Gets or sets configuration to exclude scenarios in fusion - /// detection. - /// - [JsonProperty(PropertyName = "properties.scenarioExclusionPatterns")] - public IList ScenarioExclusionPatterns { get; set; } - /// /// Gets the last time that this alert has been modified. /// @@ -161,26 +141,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "AlertRuleTemplateName"); } - if (SourceSettings != null) - { - foreach (var element in SourceSettings) - { - if (element != null) - { - element.Validate(); - } - } - } - if (ScenarioExclusionPatterns != null) - { - foreach (var element1 in ScenarioExclusionPatterns) - { - if (element1 != null) - { - element1.Validate(); - } - } - } } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs index 61abee4ba0c4..d7b046b41335 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs @@ -62,10 +62,9 @@ public FusionAlertRuleTemplate() /// 'Informational' /// The tactics of the alert rule /// template - /// The techniques of the alert rule - /// All supported source signal - /// configurations consumed in fusion detection. - public FusionAlertRuleTemplate(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? createdDateUTC = default(System.DateTime?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList), IList sourceSettings = default(IList)) + /// The techniques of the alert rule + /// template + public FusionAlertRuleTemplate(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? createdDateUTC = default(System.DateTime?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData) { AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; @@ -78,7 +77,6 @@ public FusionAlertRuleTemplate() Severity = severity; Tactics = tactics; Techniques = techniques; - SourceSettings = sourceSettings; CustomInit(); } @@ -145,17 +143,10 @@ public FusionAlertRuleTemplate() public IList Tactics { get; set; } /// - /// Gets or sets the techniques of the alert rule + /// Gets or sets the techniques of the alert rule template /// [JsonProperty(PropertyName = "properties.techniques")] public IList Techniques { get; set; } - /// - /// Gets or sets all supported source signal configurations consumed in - /// fusion detection. - /// - [JsonProperty(PropertyName = "properties.sourceSettings")] - public IList SourceSettings { get; set; } - } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs deleted file mode 100644 index 25577271cd4d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents a Fusion scenario exclusion patterns in Fusion detection. - /// - public partial class FusionScenarioExclusionPattern - { - /// - /// Initializes a new instance of the FusionScenarioExclusionPattern - /// class. - /// - public FusionScenarioExclusionPattern() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionScenarioExclusionPattern - /// class. - /// - /// Scenario exclusion pattern. - /// DateTime when scenario exclusion - /// pattern is added in UTC. - public FusionScenarioExclusionPattern(string exclusionPattern, string dateAddedInUTC) - { - ExclusionPattern = exclusionPattern; - DateAddedInUTC = dateAddedInUTC; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets scenario exclusion pattern. - /// - [JsonProperty(PropertyName = "exclusionPattern")] - public string ExclusionPattern { get; set; } - - /// - /// Gets or sets dateTime when scenario exclusion pattern is added in - /// UTC. - /// - [JsonProperty(PropertyName = "dateAddedInUTC")] - public string DateAddedInUTC { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ExclusionPattern == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ExclusionPattern"); - } - if (DateAddedInUTC == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DateAddedInUTC"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs deleted file mode 100644 index 5773c68dd320..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a supported source signal configuration in Fusion detection. - /// - public partial class FusionSourceSettings - { - /// - /// Initializes a new instance of the FusionSourceSettings class. - /// - public FusionSourceSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionSourceSettings class. - /// - /// Determines whether this source signal is - /// enabled or disabled in Fusion detection. - /// Name of the Fusion source signal. Refer to - /// Fusion alert rule template for supported values. - /// Configuration for all source subtypes - /// under this source signal consumed in fusion detection. - public FusionSourceSettings(bool enabled, string sourceName, IList sourceSubTypes = default(IList)) - { - Enabled = enabled; - SourceName = sourceName; - SourceSubTypes = sourceSubTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets determines whether this source signal is enabled or - /// disabled in Fusion detection. - /// - [JsonProperty(PropertyName = "enabled")] - public bool Enabled { get; set; } - - /// - /// Gets or sets name of the Fusion source signal. Refer to Fusion - /// alert rule template for supported values. - /// - [JsonProperty(PropertyName = "sourceName")] - public string SourceName { get; set; } - - /// - /// Gets or sets configuration for all source subtypes under this - /// source signal consumed in fusion detection. - /// - [JsonProperty(PropertyName = "sourceSubTypes")] - public IList SourceSubTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceName"); - } - if (SourceSubTypes != null) - { - foreach (var element in SourceSubTypes) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs deleted file mode 100644 index 424095d51b24..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents a supported source subtype configuration under a source - /// signal in Fusion detection. - /// - public partial class FusionSourceSubTypeSetting - { - /// - /// Initializes a new instance of the FusionSourceSubTypeSetting class. - /// - public FusionSourceSubTypeSetting() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionSourceSubTypeSetting class. - /// - /// Determines whether this source subtype under - /// source signal is enabled or disabled in Fusion detection. - /// The Name of the source subtype - /// under a given source signal in Fusion detection. Refer to Fusion - /// alert rule template for supported values. - /// Severity configuration for a source - /// subtype consumed in fusion detection. - /// The display name of source - /// subtype under a source signal consumed in Fusion detection. - public FusionSourceSubTypeSetting(bool enabled, string sourceSubTypeName, FusionSubTypeSeverityFilter severityFilters, string sourceSubTypeDisplayName = default(string)) - { - Enabled = enabled; - SourceSubTypeName = sourceSubTypeName; - SourceSubTypeDisplayName = sourceSubTypeDisplayName; - SeverityFilters = severityFilters; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets determines whether this source subtype under source - /// signal is enabled or disabled in Fusion detection. - /// - [JsonProperty(PropertyName = "enabled")] - public bool Enabled { get; set; } - - /// - /// Gets or sets the Name of the source subtype under a given source - /// signal in Fusion detection. Refer to Fusion alert rule template for - /// supported values. - /// - [JsonProperty(PropertyName = "sourceSubTypeName")] - public string SourceSubTypeName { get; set; } - - /// - /// Gets the display name of source subtype under a source signal - /// consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "sourceSubTypeDisplayName")] - public string SourceSubTypeDisplayName { get; private set; } - - /// - /// Gets or sets severity configuration for a source subtype consumed - /// in fusion detection. - /// - [JsonProperty(PropertyName = "severityFilters")] - public FusionSubTypeSeverityFilter SeverityFilters { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SourceSubTypeName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceSubTypeName"); - } - if (SeverityFilters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SeverityFilters"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs deleted file mode 100644 index 6c898eb904a3..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents severity configuration for a source subtype consumed in - /// Fusion detection. - /// - public partial class FusionSubTypeSeverityFilter - { - /// - /// Initializes a new instance of the FusionSubTypeSeverityFilter - /// class. - /// - public FusionSubTypeSeverityFilter() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionSubTypeSeverityFilter - /// class. - /// - /// Determines whether this source subtype - /// supports severity configuration or not. - /// Individual Severity configuration settings - /// for a given source subtype consumed in Fusion detection. - public FusionSubTypeSeverityFilter(bool? isSupported = default(bool?), IList filters = default(IList)) - { - IsSupported = isSupported; - Filters = filters; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets determines whether this source subtype supports severity - /// configuration or not. - /// - [JsonProperty(PropertyName = "isSupported")] - public bool? IsSupported { get; private set; } - - /// - /// Gets or sets individual Severity configuration settings for a given - /// source subtype consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "filters")] - public IList Filters { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs deleted file mode 100644 index 4446d9767954..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents a Severity filter setting for a given source subtype - /// consumed in Fusion detection. - /// - public partial class FusionSubTypeSeverityFiltersItem - { - /// - /// Initializes a new instance of the FusionSubTypeSeverityFiltersItem - /// class. - /// - public FusionSubTypeSeverityFiltersItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionSubTypeSeverityFiltersItem - /// class. - /// - /// The Severity for a given source subtype - /// consumed in Fusion detection. Possible values include: 'High', - /// 'Medium', 'Low', 'Informational' - /// Determines whether this severity is enabled - /// or disabled for this source subtype consumed in Fusion - /// detection. - public FusionSubTypeSeverityFiltersItem(string severity, bool enabled) - { - Severity = severity; - Enabled = enabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Severity for a given source subtype consumed in - /// Fusion detection. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } - - /// - /// Gets or sets determines whether this severity is enabled or - /// disabled for this source subtype consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "enabled")] - public bool Enabled { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Severity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs deleted file mode 100644 index 259f90889f9e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a source signal consumed in Fusion detection. - /// - public partial class FusionTemplateSourceSetting - { - /// - /// Initializes a new instance of the FusionTemplateSourceSetting - /// class. - /// - public FusionTemplateSourceSetting() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionTemplateSourceSetting - /// class. - /// - /// The name of a source signal consumed in - /// Fusion detection. - /// All supported source subtypes under - /// this source signal consumed in fusion detection. - public FusionTemplateSourceSetting(string sourceName, IList sourceSubTypes = default(IList)) - { - SourceName = sourceName; - SourceSubTypes = sourceSubTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of a source signal consumed in Fusion - /// detection. - /// - [JsonProperty(PropertyName = "sourceName")] - public string SourceName { get; set; } - - /// - /// Gets or sets all supported source subtypes under this source signal - /// consumed in fusion detection. - /// - [JsonProperty(PropertyName = "sourceSubTypes")] - public IList SourceSubTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceName"); - } - if (SourceSubTypes != null) - { - foreach (var element in SourceSubTypes) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs deleted file mode 100644 index c9086349a96a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents a source subtype under a source signal consumed in Fusion - /// detection. - /// - public partial class FusionTemplateSourceSubType - { - /// - /// Initializes a new instance of the FusionTemplateSourceSubType - /// class. - /// - public FusionTemplateSourceSubType() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FusionTemplateSourceSubType - /// class. - /// - /// The name of source subtype under a - /// source signal consumed in Fusion detection. - /// Severity configuration available for a - /// source subtype consumed in fusion detection. - /// The display name of source - /// subtype under a source signal consumed in Fusion detection. - public FusionTemplateSourceSubType(string sourceSubTypeName, FusionTemplateSubTypeSeverityFilter severityFilter, string sourceSubTypeDisplayName = default(string)) - { - SourceSubTypeName = sourceSubTypeName; - SourceSubTypeDisplayName = sourceSubTypeDisplayName; - SeverityFilter = severityFilter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of source subtype under a source signal - /// consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "sourceSubTypeName")] - public string SourceSubTypeName { get; set; } - - /// - /// Gets the display name of source subtype under a source signal - /// consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "sourceSubTypeDisplayName")] - public string SourceSubTypeDisplayName { get; private set; } - - /// - /// Gets or sets severity configuration available for a source subtype - /// consumed in fusion detection. - /// - [JsonProperty(PropertyName = "severityFilter")] - public FusionTemplateSubTypeSeverityFilter SeverityFilter { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SourceSubTypeName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceSubTypeName"); - } - if (SeverityFilter == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SeverityFilter"); - } - if (SeverityFilter != null) - { - SeverityFilter.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs deleted file mode 100644 index f9371094616c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents severity configurations available for a source subtype - /// consumed in Fusion detection. - /// - public partial class FusionTemplateSubTypeSeverityFilter - { - /// - /// Initializes a new instance of the - /// FusionTemplateSubTypeSeverityFilter class. - /// - public FusionTemplateSubTypeSeverityFilter() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// FusionTemplateSubTypeSeverityFilter class. - /// - /// Determines whether severity configuration - /// is supported for this source subtype consumed in Fusion - /// detection. - /// List of all supported severities for - /// this source subtype consumed in Fusion detection. - public FusionTemplateSubTypeSeverityFilter(bool isSupported, IList severityFilters = default(IList)) - { - IsSupported = isSupported; - SeverityFilters = severityFilters; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets determines whether severity configuration is supported - /// for this source subtype consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "isSupported")] - public bool IsSupported { get; set; } - - /// - /// Gets or sets list of all supported severities for this source - /// subtype consumed in Fusion detection. - /// - [JsonProperty(PropertyName = "severityFilters")] - public IList SeverityFilters { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsError.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsError.cs deleted file mode 100644 index bd8427d852ea..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsError.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// GetInsights Query Errors. - /// - public partial class GetInsightsError - { - /// - /// Initializes a new instance of the GetInsightsError class. - /// - public GetInsightsError() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GetInsightsError class. - /// - /// the error message - /// the query id - public GetInsightsError(string errorMessage, string queryId = default(string)) - { - QueryId = queryId; - ErrorMessage = errorMessage; - CustomInit(); - } - /// - /// Static constructor for GetInsightsError class. - /// - static GetInsightsError() - { - Kind = "Insight"; - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the query id - /// - [JsonProperty(PropertyName = "queryId")] - public string QueryId { get; set; } - - /// - /// Gets or sets the error message - /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } - - /// - /// the query kind - /// - [JsonProperty(PropertyName = "kind")] - public static string Kind { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ErrorMessage == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ErrorMessage"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.cs deleted file mode 100644 index c8fae0960be3..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Get Insights result metadata. - /// - public partial class GetInsightsResultsMetadata - { - /// - /// Initializes a new instance of the GetInsightsResultsMetadata class. - /// - public GetInsightsResultsMetadata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GetInsightsResultsMetadata class. - /// - /// the total items found for the insights - /// request - /// information about the failed queries - public GetInsightsResultsMetadata(int totalCount, IList errors = default(IList)) - { - TotalCount = totalCount; - Errors = errors; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the total items found for the insights request - /// - [JsonProperty(PropertyName = "totalCount")] - public int TotalCount { get; set; } - - /// - /// Gets or sets information about the failed queries - /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Errors != null) - { - foreach (var element in Errors) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetQueriesResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetQueriesResponse.cs deleted file mode 100644 index e99416ec586a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GetQueriesResponse.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Retrieve queries for entity result operation response. - /// - public partial class GetQueriesResponse - { - /// - /// Initializes a new instance of the GetQueriesResponse class. - /// - public GetQueriesResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GetQueriesResponse class. - /// - /// The query result values. - public GetQueriesResponse(IList value = default(IList)) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the query result values. - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs deleted file mode 100644 index 2b745cf302cc..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Resources created in GitHub repository. - /// - public partial class GitHubResourceInfo - { - /// - /// Initializes a new instance of the GitHubResourceInfo class. - /// - public GitHubResourceInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GitHubResourceInfo class. - /// - /// GitHub application installation - /// id. - public GitHubResourceInfo(string appInstallationId = default(string)) - { - AppInstallationId = appInstallationId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets gitHub application installation id. - /// - [JsonProperty(PropertyName = "appInstallationId")] - public string AppInstallationId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GraphQueries.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GraphQueries.cs deleted file mode 100644 index 49fbc054ee41..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GraphQueries.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The graph query to show the current data status - /// - public partial class GraphQueries - { - /// - /// Initializes a new instance of the GraphQueries class. - /// - public GraphQueries() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GraphQueries class. - /// - /// the metric that the query is - /// checking - /// The legend for the graph - /// The base query for the graph - public GraphQueries(string metricName = default(string), string legend = default(string), string baseQuery = default(string)) - { - MetricName = metricName; - Legend = legend; - BaseQuery = baseQuery; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the metric that the query is checking - /// - [JsonProperty(PropertyName = "metricName")] - public string MetricName { get; set; } - - /// - /// Gets or sets the legend for the graph - /// - [JsonProperty(PropertyName = "legend")] - public string Legend { get; set; } - - /// - /// Gets or sets the base query for the graph - /// - [JsonProperty(PropertyName = "baseQuery")] - public string BaseQuery { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Incident.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Incident.cs index 2f10ad03050f..d70233e5c3c6 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Incident.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Incident.cs @@ -69,10 +69,6 @@ public Incident() /// A sequential number /// List of labels relevant to this /// incident - /// The name of the source provider that - /// generated the incident - /// The incident ID assigned by the - /// incident provider /// The time of the last activity in /// the incident /// The last time the incident was @@ -81,9 +77,7 @@ public Incident() /// to /// List of resource ids of /// Analytic rules related to the incident - /// Describes a team for the - /// incident - public Incident(string severity, string status, string title, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), IncidentAdditionalData additionalData = default(IncidentAdditionalData), string classification = default(string), string classificationComment = default(string), string classificationReason = default(string), System.DateTime? createdTimeUtc = default(System.DateTime?), string description = default(string), System.DateTime? firstActivityTimeUtc = default(System.DateTime?), string incidentUrl = default(string), int? incidentNumber = default(int?), IList labels = default(IList), string providerName = default(string), string providerIncidentId = default(string), System.DateTime? lastActivityTimeUtc = default(System.DateTime?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), IncidentOwnerInfo owner = default(IncidentOwnerInfo), IList relatedAnalyticRuleIds = default(IList), TeamInformation teamInformation = default(TeamInformation)) + public Incident(string severity, string status, string title, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), IncidentAdditionalData additionalData = default(IncidentAdditionalData), string classification = default(string), string classificationComment = default(string), string classificationReason = default(string), System.DateTime? createdTimeUtc = default(System.DateTime?), string description = default(string), System.DateTime? firstActivityTimeUtc = default(System.DateTime?), string incidentUrl = default(string), int? incidentNumber = default(int?), IList labels = default(IList), System.DateTime? lastActivityTimeUtc = default(System.DateTime?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), IncidentOwnerInfo owner = default(IncidentOwnerInfo), IList relatedAnalyticRuleIds = default(IList)) : base(id, name, type, systemData, etag) { AdditionalData = additionalData; @@ -96,15 +90,12 @@ public Incident() IncidentUrl = incidentUrl; IncidentNumber = incidentNumber; Labels = labels; - ProviderName = providerName; - ProviderIncidentId = providerIncidentId; LastActivityTimeUtc = lastActivityTimeUtc; LastModifiedTimeUtc = lastModifiedTimeUtc; Owner = owner; RelatedAnalyticRuleIds = relatedAnalyticRuleIds; Severity = severity; Status = status; - TeamInformation = teamInformation; Title = title; CustomInit(); } @@ -178,19 +169,6 @@ public Incident() [JsonProperty(PropertyName = "properties.labels")] public IList Labels { get; set; } - /// - /// Gets or sets the name of the source provider that generated the - /// incident - /// - [JsonProperty(PropertyName = "properties.providerName")] - public string ProviderName { get; set; } - - /// - /// Gets or sets the incident ID assigned by the incident provider - /// - [JsonProperty(PropertyName = "properties.providerIncidentId")] - public string ProviderIncidentId { get; set; } - /// /// Gets or sets the time of the last activity in the incident /// @@ -229,12 +207,6 @@ public Incident() [JsonProperty(PropertyName = "properties.status")] public string Status { get; set; } - /// - /// Gets or sets describes a team for the incident - /// - [JsonProperty(PropertyName = "properties.teamInformation")] - public TeamInformation TeamInformation { get; set; } - /// /// Gets or sets the title of the incident /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs index de70ffe4e6e4..a3a2c58e2d4c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs @@ -39,20 +39,14 @@ public IncidentAdditionalData() /// incident /// List of product names of alerts in /// the incident - /// The provider incident url to the - /// incident in Microsoft 365 Defender portal /// The tactics associated with incident - /// The techniques associated with incident's - /// tactics' - public IncidentAdditionalData(int? alertsCount = default(int?), int? bookmarksCount = default(int?), int? commentsCount = default(int?), IList alertProductNames = default(IList), string providerIncidentUrl = default(string), IList tactics = default(IList), IList techniques = default(IList)) + public IncidentAdditionalData(int? alertsCount = default(int?), int? bookmarksCount = default(int?), int? commentsCount = default(int?), IList alertProductNames = default(IList), IList tactics = default(IList)) { AlertsCount = alertsCount; BookmarksCount = bookmarksCount; CommentsCount = commentsCount; AlertProductNames = alertProductNames; - ProviderIncidentUrl = providerIncidentUrl; Tactics = tactics; - Techniques = techniques; CustomInit(); } @@ -85,24 +79,11 @@ public IncidentAdditionalData() [JsonProperty(PropertyName = "alertProductNames")] public IList AlertProductNames { get; private set; } - /// - /// Gets the provider incident url to the incident in Microsoft 365 - /// Defender portal - /// - [JsonProperty(PropertyName = "providerIncidentUrl")] - public string ProviderIncidentUrl { get; private set; } - /// /// Gets the tactics associated with incident /// [JsonProperty(PropertyName = "tactics")] public IList Tactics { get; private set; } - /// - /// Gets the techniques associated with incident's tactics' - /// - [JsonProperty(PropertyName = "techniques")] - public IList Techniques { get; private set; } - } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentOwnerInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentOwnerInfo.cs index 7f0e76a11915..cf1264ef3ea6 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentOwnerInfo.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentOwnerInfo.cs @@ -81,11 +81,11 @@ public IncidentOwnerInfo() public string UserPrincipalName { get; set; } /// - /// Gets the type of the owner the incident is assigned to. Possible - /// values include: 'Unknown', 'User', 'Group' + /// Gets or sets the type of the owner the incident is assigned to. + /// Possible values include: 'Unknown', 'User', 'Group' /// [JsonProperty(PropertyName = "ownerType")] - public string OwnerType { get; private set; } + public string OwnerType { get; set; } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentPropertiesAction.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentPropertiesAction.cs index bb41a319dd0b..7df695e2eaed 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentPropertiesAction.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentPropertiesAction.cs @@ -39,8 +39,8 @@ public IncidentPropertiesAction() /// 'SuspiciousActivity', 'SuspiciousButExpected', /// 'IncorrectAlertLogic', 'InaccurateData' /// Describes the reason the - /// incident was closed - /// List of labels to add to the incident + /// incident was closed. + /// List of labels to add to the incident. public IncidentPropertiesAction(string severity = default(string), string status = default(string), string classification = default(string), string classificationReason = default(string), string classificationComment = default(string), IncidentOwnerInfo owner = default(IncidentOwnerInfo), IList labels = default(IList)) { Severity = severity; @@ -86,7 +86,7 @@ public IncidentPropertiesAction() public string ClassificationReason { get; set; } /// - /// Gets or sets describes the reason the incident was closed + /// Gets or sets describes the reason the incident was closed. /// [JsonProperty(PropertyName = "classificationComment")] public string ClassificationComment { get; set; } @@ -97,7 +97,7 @@ public IncidentPropertiesAction() public IncidentOwnerInfo Owner { get; set; } /// - /// Gets or sets list of labels to add to the incident + /// Gets or sets list of labels to add to the incident. /// [JsonProperty(PropertyName = "labels")] public IList Labels { get; set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItem.cs deleted file mode 100644 index bbbca350341f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItem.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Insight Query. - /// - [Newtonsoft.Json.JsonObject("Insight")] - public partial class InsightQueryItem : EntityQueryItem - { - /// - /// Initializes a new instance of the InsightQueryItem class. - /// - public InsightQueryItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InsightQueryItem class. - /// - /// Query Template ARM ID - /// Query Template ARM Name - /// ARM Type - /// Properties bag for - /// InsightQueryItem - public InsightQueryItem(string id = default(string), string name = default(string), string type = default(string), InsightQueryItemProperties properties = default(InsightQueryItemProperties)) - : base(id, name, type) - { - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets properties bag for InsightQueryItem - /// - [JsonProperty(PropertyName = "properties")] - public InsightQueryItemProperties Properties { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.cs deleted file mode 100644 index ac1af8ad8233..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.cs +++ /dev/null @@ -1,122 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Insight Query. - /// - public partial class InsightQueryItemProperties : EntityQueryItemProperties - { - /// - /// Initializes a new instance of the InsightQueryItemProperties class. - /// - public InsightQueryItemProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InsightQueryItemProperties class. - /// - /// Data types for template - /// The type of the entity. Possible - /// values include: 'Account', 'Host', 'File', 'AzureResource', - /// 'CloudApplication', 'DNS', 'FileHash', 'IP', 'Malware', 'Process', - /// 'RegistryKey', 'RegistryValue', 'SecurityGroup', 'URL', - /// 'IoTDevice', 'SecurityAlert', 'HuntingBookmark', 'MailCluster', - /// 'MailMessage', 'Mailbox', 'SubmissionMail' - /// Data types for - /// template - /// The query applied only to entities - /// matching to all filters - /// The insight display name. - /// The insight description. - /// The base query of the insight. - /// The insight table query. - /// The insight chart query. - /// The activity query - /// definitions. - /// The insight chart query. - /// The insight chart query. - public InsightQueryItemProperties(IList dataTypes = default(IList), string inputEntityType = default(string), IList> requiredInputFieldsSets = default(IList>), object entitiesFilter = default(object), string displayName = default(string), string description = default(string), string baseQuery = default(string), InsightQueryItemPropertiesTableQuery tableQuery = default(InsightQueryItemPropertiesTableQuery), object chartQuery = default(object), InsightQueryItemPropertiesAdditionalQuery additionalQuery = default(InsightQueryItemPropertiesAdditionalQuery), InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange = default(InsightQueryItemPropertiesDefaultTimeRange), InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange = default(InsightQueryItemPropertiesReferenceTimeRange)) - : base(dataTypes, inputEntityType, requiredInputFieldsSets, entitiesFilter) - { - DisplayName = displayName; - Description = description; - BaseQuery = baseQuery; - TableQuery = tableQuery; - ChartQuery = chartQuery; - AdditionalQuery = additionalQuery; - DefaultTimeRange = defaultTimeRange; - ReferenceTimeRange = referenceTimeRange; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the insight display name. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the insight description. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets the base query of the insight. - /// - [JsonProperty(PropertyName = "baseQuery")] - public string BaseQuery { get; set; } - - /// - /// Gets or sets the insight table query. - /// - [JsonProperty(PropertyName = "tableQuery")] - public InsightQueryItemPropertiesTableQuery TableQuery { get; set; } - - /// - /// Gets or sets the insight chart query. - /// - [JsonProperty(PropertyName = "chartQuery")] - public object ChartQuery { get; set; } - - /// - /// Gets or sets the activity query definitions. - /// - [JsonProperty(PropertyName = "additionalQuery")] - public InsightQueryItemPropertiesAdditionalQuery AdditionalQuery { get; set; } - - /// - /// Gets or sets the insight chart query. - /// - [JsonProperty(PropertyName = "defaultTimeRange")] - public InsightQueryItemPropertiesDefaultTimeRange DefaultTimeRange { get; set; } - - /// - /// Gets or sets the insight chart query. - /// - [JsonProperty(PropertyName = "referenceTimeRange")] - public InsightQueryItemPropertiesReferenceTimeRange ReferenceTimeRange { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.cs deleted file mode 100644 index 60480cc3e7a2..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The activity query definitions. - /// - public partial class InsightQueryItemPropertiesAdditionalQuery - { - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesAdditionalQuery class. - /// - public InsightQueryItemPropertiesAdditionalQuery() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesAdditionalQuery class. - /// - /// The insight query. - /// The insight text. - public InsightQueryItemPropertiesAdditionalQuery(string query = default(string), string text = default(string)) - { - Query = query; - Text = text; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the insight query. - /// - [JsonProperty(PropertyName = "query")] - public string Query { get; set; } - - /// - /// Gets or sets the insight text. - /// - [JsonProperty(PropertyName = "text")] - public string Text { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.cs deleted file mode 100644 index f4392ca2832c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The insight chart query. - /// - public partial class InsightQueryItemPropertiesDefaultTimeRange - { - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesDefaultTimeRange class. - /// - public InsightQueryItemPropertiesDefaultTimeRange() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesDefaultTimeRange class. - /// - /// The padding for the start time of the - /// query. - /// The padding for the end time of the - /// query. - public InsightQueryItemPropertiesDefaultTimeRange(string beforeRange = default(string), string afterRange = default(string)) - { - BeforeRange = beforeRange; - AfterRange = afterRange; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the padding for the start time of the query. - /// - [JsonProperty(PropertyName = "beforeRange")] - public string BeforeRange { get; set; } - - /// - /// Gets or sets the padding for the end time of the query. - /// - [JsonProperty(PropertyName = "afterRange")] - public string AfterRange { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.cs deleted file mode 100644 index e6c0155561d1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The insight table query. - /// - public partial class InsightQueryItemPropertiesTableQuery - { - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQuery class. - /// - public InsightQueryItemPropertiesTableQuery() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQuery class. - /// - /// List of insight column - /// definitions. - /// List of insight queries - /// definitions. - public InsightQueryItemPropertiesTableQuery(IList columnsDefinitions = default(IList), IList queriesDefinitions = default(IList)) - { - ColumnsDefinitions = columnsDefinitions; - QueriesDefinitions = queriesDefinitions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of insight column definitions. - /// - [JsonProperty(PropertyName = "columnsDefinitions")] - public IList ColumnsDefinitions { get; set; } - - /// - /// Gets or sets list of insight queries definitions. - /// - [JsonProperty(PropertyName = "queriesDefinitions")] - public IList QueriesDefinitions { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.cs deleted file mode 100644 index 68c0b92c15a7..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem - { - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem class. - /// - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem class. - /// - /// Insight column header. - /// Insights Column type. Possible values - /// include: 'Number', 'String', 'Date', 'Entity' - /// Is query supports deep-link. - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem(string header = default(string), string outputType = default(string), bool? supportDeepLink = default(bool?)) - { - Header = header; - OutputType = outputType; - SupportDeepLink = supportDeepLink; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets insight column header. - /// - [JsonProperty(PropertyName = "header")] - public string Header { get; set; } - - /// - /// Gets or sets insights Column type. Possible values include: - /// 'Number', 'String', 'Date', 'Entity' - /// - [JsonProperty(PropertyName = "outputType")] - public string OutputType { get; set; } - - /// - /// Gets or sets is query supports deep-link. - /// - [JsonProperty(PropertyName = "supportDeepLink")] - public bool? SupportDeepLink { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.cs deleted file mode 100644 index 25c8c83e6b7f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem - { - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem class. - /// - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem class. - /// - /// Insight column header. - /// Insight column header. - /// Insight column header. - /// Insight column header. - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem(string filter = default(string), string summarize = default(string), string project = default(string), IList linkColumnsDefinitions = default(IList)) - { - Filter = filter; - Summarize = summarize; - Project = project; - LinkColumnsDefinitions = linkColumnsDefinitions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets insight column header. - /// - [JsonProperty(PropertyName = "filter")] - public string Filter { get; set; } - - /// - /// Gets or sets insight column header. - /// - [JsonProperty(PropertyName = "summarize")] - public string Summarize { get; set; } - - /// - /// Gets or sets insight column header. - /// - [JsonProperty(PropertyName = "project")] - public string Project { get; set; } - - /// - /// Gets or sets insight column header. - /// - [JsonProperty(PropertyName = "linkColumnsDefinitions")] - public IList LinkColumnsDefinitions { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem.cs deleted file mode 100644 index e08d55d4383e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem - { - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem - /// class. - /// - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem - /// class. - /// - /// Insight Link Definition Projected - /// Name. - /// Insight Link Definition Query. - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItemLinkColumnsDefinitionsItem(string projectedName = default(string), string query = default(string)) - { - ProjectedName = projectedName; - Query = query; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets insight Link Definition Projected Name. - /// - [JsonProperty(PropertyName = "projectedName")] - public string ProjectedName { get; set; } - - /// - /// Gets or sets insight Link Definition Query. - /// - [JsonProperty(PropertyName = "Query")] - public string Query { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResult.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResult.cs deleted file mode 100644 index 07fdde8d4470..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResult.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Query results for table insights query. - /// - public partial class InsightsTableResult - { - /// - /// Initializes a new instance of the InsightsTableResult class. - /// - public InsightsTableResult() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InsightsTableResult class. - /// - /// Columns Metadata of the table - /// Rows data of the table - public InsightsTableResult(IList columns = default(IList), IList> rows = default(IList>)) - { - Columns = columns; - Rows = rows; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets columns Metadata of the table - /// - [JsonProperty(PropertyName = "columns")] - public IList Columns { get; set; } - - /// - /// Gets or sets rows data of the table - /// - [JsonProperty(PropertyName = "rows")] - public IList> Rows { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.cs deleted file mode 100644 index 0af432ad43c7..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class InsightsTableResultColumnsItem - { - /// - /// Initializes a new instance of the InsightsTableResultColumnsItem - /// class. - /// - public InsightsTableResultColumnsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InsightsTableResultColumnsItem - /// class. - /// - /// the type of the colum - /// the name of the colum - public InsightsTableResultColumnsItem(string type = default(string), string name = default(string)) - { - Type = type; - Name = name; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the type of the colum - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets the name of the colum - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionSteps.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionSteps.cs deleted file mode 100644 index 17f6aa4273c1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionSteps.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Instruction steps to enable the connector - /// - public partial class InstructionSteps - { - /// - /// Initializes a new instance of the InstructionSteps class. - /// - public InstructionSteps() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InstructionSteps class. - /// - /// Instruction step title - /// Instruction step description - /// Instruction step details - public InstructionSteps(string title = default(string), string description = default(string), IList instructions = default(IList)) - { - Title = title; - Description = description; - Instructions = instructions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets instruction step title - /// - [JsonProperty(PropertyName = "title")] - public string Title { get; set; } - - /// - /// Gets or sets instruction step description - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets instruction step details - /// - [JsonProperty(PropertyName = "instructions")] - public IList Instructions { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionStepsInstructionsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionStepsInstructionsItem.cs deleted file mode 100644 index f78d430c9203..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InstructionStepsInstructionsItem.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - public partial class InstructionStepsInstructionsItem : ConnectorInstructionModelBase - { - /// - /// Initializes a new instance of the InstructionStepsInstructionsItem - /// class. - /// - public InstructionStepsInstructionsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InstructionStepsInstructionsItem - /// class. - /// - /// The kind of the setting. Possible values - /// include: 'CopyableLabel', 'InstructionStepsGroup', - /// 'InfoMessage' - /// The parameters for the setting - public InstructionStepsInstructionsItem(string type, object parameters = default(object)) - : base(type, parameters) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTCheckRequirements.cs deleted file mode 100644 index 85df678ba7e2..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTCheckRequirements.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents IoT requirements check request. - /// - [Newtonsoft.Json.JsonObject("IOT")] - [Rest.Serialization.JsonTransformation] - public partial class IoTCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the IoTCheckRequirements class. - /// - public IoTCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the IoTCheckRequirements class. - /// - /// The subscription id to connect to, and - /// get the data from. - public IoTCheckRequirements(string subscriptionId = default(string)) - { - SubscriptionId = subscriptionId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the subscription id to connect to, and get the data - /// from. - /// - [JsonProperty(PropertyName = "properties.subscriptionId")] - public string SubscriptionId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTDataConnector.cs deleted file mode 100644 index 88cc4aa5431d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IoTDataConnector.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents IoT data connector. - /// - [Newtonsoft.Json.JsonObject("IOT")] - [Rest.Serialization.JsonTransformation] - public partial class IoTDataConnector : DataConnector - { - /// - /// Initializes a new instance of the IoTDataConnector class. - /// - public IoTDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the IoTDataConnector class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The available data types for the - /// connector. - /// The subscription id to connect to, and - /// get the data from. - public IoTDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector), string subscriptionId = default(string)) - : base(id, name, type, systemData, etag) - { - DataTypes = dataTypes; - SubscriptionId = subscriptionId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public AlertsDataTypeOfDataConnector DataTypes { get; set; } - - /// - /// Gets or sets the subscription id to connect to, and get the data - /// from. - /// - [JsonProperty(PropertyName = "properties.subscriptionId")] - public string SubscriptionId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs deleted file mode 100644 index ba7e60467b14..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for Kind. - /// - public static class Kind - { - public const string DataConnector = "DataConnector"; - public const string DataType = "DataType"; - public const string Workbook = "Workbook"; - public const string WorkbookTemplate = "WorkbookTemplate"; - public const string Playbook = "Playbook"; - public const string PlaybookTemplate = "PlaybookTemplate"; - public const string AnalyticsRuleTemplate = "AnalyticsRuleTemplate"; - public const string AnalyticsRule = "AnalyticsRule"; - public const string HuntingQuery = "HuntingQuery"; - public const string InvestigationQuery = "InvestigationQuery"; - public const string Parser = "Parser"; - public const string Watchlist = "Watchlist"; - public const string WatchlistTemplate = "WatchlistTemplate"; - public const string Solution = "Solution"; - public const string AzureFunction = "AzureFunction"; - public const string LogicAppsCustomConnector = "LogicAppsCustomConnector"; - public const string AutomationRule = "AutomationRule"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.cs deleted file mode 100644 index 82a21d26c832..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Data type for last data received - /// - public partial class LastDataReceivedDataType - { - /// - /// Initializes a new instance of the LastDataReceivedDataType class. - /// - public LastDataReceivedDataType() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LastDataReceivedDataType class. - /// - /// Name of the data type to show in the graph. can - /// be use with {{graphQueriesTableName}} placeholder - /// Query for indicate last data - /// received - public LastDataReceivedDataType(string name = default(string), string lastDataReceivedQuery = default(string)) - { - Name = name; - LastDataReceivedQuery = lastDataReceivedQuery; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the data type to show in the graph. can be use - /// with {{graphQueriesTableName}} placeholder - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets query for indicate last data received - /// - [JsonProperty(PropertyName = "lastDataReceivedQuery")] - public string LastDataReceivedQuery { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASCheckRequirements.cs deleted file mode 100644 index 2141fe88c009..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASCheckRequirements.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents MCAS (Microsoft Cloud App Security) requirements check - /// request. - /// - [Newtonsoft.Json.JsonObject("MicrosoftCloudAppSecurity")] - [Rest.Serialization.JsonTransformation] - public partial class MCASCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the MCASCheckRequirements class. - /// - public MCASCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MCASCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public MCASCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnector.cs index 75978d4c8e42..92f2d29cfc5c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnector.cs @@ -33,10 +33,6 @@ public MCASDataConnector() /// /// Initializes a new instance of the MCASDataConnector class. /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -46,7 +42,11 @@ public MCASDataConnector() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource - public MCASDataConnector(string tenantId, MCASDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) + /// The tenant id to connect to, and get the + /// data from. + /// The available data types for the + /// connector. + public MCASDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string tenantId = default(string), MCASDataConnectorDataTypes dataTypes = default(MCASDataConnectorDataTypes)) : base(id, name, type, systemData, etag) { TenantId = tenantId; @@ -71,26 +71,5 @@ public MCASDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public MCASDataConnectorDataTypes DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnectorDataTypes.cs index 9e34dbe52654..0c04dc116f3e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnectorDataTypes.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MCASDataConnectorDataTypes.cs @@ -33,7 +33,7 @@ public MCASDataConnectorDataTypes() /// Alerts data type connection. /// Discovery log data type /// connection. - public MCASDataConnectorDataTypes(DataConnectorDataTypeCommon alerts, DataConnectorDataTypeCommon discoveryLogs = default(DataConnectorDataTypeCommon)) + public MCASDataConnectorDataTypes(DataConnectorDataTypeCommon alerts = default(DataConnectorDataTypeCommon), DataConnectorDataTypeCommon discoveryLogs = default(DataConnectorDataTypeCommon)) : base(alerts) { DiscoveryLogs = discoveryLogs; @@ -51,19 +51,5 @@ public MCASDataConnectorDataTypes() [JsonProperty(PropertyName = "discoveryLogs")] public DataConnectorDataTypeCommon DiscoveryLogs { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (DiscoveryLogs != null) - { - DiscoveryLogs.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPCheckRequirements.cs deleted file mode 100644 index 8bf39c59133e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPCheckRequirements.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents MDATP (Microsoft Defender Advanced Threat Protection) - /// requirements check request. - /// - [Newtonsoft.Json.JsonObject("MicrosoftDefenderAdvancedThreatProtection")] - [Rest.Serialization.JsonTransformation] - public partial class MDATPCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the MDATPCheckRequirements class. - /// - public MDATPCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MDATPCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public MDATPCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPDataConnector.cs index cfeaedadc5dd..0f0df5f62b96 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MDATPDataConnector.cs @@ -34,8 +34,6 @@ public MDATPDataConnector() /// /// Initializes a new instance of the MDATPDataConnector class. /// - /// The tenant id to connect to, and get the - /// data from. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -45,9 +43,11 @@ public MDATPDataConnector() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource + /// The tenant id to connect to, and get the + /// data from. /// The available data types for the /// connector. - public MDATPDataConnector(string tenantId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) + public MDATPDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string tenantId = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) : base(id, name, type, systemData, etag) { TenantId = tenantId; @@ -72,22 +72,5 @@ public MDATPDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public AlertsDataTypeOfDataConnector DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs deleted file mode 100644 index 7f6125663aa5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents MLBehaviorAnalytics alert rule. - /// - [Newtonsoft.Json.JsonObject("MLBehaviorAnalytics")] - [Rest.Serialization.JsonTransformation] - public partial class MLBehaviorAnalyticsAlertRule : AlertRule - { - /// - /// Initializes a new instance of the MLBehaviorAnalyticsAlertRule - /// class. - /// - public MLBehaviorAnalyticsAlertRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MLBehaviorAnalyticsAlertRule - /// class. - /// - /// The Name of the alert rule - /// template used to create this rule. - /// Determines whether this alert rule is enabled - /// or disabled. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The description of the alert - /// rule. - /// The display name for alerts created by - /// this alert rule. - /// The last time that this alert rule - /// has been modified. - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// The tactics of the alert rule - /// The techniques of the alert rule - public MLBehaviorAnalyticsAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) - : base(id, name, type, systemData, etag) - { - AlertRuleTemplateName = alertRuleTemplateName; - Description = description; - DisplayName = displayName; - Enabled = enabled; - LastModifiedUtc = lastModifiedUtc; - Severity = severity; - Tactics = tactics; - Techniques = techniques; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Name of the alert rule template used to create - /// this rule. - /// - [JsonProperty(PropertyName = "properties.alertRuleTemplateName")] - public string AlertRuleTemplateName { get; set; } - - /// - /// Gets the description of the alert rule. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - /// - /// Gets the display name for alerts created by this alert rule. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets or sets determines whether this alert rule is enabled or - /// disabled. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool Enabled { get; set; } - - /// - /// Gets the last time that this alert rule has been modified. - /// - [JsonProperty(PropertyName = "properties.lastModifiedUtc")] - public System.DateTime? LastModifiedUtc { get; private set; } - - /// - /// Gets the severity for alerts created by this alert rule. Possible - /// values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "properties.severity")] - public string Severity { get; private set; } - - /// - /// Gets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; private set; } - - /// - /// Gets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AlertRuleTemplateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AlertRuleTemplateName"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs deleted file mode 100644 index ded57cd187ef..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs +++ /dev/null @@ -1,165 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents MLBehaviorAnalytics alert rule template. - /// - [Newtonsoft.Json.JsonObject("MLBehaviorAnalytics")] - [Rest.Serialization.JsonTransformation] - public partial class MLBehaviorAnalyticsAlertRuleTemplate : AlertRuleTemplate - { - /// - /// Initializes a new instance of the - /// MLBehaviorAnalyticsAlertRuleTemplate class. - /// - public MLBehaviorAnalyticsAlertRuleTemplate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// MLBehaviorAnalyticsAlertRuleTemplate class. - /// - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// the number of alert - /// rules that were created by this template - /// The last time that this alert rule - /// template has been updated. - /// The time that this alert rule template - /// has been added. - /// The description of the alert rule - /// template. - /// The display name for alert rule - /// template. - /// The required data sources for - /// this template - /// The alert rule template status. Possible - /// values include: 'Installed', 'Available', 'NotAvailable' - /// The tactics of the alert rule - /// The techniques of the alert rule - public MLBehaviorAnalyticsAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) - : base(id, name, type, systemData) - { - AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - LastUpdatedDateUTC = lastUpdatedDateUTC; - CreatedDateUTC = createdDateUTC; - Description = description; - DisplayName = displayName; - RequiredDataConnectors = requiredDataConnectors; - Status = status; - Tactics = tactics; - Techniques = techniques; - Severity = severity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the number of alert rules that were created by this - /// template - /// - [JsonProperty(PropertyName = "properties.alertRulesCreatedByTemplateCount")] - public int? AlertRulesCreatedByTemplateCount { get; set; } - - /// - /// Gets the last time that this alert rule template has been updated. - /// - [JsonProperty(PropertyName = "properties.lastUpdatedDateUTC")] - public System.DateTime? LastUpdatedDateUTC { get; private set; } - - /// - /// Gets the time that this alert rule template has been added. - /// - [JsonProperty(PropertyName = "properties.createdDateUTC")] - public System.DateTime? CreatedDateUTC { get; private set; } - - /// - /// Gets or sets the description of the alert rule template. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the display name for alert rule template. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the required data sources for this template - /// - [JsonProperty(PropertyName = "properties.requiredDataConnectors")] - public IList RequiredDataConnectors { get; set; } - - /// - /// Gets or sets the alert rule template status. Possible values - /// include: 'Installed', 'Available', 'NotAvailable' - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; set; } - - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - - /// - /// Gets or sets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; set; } - - /// - /// Gets or sets the severity for alerts created by this alert rule. - /// Possible values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "properties.severity")] - public string Severity { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Severity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTICheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTICheckRequirements.cs deleted file mode 100644 index e5c2176c2f64..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTICheckRequirements.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Microsoft Threat Intelligence requirements check request. - /// - [Newtonsoft.Json.JsonObject("MicrosoftThreatIntelligence")] - [Rest.Serialization.JsonTransformation] - public partial class MSTICheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the MSTICheckRequirements class. - /// - public MSTICheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSTICheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public MSTICheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnector.cs deleted file mode 100644 index e1cb6bdd3625..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnector.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Microsoft Threat Intelligence data connector. - /// - [Newtonsoft.Json.JsonObject("MicrosoftThreatIntelligence")] - [Rest.Serialization.JsonTransformation] - public partial class MSTIDataConnector : DataConnector - { - /// - /// Initializes a new instance of the MSTIDataConnector class. - /// - public MSTIDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSTIDataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public MSTIDataConnector(string tenantId, MSTIDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public MSTIDataConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypes.cs deleted file mode 100644 index 3cf83d17cd1d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypes.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Microsoft Threat Intelligence Platforms - /// data connector. - /// - public partial class MSTIDataConnectorDataTypes - { - /// - /// Initializes a new instance of the MSTIDataConnectorDataTypes class. - /// - public MSTIDataConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSTIDataConnectorDataTypes class. - /// - /// Data type for Microsoft Threat - /// Intelligence Platforms data connector. - /// Data type for Microsoft - /// Threat Intelligence Platforms data connector. - public MSTIDataConnectorDataTypes(MSTIDataConnectorDataTypesBingSafetyPhishingURL bingSafetyPhishingURL, MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed) - { - BingSafetyPhishingURL = bingSafetyPhishingURL; - MicrosoftEmergingThreatFeed = microsoftEmergingThreatFeed; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets data type for Microsoft Threat Intelligence Platforms - /// data connector. - /// - [JsonProperty(PropertyName = "bingSafetyPhishingURL")] - public MSTIDataConnectorDataTypesBingSafetyPhishingURL BingSafetyPhishingURL { get; set; } - - /// - /// Gets or sets data type for Microsoft Threat Intelligence Platforms - /// data connector. - /// - [JsonProperty(PropertyName = "microsoftEmergingThreatFeed")] - public MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed MicrosoftEmergingThreatFeed { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (BingSafetyPhishingURL == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "BingSafetyPhishingURL"); - } - if (MicrosoftEmergingThreatFeed == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "MicrosoftEmergingThreatFeed"); - } - if (BingSafetyPhishingURL != null) - { - BingSafetyPhishingURL.Validate(); - } - if (MicrosoftEmergingThreatFeed != null) - { - MicrosoftEmergingThreatFeed.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesBingSafetyPhishingURL.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesBingSafetyPhishingURL.cs deleted file mode 100644 index 2677ca78ee99..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesBingSafetyPhishingURL.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Data type for Microsoft Threat Intelligence Platforms data connector. - /// - public partial class MSTIDataConnectorDataTypesBingSafetyPhishingURL : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// MSTIDataConnectorDataTypesBingSafetyPhishingURL class. - /// - public MSTIDataConnectorDataTypesBingSafetyPhishingURL() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// MSTIDataConnectorDataTypesBingSafetyPhishingURL class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - /// lookback period - public MSTIDataConnectorDataTypesBingSafetyPhishingURL(string state, string lookbackPeriod) - : base(state) - { - LookbackPeriod = lookbackPeriod; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets lookback period - /// - [JsonProperty(PropertyName = "lookbackPeriod")] - public string LookbackPeriod { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (LookbackPeriod == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "LookbackPeriod"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed.cs deleted file mode 100644 index def7500ee938..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Data type for Microsoft Threat Intelligence Platforms data connector. - /// - public partial class MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed class. - /// - public MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - /// lookback period - public MSTIDataConnectorDataTypesMicrosoftEmergingThreatFeed(string state, string lookbackPeriod) - : base(state) - { - LookbackPeriod = lookbackPeriod; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets lookback period - /// - [JsonProperty(PropertyName = "lookbackPeriod")] - public string LookbackPeriod { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (LookbackPeriod == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "LookbackPeriod"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnector.cs deleted file mode 100644 index cdcc1410708f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnector.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents MTP (Microsoft Threat Protection) data connector. - /// - [Newtonsoft.Json.JsonObject("MicrosoftThreatProtection")] - [Rest.Serialization.JsonTransformation] - public partial class MTPDataConnector : DataConnector - { - /// - /// Initializes a new instance of the MTPDataConnector class. - /// - public MTPDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MTPDataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public MTPDataConnector(string tenantId, MTPDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public MTPDataConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypes.cs deleted file mode 100644 index f915074d96ea..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypes.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Microsoft Threat Protection Platforms data - /// connector. - /// - public partial class MTPDataConnectorDataTypes - { - /// - /// Initializes a new instance of the MTPDataConnectorDataTypes class. - /// - public MTPDataConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MTPDataConnectorDataTypes class. - /// - /// Data type for Microsoft Threat Protection - /// Platforms data connector. - public MTPDataConnectorDataTypes(MTPDataConnectorDataTypesIncidents incidents) - { - Incidents = incidents; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets data type for Microsoft Threat Protection Platforms - /// data connector. - /// - [JsonProperty(PropertyName = "incidents")] - public MTPDataConnectorDataTypesIncidents Incidents { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Incidents == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Incidents"); - } - if (Incidents != null) - { - Incidents.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypesIncidents.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypesIncidents.cs deleted file mode 100644 index 9f99cdec5bc4..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MTPDataConnectorDataTypesIncidents.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Data type for Microsoft Threat Protection Platforms data connector. - /// - public partial class MTPDataConnectorDataTypesIncidents : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// MTPDataConnectorDataTypesIncidents class. - /// - public MTPDataConnectorDataTypesIncidents() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// MTPDataConnectorDataTypesIncidents class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - public MTPDataConnectorDataTypesIncidents(string state) - : base(state) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs deleted file mode 100644 index c08cd2d0689a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ManualTriggerRequestBody - { - /// - /// Initializes a new instance of the ManualTriggerRequestBody class. - /// - public ManualTriggerRequestBody() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ManualTriggerRequestBody class. - /// - public ManualTriggerRequestBody(System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string)) - { - TenantId = tenantId; - LogicAppsResourceId = logicAppsResourceId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "tenantId")] - public System.Guid? TenantId { get; set; } - - /// - /// - [JsonProperty(PropertyName = "logicAppsResourceId")] - public string LogicAppsResourceId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataAuthor.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataAuthor.cs deleted file mode 100644 index 935c27b32e80..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataAuthor.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Publisher or creator of the content item. - /// - public partial class MetadataAuthor - { - /// - /// Initializes a new instance of the MetadataAuthor class. - /// - public MetadataAuthor() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataAuthor class. - /// - /// Name of the author. Company or person. - /// Email of author contact - /// Link for author/vendor page - public MetadataAuthor(string name = default(string), string email = default(string), string link = default(string)) - { - Name = name; - Email = email; - Link = link; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the author. Company or person. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets email of author contact - /// - [JsonProperty(PropertyName = "email")] - public string Email { get; set; } - - /// - /// Gets or sets link for author/vendor page - /// - [JsonProperty(PropertyName = "link")] - public string Link { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataCategories.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataCategories.cs deleted file mode 100644 index 81c2220f2e66..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataCategories.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ies for the solution content item - /// - public partial class MetadataCategories - { - /// - /// Initializes a new instance of the MetadataCategories class. - /// - public MetadataCategories() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataCategories class. - /// - /// domain for the solution content item - /// Industry verticals for the solution content - /// item - public MetadataCategories(IList domains = default(IList), IList verticals = default(IList)) - { - Domains = domains; - Verticals = verticals; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets domain for the solution content item - /// - [JsonProperty(PropertyName = "domains")] - public IList Domains { get; set; } - - /// - /// Gets or sets industry verticals for the solution content item - /// - [JsonProperty(PropertyName = "verticals")] - public IList Verticals { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs deleted file mode 100644 index 98029a7ff2c0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Dependencies for the content item, what other content items it requires - /// to work. Can describe more complex dependencies using a - /// recursive/nested structure. For a single dependency an id/kind/version - /// can be supplied or operator/criteria for complex dependencies. - /// - public partial class MetadataDependencies - { - /// - /// Initializes a new instance of the MetadataDependencies class. - /// - public MetadataDependencies() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataDependencies class. - /// - /// Id of the content item we depend on - /// Type of the content item we depend on. Possible - /// values include: 'DataConnector', 'DataType', 'Workbook', - /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', - /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', - /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', - /// 'AutomationRule' - /// Version of the the content item we depend on. - /// Can be blank, * or missing to indicate any version fulfills the - /// dependency. If version does not match our defined numeric format - /// then an exact match is required. - /// Name of the content item - /// Operator used for list of - /// dependencies in criteria array. Possible values include: 'AND', - /// 'OR' - /// This is the list of dependencies we must - /// fulfill, according to the AND/OR operator - public MetadataDependencies(string contentId = default(string), string kind = default(string), string version = default(string), string name = default(string), string operatorProperty = default(string), IList criteria = default(IList)) - { - ContentId = contentId; - Kind = kind; - Version = version; - Name = name; - OperatorProperty = operatorProperty; - Criteria = criteria; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets id of the content item we depend on - /// - [JsonProperty(PropertyName = "contentId")] - public string ContentId { get; set; } - - /// - /// Gets or sets type of the content item we depend on. Possible values - /// include: 'DataConnector', 'DataType', 'Workbook', - /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', - /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', - /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', - /// 'AutomationRule' - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets or sets version of the the content item we depend on. Can be - /// blank, * or missing to indicate any version fulfills the - /// dependency. If version does not match our defined numeric format - /// then an exact match is required. - /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - - /// - /// Gets or sets name of the content item - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets operator used for list of dependencies in criteria - /// array. Possible values include: 'AND', 'OR' - /// - [JsonProperty(PropertyName = "operator")] - public string OperatorProperty { get; set; } - - /// - /// Gets or sets this is the list of dependencies we must fulfill, - /// according to the AND/OR operator - /// - [JsonProperty(PropertyName = "criteria")] - public IList Criteria { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs deleted file mode 100644 index 6ab752384424..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs +++ /dev/null @@ -1,297 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Metadata resource definition. - /// - [Rest.Serialization.JsonTransformation] - public partial class MetadataModel : ResourceWithEtag - { - /// - /// Initializes a new instance of the MetadataModel class. - /// - public MetadataModel() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataModel class. - /// - /// Full parent resource ID of the content item - /// the metadata is for. This is the full resource ID including the - /// scope (subscription and resource group) - /// The kind of content the metadata is for. - /// Possible values include: 'DataConnector', 'DataType', 'Workbook', - /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', - /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', - /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', - /// 'AutomationRule' - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Static ID for the content. Used to - /// identify dependencies and content from solutions or community. - /// Hard-coded/static for out of the box content and solutions. Dynamic - /// for user-created. This is the resource name - /// Version of the content. Default and - /// recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), - /// following ARM template best practices. Can also be any string, but - /// then we cannot guarantee any version checks - /// Source of the content. This is where/how it - /// was created. - /// The creator of the content item. - /// Support information for the metadata - type, - /// name, contact information - /// Dependencies for the content item, what - /// other content items it requires to work. Can describe more complex - /// dependencies using a recursive/nested structure. For a single - /// dependency an id/kind/version can be supplied or operator/criteria - /// for complex formats. - /// Categories for the solution content - /// item - /// Providers for the solution content - /// item - /// first publish date solution content - /// item - /// last publish date for the solution - /// content item - /// The custom version of the content. A - /// optional free text - /// Schema version of the content. - /// Can be used to distinguish between different flow based on the - /// schema version - /// the icon identifier. this id can later be - /// fetched from the solution template - /// the tactics the resource - /// covers - /// the techniques the resource - /// covers, these have to be aligned with the tactics being - /// used - /// preview image file names. These will be - /// taken from the solution artifacts - /// preview image file names. These - /// will be taken from the solution artifacts. used for dark theme - /// support - public MetadataModel(string parentId, string kind, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string contentId = default(string), string version = default(string), MetadataSource source = default(MetadataSource), MetadataAuthor author = default(MetadataAuthor), MetadataSupport support = default(MetadataSupport), MetadataDependencies dependencies = default(MetadataDependencies), MetadataCategories categories = default(MetadataCategories), IList providers = default(IList), System.DateTime? firstPublishDate = default(System.DateTime?), System.DateTime? lastPublishDate = default(System.DateTime?), string customVersion = default(string), string contentSchemaVersion = default(string), string icon = default(string), IList threatAnalysisTactics = default(IList), IList threatAnalysisTechniques = default(IList), IList previewImages = default(IList), IList previewImagesDark = default(IList)) - : base(id, name, type, systemData, etag) - { - ContentId = contentId; - ParentId = parentId; - Version = version; - Kind = kind; - Source = source; - Author = author; - Support = support; - Dependencies = dependencies; - Categories = categories; - Providers = providers; - FirstPublishDate = firstPublishDate; - LastPublishDate = lastPublishDate; - CustomVersion = customVersion; - ContentSchemaVersion = contentSchemaVersion; - Icon = icon; - ThreatAnalysisTactics = threatAnalysisTactics; - ThreatAnalysisTechniques = threatAnalysisTechniques; - PreviewImages = previewImages; - PreviewImagesDark = previewImagesDark; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets static ID for the content. Used to identify - /// dependencies and content from solutions or community. - /// Hard-coded/static for out of the box content and solutions. Dynamic - /// for user-created. This is the resource name - /// - [JsonProperty(PropertyName = "properties.contentId")] - public string ContentId { get; set; } - - /// - /// Gets or sets full parent resource ID of the content item the - /// metadata is for. This is the full resource ID including the scope - /// (subscription and resource group) - /// - [JsonProperty(PropertyName = "properties.parentId")] - public string ParentId { get; set; } - - /// - /// Gets or sets version of the content. Default and recommended - /// format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM - /// template best practices. Can also be any string, but then we - /// cannot guarantee any version checks - /// - [JsonProperty(PropertyName = "properties.version")] - public string Version { get; set; } - - /// - /// Gets or sets the kind of content the metadata is for. Possible - /// values include: 'DataConnector', 'DataType', 'Workbook', - /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', - /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', - /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', - /// 'AutomationRule' - /// - [JsonProperty(PropertyName = "properties.kind")] - public string Kind { get; set; } - - /// - /// Gets or sets source of the content. This is where/how it was - /// created. - /// - [JsonProperty(PropertyName = "properties.source")] - public MetadataSource Source { get; set; } - - /// - /// Gets or sets the creator of the content item. - /// - [JsonProperty(PropertyName = "properties.author")] - public MetadataAuthor Author { get; set; } - - /// - /// Gets or sets support information for the metadata - type, name, - /// contact information - /// - [JsonProperty(PropertyName = "properties.support")] - public MetadataSupport Support { get; set; } - - /// - /// Gets or sets dependencies for the content item, what other content - /// items it requires to work. Can describe more complex dependencies - /// using a recursive/nested structure. For a single dependency an - /// id/kind/version can be supplied or operator/criteria for complex - /// formats. - /// - [JsonProperty(PropertyName = "properties.dependencies")] - public MetadataDependencies Dependencies { get; set; } - - /// - /// Gets or sets categories for the solution content item - /// - [JsonProperty(PropertyName = "properties.categories")] - public MetadataCategories Categories { get; set; } - - /// - /// Gets or sets providers for the solution content item - /// - [JsonProperty(PropertyName = "properties.providers")] - public IList Providers { get; set; } - - /// - /// Gets or sets first publish date solution content item - /// - [JsonConverter(typeof(DateJsonConverter))] - [JsonProperty(PropertyName = "properties.firstPublishDate")] - public System.DateTime? FirstPublishDate { get; set; } - - /// - /// Gets or sets last publish date for the solution content item - /// - [JsonConverter(typeof(DateJsonConverter))] - [JsonProperty(PropertyName = "properties.lastPublishDate")] - public System.DateTime? LastPublishDate { get; set; } - - /// - /// Gets or sets the custom version of the content. A optional free - /// text - /// - [JsonProperty(PropertyName = "properties.customVersion")] - public string CustomVersion { get; set; } - - /// - /// Gets or sets schema version of the content. Can be used to - /// distinguish between different flow based on the schema version - /// - [JsonProperty(PropertyName = "properties.contentSchemaVersion")] - public string ContentSchemaVersion { get; set; } - - /// - /// Gets or sets the icon identifier. this id can later be fetched from - /// the solution template - /// - [JsonProperty(PropertyName = "properties.icon")] - public string Icon { get; set; } - - /// - /// Gets or sets the tactics the resource covers - /// - [JsonProperty(PropertyName = "properties.threatAnalysisTactics")] - public IList ThreatAnalysisTactics { get; set; } - - /// - /// Gets or sets the techniques the resource covers, these have to be - /// aligned with the tactics being used - /// - [JsonProperty(PropertyName = "properties.threatAnalysisTechniques")] - public IList ThreatAnalysisTechniques { get; set; } - - /// - /// Gets or sets preview image file names. These will be taken from the - /// solution artifacts - /// - [JsonProperty(PropertyName = "properties.previewImages")] - public IList PreviewImages { get; set; } - - /// - /// Gets or sets preview image file names. These will be taken from the - /// solution artifacts. used for dark theme support - /// - [JsonProperty(PropertyName = "properties.previewImagesDark")] - public IList PreviewImagesDark { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ParentId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ParentId"); - } - if (Kind == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); - } - if (Source != null) - { - Source.Validate(); - } - if (Support != null) - { - Support.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs deleted file mode 100644 index 551a98ce1556..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs +++ /dev/null @@ -1,289 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Metadata patch request body. - /// - [Rest.Serialization.JsonTransformation] - public partial class MetadataPatch : ResourceWithEtag - { - /// - /// Initializes a new instance of the MetadataPatch class. - /// - public MetadataPatch() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataPatch class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// Static ID for the content. Used to - /// identify dependencies and content from solutions or community. - /// Hard-coded/static for out of the box content and solutions. Dynamic - /// for user-created. This is the resource name - /// Full parent resource ID of the content item - /// the metadata is for. This is the full resource ID including the - /// scope (subscription and resource group) - /// Version of the content. Default and - /// recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), - /// following ARM template best practices. Can also be any string, but - /// then we cannot guarantee any version checks - /// The kind of content the metadata is for. - /// Possible values include: 'DataConnector', 'DataType', 'Workbook', - /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', - /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', - /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', - /// 'AutomationRule' - /// Source of the content. This is where/how it - /// was created. - /// The creator of the content item. - /// Support information for the metadata - type, - /// name, contact information - /// Dependencies for the content item, what - /// other content items it requires to work. Can describe more complex - /// dependencies using a recursive/nested structure. For a single - /// dependency an id/kind/version can be supplied or operator/criteria - /// for complex formats. - /// Categories for the solution content - /// item - /// Providers for the solution content - /// item - /// first publish date solution content - /// item - /// last publish date for the solution - /// content item - /// The custom version of the content. A - /// optional free text - /// Schema version of the content. - /// Can be used to distinguish between different flow based on the - /// schema version - /// the icon identifier. this id can later be - /// fetched from the solution template - /// the tactics the resource - /// covers - /// the techniques the resource - /// covers, these have to be aligned with the tactics being - /// used - /// preview image file names. These will be - /// taken from the solution artifacts - /// preview image file names. These - /// will be taken from the solution artifacts. used for dark theme - /// support - public MetadataPatch(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string contentId = default(string), string parentId = default(string), string version = default(string), string kind = default(string), MetadataSource source = default(MetadataSource), MetadataAuthor author = default(MetadataAuthor), MetadataSupport support = default(MetadataSupport), MetadataDependencies dependencies = default(MetadataDependencies), MetadataCategories categories = default(MetadataCategories), IList providers = default(IList), System.DateTime? firstPublishDate = default(System.DateTime?), System.DateTime? lastPublishDate = default(System.DateTime?), string customVersion = default(string), string contentSchemaVersion = default(string), string icon = default(string), IList threatAnalysisTactics = default(IList), IList threatAnalysisTechniques = default(IList), IList previewImages = default(IList), IList previewImagesDark = default(IList)) - : base(id, name, type, systemData, etag) - { - ContentId = contentId; - ParentId = parentId; - Version = version; - Kind = kind; - Source = source; - Author = author; - Support = support; - Dependencies = dependencies; - Categories = categories; - Providers = providers; - FirstPublishDate = firstPublishDate; - LastPublishDate = lastPublishDate; - CustomVersion = customVersion; - ContentSchemaVersion = contentSchemaVersion; - Icon = icon; - ThreatAnalysisTactics = threatAnalysisTactics; - ThreatAnalysisTechniques = threatAnalysisTechniques; - PreviewImages = previewImages; - PreviewImagesDark = previewImagesDark; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets static ID for the content. Used to identify - /// dependencies and content from solutions or community. - /// Hard-coded/static for out of the box content and solutions. Dynamic - /// for user-created. This is the resource name - /// - [JsonProperty(PropertyName = "properties.contentId")] - public string ContentId { get; set; } - - /// - /// Gets or sets full parent resource ID of the content item the - /// metadata is for. This is the full resource ID including the scope - /// (subscription and resource group) - /// - [JsonProperty(PropertyName = "properties.parentId")] - public string ParentId { get; set; } - - /// - /// Gets or sets version of the content. Default and recommended - /// format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM - /// template best practices. Can also be any string, but then we - /// cannot guarantee any version checks - /// - [JsonProperty(PropertyName = "properties.version")] - public string Version { get; set; } - - /// - /// Gets or sets the kind of content the metadata is for. Possible - /// values include: 'DataConnector', 'DataType', 'Workbook', - /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', - /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', - /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', - /// 'AutomationRule' - /// - [JsonProperty(PropertyName = "properties.kind")] - public string Kind { get; set; } - - /// - /// Gets or sets source of the content. This is where/how it was - /// created. - /// - [JsonProperty(PropertyName = "properties.source")] - public MetadataSource Source { get; set; } - - /// - /// Gets or sets the creator of the content item. - /// - [JsonProperty(PropertyName = "properties.author")] - public MetadataAuthor Author { get; set; } - - /// - /// Gets or sets support information for the metadata - type, name, - /// contact information - /// - [JsonProperty(PropertyName = "properties.support")] - public MetadataSupport Support { get; set; } - - /// - /// Gets or sets dependencies for the content item, what other content - /// items it requires to work. Can describe more complex dependencies - /// using a recursive/nested structure. For a single dependency an - /// id/kind/version can be supplied or operator/criteria for complex - /// formats. - /// - [JsonProperty(PropertyName = "properties.dependencies")] - public MetadataDependencies Dependencies { get; set; } - - /// - /// Gets or sets categories for the solution content item - /// - [JsonProperty(PropertyName = "properties.categories")] - public MetadataCategories Categories { get; set; } - - /// - /// Gets or sets providers for the solution content item - /// - [JsonProperty(PropertyName = "properties.providers")] - public IList Providers { get; set; } - - /// - /// Gets or sets first publish date solution content item - /// - [JsonConverter(typeof(DateJsonConverter))] - [JsonProperty(PropertyName = "properties.firstPublishDate")] - public System.DateTime? FirstPublishDate { get; set; } - - /// - /// Gets or sets last publish date for the solution content item - /// - [JsonConverter(typeof(DateJsonConverter))] - [JsonProperty(PropertyName = "properties.lastPublishDate")] - public System.DateTime? LastPublishDate { get; set; } - - /// - /// Gets or sets the custom version of the content. A optional free - /// text - /// - [JsonProperty(PropertyName = "properties.customVersion")] - public string CustomVersion { get; set; } - - /// - /// Gets or sets schema version of the content. Can be used to - /// distinguish between different flow based on the schema version - /// - [JsonProperty(PropertyName = "properties.contentSchemaVersion")] - public string ContentSchemaVersion { get; set; } - - /// - /// Gets or sets the icon identifier. this id can later be fetched from - /// the solution template - /// - [JsonProperty(PropertyName = "properties.icon")] - public string Icon { get; set; } - - /// - /// Gets or sets the tactics the resource covers - /// - [JsonProperty(PropertyName = "properties.threatAnalysisTactics")] - public IList ThreatAnalysisTactics { get; set; } - - /// - /// Gets or sets the techniques the resource covers, these have to be - /// aligned with the tactics being used - /// - [JsonProperty(PropertyName = "properties.threatAnalysisTechniques")] - public IList ThreatAnalysisTechniques { get; set; } - - /// - /// Gets or sets preview image file names. These will be taken from the - /// solution artifacts - /// - [JsonProperty(PropertyName = "properties.previewImages")] - public IList PreviewImages { get; set; } - - /// - /// Gets or sets preview image file names. These will be taken from the - /// solution artifacts. used for dark theme support - /// - [JsonProperty(PropertyName = "properties.previewImagesDark")] - public IList PreviewImagesDark { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Source != null) - { - Source.Validate(); - } - if (Support != null) - { - Support.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSource.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSource.cs deleted file mode 100644 index ce9528ca8191..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSource.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The original source of the content item, where it comes from. - /// - public partial class MetadataSource - { - /// - /// Initializes a new instance of the MetadataSource class. - /// - public MetadataSource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataSource class. - /// - /// Source type of the content. Possible values - /// include: 'LocalWorkspace', 'Community', 'Solution', - /// 'SourceRepository' - /// Name of the content source. The repo name, - /// solution name, LA workspace name etc. - /// ID of the content source. The solution ID, - /// workspace ID, etc - public MetadataSource(string kind, string name = default(string), string sourceId = default(string)) - { - Kind = kind; - Name = name; - SourceId = sourceId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets source type of the content. Possible values include: - /// 'LocalWorkspace', 'Community', 'Solution', 'SourceRepository' - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets or sets name of the content source. The repo name, solution - /// name, LA workspace name etc. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets ID of the content source. The solution ID, workspace - /// ID, etc - /// - [JsonProperty(PropertyName = "sourceId")] - public string SourceId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Kind == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSupport.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSupport.cs deleted file mode 100644 index 0f9a81c34077..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataSupport.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Support information for the content item. - /// - public partial class MetadataSupport - { - /// - /// Initializes a new instance of the MetadataSupport class. - /// - public MetadataSupport() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetadataSupport class. - /// - /// Type of support for content item. Possible - /// values include: 'Microsoft', 'Partner', 'Community' - /// Name of the support contact. Company or - /// person. - /// Email of support contact - /// Link for support help, like to support page to - /// open a ticket etc. - public MetadataSupport(string tier, string name = default(string), string email = default(string), string link = default(string)) - { - Tier = tier; - Name = name; - Email = email; - Link = link; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets type of support for content item. Possible values - /// include: 'Microsoft', 'Partner', 'Community' - /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } - - /// - /// Gets or sets name of the support contact. Company or person. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets email of support contact - /// - [JsonProperty(PropertyName = "email")] - public string Email { get; set; } - - /// - /// Gets or sets link for support help, like to support page to open a - /// ticket etc. - /// - [JsonProperty(PropertyName = "link")] - public string Link { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Tier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Tier"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.cs index c0379d7f9783..2603ccb07ba1 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.cs @@ -41,8 +41,7 @@ public MicrosoftSecurityIncidentCreationAlertRule() /// cases will be generated. Possible values include: 'Microsoft Cloud /// App Security', 'Azure Security Center', 'Azure Advanced Threat /// Protection', 'Azure Active Directory Identity Protection', 'Azure - /// Security Center for IoT', 'Office 365 Advanced Threat Protection', - /// 'Microsoft Defender Advanced Threat Protection' + /// Security Center for IoT' /// The display name for alerts created by /// this alert rule. /// Determines whether this alert rule is enabled @@ -107,8 +106,7 @@ public MicrosoftSecurityIncidentCreationAlertRule() /// generated. Possible values include: 'Microsoft Cloud App Security', /// 'Azure Security Center', 'Azure Advanced Threat Protection', 'Azure /// Active Directory Identity Protection', 'Azure Security Center for - /// IoT', 'Office 365 Advanced Threat Protection', 'Microsoft Defender - /// Advanced Threat Protection' + /// IoT' /// [JsonProperty(PropertyName = "properties.productFilter")] public string ProductFilter { get; set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.cs index 0ba49b7cad1a..a5aa31e08a1a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.cs @@ -38,8 +38,7 @@ public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties() /// cases will be generated. Possible values include: 'Microsoft Cloud /// App Security', 'Azure Security Center', 'Azure Advanced Threat /// Protection', 'Azure Active Directory Identity Protection', 'Azure - /// Security Center for IoT', 'Office 365 Advanced Threat Protection', - /// 'Microsoft Defender Advanced Threat Protection' + /// Security Center for IoT' /// the alerts' displayNames on which /// the cases will be generated /// the alerts' displayNames on @@ -79,8 +78,7 @@ public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties() /// generated. Possible values include: 'Microsoft Cloud App Security', /// 'Azure Security Center', 'Azure Advanced Threat Protection', 'Azure /// Active Directory Identity Protection', 'Azure Security Center for - /// IoT', 'Office 365 Advanced Threat Protection', 'Microsoft Defender - /// Advanced Threat Protection' + /// IoT' /// [JsonProperty(PropertyName = "productFilter")] public string ProductFilter { get; set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.cs index 6441fd4d9518..3992c50a5cee 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.cs @@ -37,6 +37,11 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() /// Initializes a new instance of the /// MicrosoftSecurityIncidentCreationAlertRuleTemplate class. /// + /// The alerts' productName on which the + /// cases will be generated. Possible values include: 'Microsoft Cloud + /// App Security', 'Azure Security Center', 'Azure Advanced Threat + /// Protection', 'Azure Active Directory Identity Protection', 'Azure + /// Security Center for IoT' /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -47,36 +52,30 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() /// createdBy and modifiedBy information. /// the number of alert /// rules that were created by this template - /// The last time that this alert rule - /// template has been updated. /// The time that this alert rule template /// has been added. + /// The time that this alert rule + /// template was last updated. /// The description of the alert rule /// template. /// The display name for alert rule /// template. - /// The required data sources for - /// this template + /// The required data connectors + /// for this template /// The alert rule template status. Possible /// values include: 'Installed', 'Available', 'NotAvailable' /// the alerts' displayNames on which /// the cases will be generated /// the alerts' displayNames on /// which the cases will not be generated - /// The alerts' productName on which the - /// cases will be generated. Possible values include: 'Microsoft Cloud - /// App Security', 'Azure Security Center', 'Azure Advanced Threat - /// Protection', 'Azure Active Directory Identity Protection', 'Azure - /// Security Center for IoT', 'Office 365 Advanced Threat Protection', - /// 'Microsoft Defender Advanced Threat Protection' /// the alerts' severities on which the /// cases will be generated - public MicrosoftSecurityIncidentCreationAlertRuleTemplate(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList displayNamesFilter = default(IList), IList displayNamesExcludeFilter = default(IList), string productFilter = default(string), IList severitiesFilter = default(IList)) + public MicrosoftSecurityIncidentCreationAlertRuleTemplate(string productFilter, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? createdDateUTC = default(System.DateTime?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList displayNamesFilter = default(IList), IList displayNamesExcludeFilter = default(IList), IList severitiesFilter = default(IList)) : base(id, name, type, systemData) { AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - LastUpdatedDateUTC = lastUpdatedDateUTC; CreatedDateUTC = createdDateUTC; + LastUpdatedDateUTC = lastUpdatedDateUTC; Description = description; DisplayName = displayName; RequiredDataConnectors = requiredDataConnectors; @@ -100,18 +99,18 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() [JsonProperty(PropertyName = "properties.alertRulesCreatedByTemplateCount")] public int? AlertRulesCreatedByTemplateCount { get; set; } - /// - /// Gets the last time that this alert rule template has been updated. - /// - [JsonProperty(PropertyName = "properties.lastUpdatedDateUTC")] - public System.DateTime? LastUpdatedDateUTC { get; private set; } - /// /// Gets the time that this alert rule template has been added. /// [JsonProperty(PropertyName = "properties.createdDateUTC")] public System.DateTime? CreatedDateUTC { get; private set; } + /// + /// Gets the time that this alert rule template was last updated. + /// + [JsonProperty(PropertyName = "properties.lastUpdatedDateUTC")] + public System.DateTime? LastUpdatedDateUTC { get; private set; } + /// /// Gets or sets the description of the alert rule template. /// @@ -125,7 +124,7 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() public string DisplayName { get; set; } /// - /// Gets or sets the required data sources for this template + /// Gets or sets the required data connectors for this template /// [JsonProperty(PropertyName = "properties.requiredDataConnectors")] public IList RequiredDataConnectors { get; set; } @@ -156,8 +155,7 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() /// generated. Possible values include: 'Microsoft Cloud App Security', /// 'Azure Security Center', 'Azure Advanced Threat Protection', 'Azure /// Active Directory Identity Protection', 'Azure Security Center for - /// IoT', 'Office 365 Advanced Threat Protection', 'Microsoft Defender - /// Advanced Threat Protection' + /// IoT' /// [JsonProperty(PropertyName = "properties.productFilter")] public string ProductFilter { get; set; } @@ -169,5 +167,18 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() [JsonProperty(PropertyName = "properties.severitiesFilter")] public IList SeveritiesFilter { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ProductFilter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ProductFilter"); + } + } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityProductName.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityProductName.cs index f0652cf74a91..253b3b48f9ca 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityProductName.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MicrosoftSecurityProductName.cs @@ -21,7 +21,5 @@ public static class MicrosoftSecurityProductName public const string AzureAdvancedThreatProtection = "Azure Advanced Threat Protection"; public const string AzureActiveDirectoryIdentityProtection = "Azure Active Directory Identity Protection"; public const string AzureSecurityCenterforIoT = "Azure Security Center for IoT"; - public const string Office365AdvancedThreatProtection = "Office 365 Advanced Threat Protection"; - public const string MicrosoftDefenderAdvancedThreatProtection = "Microsoft Defender Advanced Threat Protection"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MtpCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MtpCheckRequirements.cs deleted file mode 100644 index 3eab2c1fda1e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MtpCheckRequirements.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents MTP (Microsoft Threat Protection) requirements check - /// request. - /// - [Newtonsoft.Json.JsonObject("MicrosoftThreatProtection")] - [Rest.Serialization.JsonTransformation] - public partial class MtpCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the MtpCheckRequirements class. - /// - public MtpCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MtpCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public MtpCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs deleted file mode 100644 index 2023fb4b39a0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs +++ /dev/null @@ -1,239 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents NRT alert rule. - /// - [Newtonsoft.Json.JsonObject("NRT")] - [Rest.Serialization.JsonTransformation] - public partial class NrtAlertRule : AlertRule - { - /// - /// Initializes a new instance of the NrtAlertRule class. - /// - public NrtAlertRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NrtAlertRule class. - /// - /// The query that creates alerts for this - /// rule. - /// The display name for alerts created by - /// this alert rule. - /// Determines whether this alert rule is enabled - /// or disabled. - /// The suppression (in ISO 8601 - /// duration format) to wait since last time this alert rule been - /// triggered. - /// Determines whether the suppression - /// for this alert rule is enabled or disabled. - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The Name of the alert rule - /// template used to create this rule. - /// 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> - /// The description of the alert - /// rule. - /// The tactics of the alert rule - /// The techniques of the alert rule - /// The last time that this alert rule - /// has been modified. - /// The settings of the incidents - /// that created from alerts triggered by this analytics rule - /// Dictionary of string key-value pairs of - /// columns to be attached to the alert - /// Array of the entity mappings of the - /// alert rule - /// The alert details override - /// settings - public NrtAlertRule(string query, string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), IList tactics = default(IList), IList techniques = default(IList), System.DateTime? lastModifiedUtc = default(System.DateTime?), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) - : base(id, name, type, systemData, etag) - { - AlertRuleTemplateName = alertRuleTemplateName; - TemplateVersion = templateVersion; - Description = description; - Query = query; - Tactics = tactics; - Techniques = techniques; - DisplayName = displayName; - Enabled = enabled; - LastModifiedUtc = lastModifiedUtc; - SuppressionDuration = suppressionDuration; - SuppressionEnabled = suppressionEnabled; - Severity = severity; - IncidentConfiguration = incidentConfiguration; - CustomDetails = customDetails; - EntityMappings = entityMappings; - AlertDetailsOverride = alertDetailsOverride; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Name of the alert rule template used to create - /// this rule. - /// - [JsonProperty(PropertyName = "properties.alertRuleTemplateName")] - public string AlertRuleTemplateName { get; set; } - - /// - /// Gets or sets the version of the alert rule template used to create - /// this rule - in format &lt;a.b.c&gt;, where all are numbers, - /// for example 0 &lt;1.0.2&gt; - /// - [JsonProperty(PropertyName = "properties.templateVersion")] - public string TemplateVersion { get; set; } - - /// - /// Gets or sets the description of the alert rule. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the query that creates alerts for this rule. - /// - [JsonProperty(PropertyName = "properties.query")] - public string Query { get; set; } - - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - - /// - /// Gets or sets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; set; } - - /// - /// Gets or sets the display name for alerts created by this alert - /// rule. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets determines whether this alert rule is enabled or - /// disabled. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool Enabled { get; set; } - - /// - /// Gets the last time that this alert rule has been modified. - /// - [JsonProperty(PropertyName = "properties.lastModifiedUtc")] - public System.DateTime? LastModifiedUtc { get; private set; } - - /// - /// Gets or sets the suppression (in ISO 8601 duration format) to wait - /// since last time this alert rule been triggered. - /// - [JsonProperty(PropertyName = "properties.suppressionDuration")] - public System.TimeSpan SuppressionDuration { get; set; } - - /// - /// Gets or sets determines whether the suppression for this alert rule - /// is enabled or disabled. - /// - [JsonProperty(PropertyName = "properties.suppressionEnabled")] - public bool SuppressionEnabled { get; set; } - - /// - /// Gets or sets the severity for alerts created by this alert rule. - /// Possible values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "properties.severity")] - public string Severity { get; set; } - - /// - /// Gets or sets the settings of the incidents that created from alerts - /// triggered by this analytics rule - /// - [JsonProperty(PropertyName = "properties.incidentConfiguration")] - public IncidentConfiguration IncidentConfiguration { get; set; } - - /// - /// Gets or sets dictionary of string key-value pairs of columns to be - /// attached to the alert - /// - [JsonProperty(PropertyName = "properties.customDetails")] - public IDictionary CustomDetails { get; set; } - - /// - /// Gets or sets array of the entity mappings of the alert rule - /// - [JsonProperty(PropertyName = "properties.entityMappings")] - public IList EntityMappings { get; set; } - - /// - /// Gets or sets the alert details override settings - /// - [JsonProperty(PropertyName = "properties.alertDetailsOverride")] - public AlertDetailsOverride AlertDetailsOverride { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Query == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Query"); - } - if (DisplayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); - } - if (Severity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); - } - if (IncidentConfiguration != null) - { - IncidentConfiguration.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs deleted file mode 100644 index f3a0902bd82f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs +++ /dev/null @@ -1,155 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents NRT alert rule template. - /// - [Newtonsoft.Json.JsonObject("NRT")] - [Rest.Serialization.JsonTransformation] - public partial class NrtAlertRuleTemplate : AlertRuleTemplate - { - /// - /// Initializes a new instance of the NrtAlertRuleTemplate class. - /// - public NrtAlertRuleTemplate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NrtAlertRuleTemplate class. - /// - /// The query that creates alerts for this - /// rule. - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// The version of this template - in format - /// <a.b.c>, where all are numbers. For example - /// <1.0.2>. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// The tactics of the alert rule - /// The techniques of the alert rule - /// Dictionary of string key-value pairs of - /// columns to be attached to the alert - /// Array of the entity mappings of the - /// alert rule - /// The alert details override - /// settings - public NrtAlertRuleTemplate(string query, string severity, string version, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IList tactics = default(IList), IList techniques = default(IList), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) - : base(id, name, type, systemData) - { - Tactics = tactics; - Techniques = techniques; - Query = query; - Severity = severity; - Version = version; - CustomDetails = customDetails; - EntityMappings = entityMappings; - AlertDetailsOverride = alertDetailsOverride; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - - /// - /// Gets or sets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; set; } - - /// - /// Gets or sets the query that creates alerts for this rule. - /// - [JsonProperty(PropertyName = "properties.query")] - public string Query { get; set; } - - /// - /// Gets or sets the severity for alerts created by this alert rule. - /// Possible values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "properties.severity")] - public string Severity { get; set; } - - /// - /// Gets or sets the version of this template - in format - /// &lt;a.b.c&gt;, where all are numbers. For example - /// &lt;1.0.2&gt;. - /// - [JsonProperty(PropertyName = "properties.version")] - public string Version { get; set; } - - /// - /// Gets or sets dictionary of string key-value pairs of columns to be - /// attached to the alert - /// - [JsonProperty(PropertyName = "properties.customDetails")] - public IDictionary CustomDetails { get; set; } - - /// - /// Gets or sets array of the entity mappings of the alert rule - /// - [JsonProperty(PropertyName = "properties.entityMappings")] - public IList EntityMappings { get; set; } - - /// - /// Gets or sets the alert details override settings - /// - [JsonProperty(PropertyName = "properties.alertDetailsOverride")] - public AlertDetailsOverride AlertDetailsOverride { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Query == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Query"); - } - if (Severity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); - } - if (Version == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Version"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs deleted file mode 100644 index 3915dd2756f1..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Office365 Project requirements check request. - /// - [Newtonsoft.Json.JsonObject("Office365Project")] - [Rest.Serialization.JsonTransformation] - public partial class Office365ProjectCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the Office365ProjectCheckRequirements - /// class. - /// - public Office365ProjectCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Office365ProjectCheckRequirements - /// class. - /// - /// The tenant id to connect to, and get the - /// data from. - public Office365ProjectCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs deleted file mode 100644 index 6636275c28d8..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Office Microsoft Project data connector. - /// - public partial class Office365ProjectConnectorDataTypes - { - /// - /// Initializes a new instance of the - /// Office365ProjectConnectorDataTypes class. - /// - public Office365ProjectConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// Office365ProjectConnectorDataTypes class. - /// - /// Logs data type. - public Office365ProjectConnectorDataTypes(Office365ProjectConnectorDataTypesLogs logs) - { - Logs = logs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets logs data type. - /// - [JsonProperty(PropertyName = "logs")] - public Office365ProjectConnectorDataTypesLogs Logs { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Logs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Logs"); - } - if (Logs != null) - { - Logs.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs deleted file mode 100644 index 7de4640182e7..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Logs data type. - /// - public partial class Office365ProjectConnectorDataTypesLogs : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// Office365ProjectConnectorDataTypesLogs class. - /// - public Office365ProjectConnectorDataTypesLogs() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// Office365ProjectConnectorDataTypesLogs class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - public Office365ProjectConnectorDataTypesLogs(string state) - : base(state) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs deleted file mode 100644 index 718a37c2f722..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Office Microsoft Project data connector. - /// - [Newtonsoft.Json.JsonObject("Office365Project")] - [Rest.Serialization.JsonTransformation] - public partial class Office365ProjectDataConnector : DataConnector - { - /// - /// Initializes a new instance of the Office365ProjectDataConnector - /// class. - /// - public Office365ProjectDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Office365ProjectDataConnector - /// class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public Office365ProjectDataConnector(string tenantId, Office365ProjectConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public Office365ProjectConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPCheckRequirements.cs deleted file mode 100644 index f502082fd5e9..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPCheckRequirements.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents OfficeATP (Office 365 Advanced Threat Protection) - /// requirements check request. - /// - [Newtonsoft.Json.JsonObject("OfficeATP")] - [Rest.Serialization.JsonTransformation] - public partial class OfficeATPCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the OfficeATPCheckRequirements class. - /// - public OfficeATPCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficeATPCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public OfficeATPCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPDataConnector.cs deleted file mode 100644 index ff69a4d45d12..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeATPDataConnector.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents OfficeATP (Office 365 Advanced Threat Protection) data - /// connector. - /// - [Newtonsoft.Json.JsonObject("OfficeATP")] - [Rest.Serialization.JsonTransformation] - public partial class OfficeATPDataConnector : DataConnector - { - /// - /// Initializes a new instance of the OfficeATPDataConnector class. - /// - public OfficeATPDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficeATPDataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The available data types for the - /// connector. - public OfficeATPDataConnector(string tenantId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public AlertsDataTypeOfDataConnector DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeConsent.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeConsent.cs deleted file mode 100644 index 89877d0c88ff..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeConsent.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Consent for Office365 tenant that already made. - /// - [Rest.Serialization.JsonTransformation] - public partial class OfficeConsent : Resource - { - /// - /// Initializes a new instance of the OfficeConsent class. - /// - public OfficeConsent() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficeConsent class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// The tenantId of the Office365 with the - /// consent. - /// Help to easily cascade among the data - /// layers. - public OfficeConsent(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string tenantId = default(string), string consentId = default(string)) - : base(id, name, type, systemData) - { - TenantId = tenantId; - ConsentId = consentId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenantId of the Office365 with the consent. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets help to easily cascade among the data layers. - /// - [JsonProperty(PropertyName = "properties.consentId")] - public string ConsentId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnector.cs index a72f69fe2ed7..46d4a313399d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnector.cs @@ -33,10 +33,6 @@ public OfficeDataConnector() /// /// Initializes a new instance of the OfficeDataConnector class. /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -46,7 +42,11 @@ public OfficeDataConnector() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource - public OfficeDataConnector(string tenantId, OfficeDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) + /// The tenant id to connect to, and get the + /// data from. + /// The available data types for the + /// connector. + public OfficeDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string tenantId = default(string), OfficeDataConnectorDataTypes dataTypes = default(OfficeDataConnectorDataTypes)) : base(id, name, type, systemData, etag) { TenantId = tenantId; @@ -71,26 +71,5 @@ public OfficeDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public OfficeDataConnectorDataTypes DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypes.cs index ef946ee56bfa..278bc09539aa 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypes.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypes.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -35,7 +34,7 @@ public OfficeDataConnectorDataTypes() /// Exchange data type connection. /// SharePoint data type connection. /// Teams data type connection. - public OfficeDataConnectorDataTypes(OfficeDataConnectorDataTypesExchange exchange, OfficeDataConnectorDataTypesSharePoint sharePoint, OfficeDataConnectorDataTypesTeams teams) + public OfficeDataConnectorDataTypes(OfficeDataConnectorDataTypesExchange exchange = default(OfficeDataConnectorDataTypesExchange), OfficeDataConnectorDataTypesSharePoint sharePoint = default(OfficeDataConnectorDataTypesSharePoint), OfficeDataConnectorDataTypesTeams teams = default(OfficeDataConnectorDataTypesTeams)) { Exchange = exchange; SharePoint = sharePoint; @@ -66,38 +65,5 @@ public OfficeDataConnectorDataTypes(OfficeDataConnectorDataTypesExchange exchang [JsonProperty(PropertyName = "teams")] public OfficeDataConnectorDataTypesTeams Teams { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Exchange == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Exchange"); - } - if (SharePoint == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SharePoint"); - } - if (Teams == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Teams"); - } - if (Exchange != null) - { - Exchange.Validate(); - } - if (SharePoint != null) - { - SharePoint.Validate(); - } - if (Teams != null) - { - Teams.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesExchange.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesExchange.cs index c1ab6f676005..b06d0c806844 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesExchange.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesExchange.cs @@ -33,7 +33,7 @@ public OfficeDataConnectorDataTypesExchange() /// Describe whether this data type connection is /// enabled or not. Possible values include: 'Enabled', /// 'Disabled' - public OfficeDataConnectorDataTypesExchange(string state) + public OfficeDataConnectorDataTypesExchange(string state = default(string)) : base(state) { CustomInit(); @@ -44,15 +44,5 @@ public OfficeDataConnectorDataTypesExchange(string state) /// partial void CustomInit(); - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesSharePoint.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesSharePoint.cs index 1245549e0981..ffe852f24652 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesSharePoint.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesSharePoint.cs @@ -33,7 +33,7 @@ public OfficeDataConnectorDataTypesSharePoint() /// Describe whether this data type connection is /// enabled or not. Possible values include: 'Enabled', /// 'Disabled' - public OfficeDataConnectorDataTypesSharePoint(string state) + public OfficeDataConnectorDataTypesSharePoint(string state = default(string)) : base(state) { CustomInit(); @@ -44,15 +44,5 @@ public OfficeDataConnectorDataTypesSharePoint(string state) /// partial void CustomInit(); - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesTeams.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesTeams.cs index b64270bb0ccc..583503a8e8e4 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesTeams.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeDataConnectorDataTypesTeams.cs @@ -33,7 +33,7 @@ public OfficeDataConnectorDataTypesTeams() /// Describe whether this data type connection is /// enabled or not. Possible values include: 'Enabled', /// 'Disabled' - public OfficeDataConnectorDataTypesTeams(string state) + public OfficeDataConnectorDataTypesTeams(string state = default(string)) : base(state) { CustomInit(); @@ -44,15 +44,5 @@ public OfficeDataConnectorDataTypesTeams(string state) /// partial void CustomInit(); - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMCheckRequirements.cs deleted file mode 100644 index ed07e1ce2e7f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMCheckRequirements.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents OfficeIRM (Microsoft Insider Risk Management) requirements - /// check request. - /// - [Newtonsoft.Json.JsonObject("OfficeIRM")] - [Rest.Serialization.JsonTransformation] - public partial class OfficeIRMCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the OfficeIRMCheckRequirements class. - /// - public OfficeIRMCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficeIRMCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public OfficeIRMCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMDataConnector.cs deleted file mode 100644 index 1ab1000ca0ce..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficeIRMDataConnector.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents OfficeIRM (Microsoft Insider Risk Management) data - /// connector. - /// - [Newtonsoft.Json.JsonObject("OfficeIRM")] - [Rest.Serialization.JsonTransformation] - public partial class OfficeIRMDataConnector : DataConnector - { - /// - /// Initializes a new instance of the OfficeIRMDataConnector class. - /// - public OfficeIRMDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficeIRMDataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The available data types for the - /// connector. - public OfficeIRMDataConnector(string tenantId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), AlertsDataTypeOfDataConnector dataTypes = default(AlertsDataTypeOfDataConnector)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public AlertsDataTypeOfDataConnector DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs deleted file mode 100644 index d114d184b785..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Office PowerBI requirements check request. - /// - [Newtonsoft.Json.JsonObject("OfficePowerBI")] - [Rest.Serialization.JsonTransformation] - public partial class OfficePowerBICheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the OfficePowerBICheckRequirements - /// class. - /// - public OfficePowerBICheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficePowerBICheckRequirements - /// class. - /// - /// The tenant id to connect to, and get the - /// data from. - public OfficePowerBICheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs deleted file mode 100644 index 9459f871ae4e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Office Microsoft PowerBI data connector. - /// - public partial class OfficePowerBIConnectorDataTypes - { - /// - /// Initializes a new instance of the OfficePowerBIConnectorDataTypes - /// class. - /// - public OfficePowerBIConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficePowerBIConnectorDataTypes - /// class. - /// - /// Logs data type. - public OfficePowerBIConnectorDataTypes(OfficePowerBIConnectorDataTypesLogs logs) - { - Logs = logs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets logs data type. - /// - [JsonProperty(PropertyName = "logs")] - public OfficePowerBIConnectorDataTypesLogs Logs { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Logs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Logs"); - } - if (Logs != null) - { - Logs.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs deleted file mode 100644 index a6a6f8269059..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Logs data type. - /// - public partial class OfficePowerBIConnectorDataTypesLogs : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// OfficePowerBIConnectorDataTypesLogs class. - /// - public OfficePowerBIConnectorDataTypesLogs() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// OfficePowerBIConnectorDataTypesLogs class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - public OfficePowerBIConnectorDataTypesLogs(string state) - : base(state) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs deleted file mode 100644 index 4fbb4824af3f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents Office Microsoft PowerBI data connector. - /// - [Newtonsoft.Json.JsonObject("OfficePowerBI")] - [Rest.Serialization.JsonTransformation] - public partial class OfficePowerBIDataConnector : DataConnector - { - /// - /// Initializes a new instance of the OfficePowerBIDataConnector class. - /// - public OfficePowerBIDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OfficePowerBIDataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public OfficePowerBIDataConnector(string tenantId, OfficePowerBIConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the available data types for the connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public OfficePowerBIConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OutputType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OutputType.cs deleted file mode 100644 index e628c22c53b2..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OutputType.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for OutputType. - /// - public static class OutputType - { - public const string Number = "Number"; - public const string String = "String"; - public const string Date = "Date"; - public const string Entity = "Entity"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionProviderScope.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionProviderScope.cs deleted file mode 100644 index 636281a580f0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionProviderScope.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for PermissionProviderScope. - /// - public static class PermissionProviderScope - { - public const string ResourceGroup = "ResourceGroup"; - public const string Subscription = "Subscription"; - public const string Workspace = "Workspace"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Permissions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Permissions.cs deleted file mode 100644 index fcd18ba1cac4..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Permissions.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Permissions required for the connector - /// - public partial class Permissions - { - /// - /// Initializes a new instance of the Permissions class. - /// - public Permissions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Permissions class. - /// - /// Resource provider permissions - /// required for the connector - /// Customs permissions required for the - /// connector - public Permissions(IList resourceProvider = default(IList), IList customs = default(IList)) - { - ResourceProvider = resourceProvider; - Customs = customs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource provider permissions required for the - /// connector - /// - [JsonProperty(PropertyName = "resourceProvider")] - public IList ResourceProvider { get; set; } - - /// - /// Gets or sets customs permissions required for the connector - /// - [JsonProperty(PropertyName = "customs")] - public IList Customs { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsCustomsItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsCustomsItem.cs deleted file mode 100644 index ce66c3377ab9..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsCustomsItem.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - public partial class PermissionsCustomsItem : Customs - { - /// - /// Initializes a new instance of the PermissionsCustomsItem class. - /// - public PermissionsCustomsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PermissionsCustomsItem class. - /// - /// Customs permissions name - /// Customs permissions description - public PermissionsCustomsItem(string name = default(string), string description = default(string)) - : base(name, description) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsResourceProviderItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsResourceProviderItem.cs deleted file mode 100644 index c61dfdb410fb..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PermissionsResourceProviderItem.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - public partial class PermissionsResourceProviderItem : ResourceProvider - { - /// - /// Initializes a new instance of the PermissionsResourceProviderItem - /// class. - /// - public PermissionsResourceProviderItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PermissionsResourceProviderItem - /// class. - /// - /// Provider name. Possible values include: - /// 'Microsoft.OperationalInsights/solutions', - /// 'Microsoft.OperationalInsights/workspaces', - /// 'Microsoft.OperationalInsights/workspaces/datasources', - /// 'microsoft.aadiam/diagnosticSettings', - /// 'Microsoft.OperationalInsights/workspaces/sharedKeys', - /// 'Microsoft.Authorization/policyAssignments' - /// Permission description - /// text - /// Permission provider display - /// name - /// Permission provider scope. Possible values - /// include: 'ResourceGroup', 'Subscription', 'Workspace' - /// Required permissions for the - /// connector - public PermissionsResourceProviderItem(string provider = default(string), string permissionsDisplayText = default(string), string providerDisplayName = default(string), string scope = default(string), RequiredPermissions requiredPermissions = default(RequiredPermissions)) - : base(provider, permissionsDisplayText, providerDisplayName, scope, requiredPermissions) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PlaybookActionProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PlaybookActionProperties.cs index faab89a24171..67a338791268 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PlaybookActionProperties.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PlaybookActionProperties.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -27,10 +28,10 @@ public PlaybookActionProperties() /// Initializes a new instance of the PlaybookActionProperties class. /// /// The resource id of the playbook - /// resource + /// resource. /// The tenant id of the playbook - /// resource - public PlaybookActionProperties(string logicAppResourceId = default(string), System.Guid? tenantId = default(System.Guid?)) + /// resource. + public PlaybookActionProperties(string logicAppResourceId, System.Guid? tenantId = default(System.Guid?)) { LogicAppResourceId = logicAppResourceId; TenantId = tenantId; @@ -43,16 +44,29 @@ public PlaybookActionProperties() partial void CustomInit(); /// - /// Gets or sets the resource id of the playbook resource + /// Gets or sets the resource id of the playbook resource. /// [JsonProperty(PropertyName = "logicAppResourceId")] public string LogicAppResourceId { get; set; } /// - /// Gets or sets the tenant id of the playbook resource + /// Gets or sets the tenant id of the playbook resource. /// [JsonProperty(PropertyName = "tenantId")] public System.Guid? TenantId { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LogicAppResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LogicAppResourceId"); + } + } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyArrayChangedConditionProperties.cs similarity index 55% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyArrayChangedConditionProperties.cs index dc43f315b7b4..32a4a24a4e5e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyArrayChangedConditionProperties.cs @@ -14,28 +14,28 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// The insight chart query. + /// Describes an automation rule condition that evaluates an array + /// property's value change /// - public partial class InsightQueryItemPropertiesReferenceTimeRange + [Newtonsoft.Json.JsonObject("PropertyArrayChanged")] + public partial class PropertyArrayChangedConditionProperties : AutomationRuleCondition { /// /// Initializes a new instance of the - /// InsightQueryItemPropertiesReferenceTimeRange class. + /// PropertyArrayChangedConditionProperties class. /// - public InsightQueryItemPropertiesReferenceTimeRange() + public PropertyArrayChangedConditionProperties() { CustomInit(); } /// /// Initializes a new instance of the - /// InsightQueryItemPropertiesReferenceTimeRange class. + /// PropertyArrayChangedConditionProperties class. /// - /// Additional query time for looking - /// back. - public InsightQueryItemPropertiesReferenceTimeRange(string beforeRange = default(string)) + public PropertyArrayChangedConditionProperties(AutomationRulePropertyArrayChangedValuesCondition conditionProperties = default(AutomationRulePropertyArrayChangedValuesCondition)) { - BeforeRange = beforeRange; + ConditionProperties = conditionProperties; CustomInit(); } @@ -45,10 +45,9 @@ public InsightQueryItemPropertiesReferenceTimeRange() partial void CustomInit(); /// - /// Gets or sets additional query time for looking back. /// - [JsonProperty(PropertyName = "beforeRange")] - public string BeforeRange { get; set; } + [JsonProperty(PropertyName = "conditionProperties")] + public AutomationRulePropertyArrayChangedValuesCondition ConditionProperties { get; set; } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyChangedConditionProperties.cs similarity index 56% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyChangedConditionProperties.cs index 9bd9189eb86e..0fc93fcda561 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyChangedConditionProperties.cs @@ -14,28 +14,28 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// The Activity query definitions + /// Describes an automation rule condition that evaluates a property's + /// value change /// - public partial class ActivityEntityQueriesPropertiesQueryDefinitions + [Newtonsoft.Json.JsonObject("PropertyChanged")] + public partial class PropertyChangedConditionProperties : AutomationRuleCondition { /// /// Initializes a new instance of the - /// ActivityEntityQueriesPropertiesQueryDefinitions class. + /// PropertyChangedConditionProperties class. /// - public ActivityEntityQueriesPropertiesQueryDefinitions() + public PropertyChangedConditionProperties() { CustomInit(); } /// /// Initializes a new instance of the - /// ActivityEntityQueriesPropertiesQueryDefinitions class. + /// PropertyChangedConditionProperties class. /// - /// The Activity query to run on a given - /// entity - public ActivityEntityQueriesPropertiesQueryDefinitions(string query = default(string)) + public PropertyChangedConditionProperties(AutomationRulePropertyValuesChangedCondition conditionProperties = default(AutomationRulePropertyValuesChangedCondition)) { - Query = query; + ConditionProperties = conditionProperties; CustomInit(); } @@ -45,10 +45,9 @@ public ActivityEntityQueriesPropertiesQueryDefinitions() partial void CustomInit(); /// - /// Gets or sets the Activity query to run on a given entity /// - [JsonProperty(PropertyName = "query")] - public string Query { get; set; } + [JsonProperty(PropertyName = "conditionProperties")] + public AutomationRulePropertyValuesChangedCondition ConditionProperties { get; set; } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ProviderName.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ProviderName.cs deleted file mode 100644 index 8827ea3f7129..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ProviderName.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for ProviderName. - /// - public static class ProviderName - { - public const string MicrosoftOperationalInsightsSolutions = "Microsoft.OperationalInsights/solutions"; - public const string MicrosoftOperationalInsightsWorkspaces = "Microsoft.OperationalInsights/workspaces"; - public const string MicrosoftOperationalInsightsWorkspacesDatasources = "Microsoft.OperationalInsights/workspaces/datasources"; - public const string MicrosoftaadiamDiagnosticSettings = "microsoft.aadiam/diagnosticSettings"; - public const string MicrosoftOperationalInsightsWorkspacesSharedKeys = "Microsoft.OperationalInsights/workspaces/sharedKeys"; - public const string MicrosoftAuthorizationPolicyAssignments = "Microsoft.Authorization/policyAssignments"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs deleted file mode 100644 index 70048f67373d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Query based alert rule template base property bag. - /// - public partial class QueryBasedAlertRuleTemplateProperties - { - /// - /// Initializes a new instance of the - /// QueryBasedAlertRuleTemplateProperties class. - /// - public QueryBasedAlertRuleTemplateProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// QueryBasedAlertRuleTemplateProperties class. - /// - /// The query that creates alerts for this - /// rule. - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// The version of this template - in format - /// <a.b.c>, where all are numbers. For example - /// <1.0.2>. - /// Dictionary of string key-value pairs of - /// columns to be attached to the alert - /// Array of the entity mappings of the - /// alert rule - /// The alert details override - /// settings - public QueryBasedAlertRuleTemplateProperties(string query = default(string), string severity = default(string), string version = default(string), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) - { - Query = query; - Severity = severity; - Version = version; - CustomDetails = customDetails; - EntityMappings = entityMappings; - AlertDetailsOverride = alertDetailsOverride; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the query that creates alerts for this rule. - /// - [JsonProperty(PropertyName = "query")] - public string Query { get; set; } - - /// - /// Gets or sets the severity for alerts created by this alert rule. - /// Possible values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } - - /// - /// Gets or sets the version of this template - in format - /// &lt;a.b.c&gt;, where all are numbers. For example - /// &lt;1.0.2&gt;. - /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - - /// - /// Gets or sets dictionary of string key-value pairs of columns to be - /// attached to the alert - /// - [JsonProperty(PropertyName = "customDetails")] - public IDictionary CustomDetails { get; set; } - - /// - /// Gets or sets array of the entity mappings of the alert rule - /// - [JsonProperty(PropertyName = "entityMappings")] - public IList EntityMappings { get; set; } - - /// - /// Gets or sets the alert details override settings - /// - [JsonProperty(PropertyName = "alertDetailsOverride")] - public AlertDetailsOverride AlertDetailsOverride { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repo.cs deleted file mode 100644 index bb4e6ae21c90..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repo.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a repository. - /// - public partial class Repo - { - /// - /// Initializes a new instance of the Repo class. - /// - public Repo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Repo class. - /// - /// The url to access the repository. - /// The name of the repository. - /// Array of branches. - public Repo(string url = default(string), string fullName = default(string), IList branches = default(IList)) - { - Url = url; - FullName = fullName; - Branches = branches; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the url to access the repository. - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } - - /// - /// Gets or sets the name of the repository. - /// - [JsonProperty(PropertyName = "fullName")] - public string FullName { get; set; } - - /// - /// Gets or sets array of branches. - /// - [JsonProperty(PropertyName = "branches")] - public IList Branches { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepoType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepoType.cs deleted file mode 100644 index f1000048317f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepoType.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for RepoType. - /// - public static class RepoType - { - public const string Github = "Github"; - public const string DevOps = "DevOps"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repository.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repository.cs deleted file mode 100644 index 1fb4a78bab6f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Repository.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// metadata of a repository. - /// - public partial class Repository - { - /// - /// Initializes a new instance of the Repository class. - /// - public Repository() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Repository class. - /// - /// Url of repository. - /// Branch name of repository. - /// Display url of repository. - /// Url to access repository action - /// logs. - /// Dictionary of source control content type - /// and path mapping. - public Repository(string url = default(string), string branch = default(string), string displayUrl = default(string), string deploymentLogsUrl = default(string), IList pathMapping = default(IList)) - { - Url = url; - Branch = branch; - DisplayUrl = displayUrl; - DeploymentLogsUrl = deploymentLogsUrl; - PathMapping = pathMapping; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets url of repository. - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } - - /// - /// Gets or sets branch name of repository. - /// - [JsonProperty(PropertyName = "branch")] - public string Branch { get; set; } - - /// - /// Gets or sets display url of repository. - /// - [JsonProperty(PropertyName = "displayUrl")] - public string DisplayUrl { get; set; } - - /// - /// Gets or sets url to access repository action logs. - /// - [JsonProperty(PropertyName = "deploymentLogsUrl")] - public string DeploymentLogsUrl { get; set; } - - /// - /// Gets or sets dictionary of source control content type and path - /// mapping. - /// - [JsonProperty(PropertyName = "pathMapping")] - public IList PathMapping { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs deleted file mode 100644 index a9e6b6e846c6..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Resources created in user's repository for the source-control. - /// - public partial class RepositoryResourceInfo - { - /// - /// Initializes a new instance of the RepositoryResourceInfo class. - /// - public RepositoryResourceInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RepositoryResourceInfo class. - /// - /// The webhook object created for the - /// source-control. - /// Resources created in GitHub for - /// this source-control. - /// Resources created in Azure - /// DevOps for this source-control. - public RepositoryResourceInfo(Webhook webhook = default(Webhook), GitHubResourceInfo gitHubResourceInfo = default(GitHubResourceInfo), AzureDevOpsResourceInfo azureDevOpsResourceInfo = default(AzureDevOpsResourceInfo)) - { - Webhook = webhook; - GitHubResourceInfo = gitHubResourceInfo; - AzureDevOpsResourceInfo = azureDevOpsResourceInfo; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the webhook object created for the source-control. - /// - [JsonProperty(PropertyName = "webhook")] - public Webhook Webhook { get; set; } - - /// - /// Gets or sets resources created in GitHub for this source-control. - /// - [JsonProperty(PropertyName = "gitHubResourceInfo")] - public GitHubResourceInfo GitHubResourceInfo { get; set; } - - /// - /// Gets or sets resources created in Azure DevOps for this - /// source-control. - /// - [JsonProperty(PropertyName = "azureDevOpsResourceInfo")] - public AzureDevOpsResourceInfo AzureDevOpsResourceInfo { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RequiredPermissions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RequiredPermissions.cs deleted file mode 100644 index 91d9347cfa25..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RequiredPermissions.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Required permissions for the connector - /// - public partial class RequiredPermissions - { - /// - /// Initializes a new instance of the RequiredPermissions class. - /// - public RequiredPermissions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RequiredPermissions class. - /// - /// action permission - /// write permission - /// read permission - /// delete permission - public RequiredPermissions(bool? action = default(bool?), bool? write = default(bool?), bool? read = default(bool?), bool? delete = default(bool?)) - { - Action = action; - Write = write; - Read = read; - Delete = delete; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets action permission - /// - [JsonProperty(PropertyName = "action")] - public bool? Action { get; set; } - - /// - /// Gets or sets write permission - /// - [JsonProperty(PropertyName = "write")] - public bool? Write { get; set; } - - /// - /// Gets or sets read permission - /// - [JsonProperty(PropertyName = "read")] - public bool? Read { get; set; } - - /// - /// Gets or sets delete permission - /// - [JsonProperty(PropertyName = "delete")] - public bool? Delete { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ResourceProvider.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ResourceProvider.cs deleted file mode 100644 index 2cc1bce54ecd..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ResourceProvider.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Resource provider permissions required for the connector - /// - public partial class ResourceProvider - { - /// - /// Initializes a new instance of the ResourceProvider class. - /// - public ResourceProvider() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourceProvider class. - /// - /// Provider name. Possible values include: - /// 'Microsoft.OperationalInsights/solutions', - /// 'Microsoft.OperationalInsights/workspaces', - /// 'Microsoft.OperationalInsights/workspaces/datasources', - /// 'microsoft.aadiam/diagnosticSettings', - /// 'Microsoft.OperationalInsights/workspaces/sharedKeys', - /// 'Microsoft.Authorization/policyAssignments' - /// Permission description - /// text - /// Permission provider display - /// name - /// Permission provider scope. Possible values - /// include: 'ResourceGroup', 'Subscription', 'Workspace' - /// Required permissions for the - /// connector - public ResourceProvider(string provider = default(string), string permissionsDisplayText = default(string), string providerDisplayName = default(string), string scope = default(string), RequiredPermissions requiredPermissions = default(RequiredPermissions)) - { - Provider = provider; - PermissionsDisplayText = permissionsDisplayText; - ProviderDisplayName = providerDisplayName; - Scope = scope; - RequiredPermissions = requiredPermissions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets provider name. Possible values include: - /// 'Microsoft.OperationalInsights/solutions', - /// 'Microsoft.OperationalInsights/workspaces', - /// 'Microsoft.OperationalInsights/workspaces/datasources', - /// 'microsoft.aadiam/diagnosticSettings', - /// 'Microsoft.OperationalInsights/workspaces/sharedKeys', - /// 'Microsoft.Authorization/policyAssignments' - /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } - - /// - /// Gets or sets permission description text - /// - [JsonProperty(PropertyName = "permissionsDisplayText")] - public string PermissionsDisplayText { get; set; } - - /// - /// Gets or sets permission provider display name - /// - [JsonProperty(PropertyName = "providerDisplayName")] - public string ProviderDisplayName { get; set; } - - /// - /// Gets or sets permission provider scope. Possible values include: - /// 'ResourceGroup', 'Subscription', 'Workspace' - /// - [JsonProperty(PropertyName = "scope")] - public string Scope { get; set; } - - /// - /// Gets or sets required permissions for the connector - /// - [JsonProperty(PropertyName = "requiredPermissions")] - public RequiredPermissions RequiredPermissions { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SampleQueries.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SampleQueries.cs deleted file mode 100644 index aa70cec53c76..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SampleQueries.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The sample queries for the connector - /// - public partial class SampleQueries - { - /// - /// Initializes a new instance of the SampleQueries class. - /// - public SampleQueries() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SampleQueries class. - /// - /// The sample query description - /// the sample query - public SampleQueries(string description = default(string), string query = default(string)) - { - Description = description; - Query = query; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the sample query description - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets the sample query - /// - [JsonProperty(PropertyName = "query")] - public string Query { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs index e6c733f2362b..9b0ff9620e9c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs @@ -73,7 +73,8 @@ public ScheduledAlertRuleTemplate() /// rule. /// The tactics of the alert rule /// template - /// The techniques of the alert rule + /// The techniques of the alert rule + /// template /// The version of this template - in format /// <a.b.c>, where all are numbers. For example /// <1.0.2>. @@ -208,7 +209,7 @@ public ScheduledAlertRuleTemplate() public IList Tactics { get; set; } /// - /// Gets or sets the techniques of the alert rule + /// Gets or sets the techniques of the alert rule template /// [JsonProperty(PropertyName = "properties.techniques")] public IList Techniques { get; set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.cs deleted file mode 100644 index 76eecbbfbd76..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.cs +++ /dev/null @@ -1,144 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents security alert timeline item. - /// - [Newtonsoft.Json.JsonObject("SecurityAlert")] - public partial class SecurityAlertTimelineItem : EntityTimelineItem - { - /// - /// Initializes a new instance of the SecurityAlertTimelineItem class. - /// - public SecurityAlertTimelineItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SecurityAlertTimelineItem class. - /// - /// The alert azure resource id. - /// The alert name. - /// The alert severity. Possible values include: - /// 'High', 'Medium', 'Low', 'Informational' - /// The alert end time. - /// The alert start time. - /// The alert generated time. - /// The name of the alert type. - /// The alert product name. - /// The alert description. - public SecurityAlertTimelineItem(string azureResourceId, string displayName, string severity, System.DateTime endTimeUtc, System.DateTime startTimeUtc, System.DateTime timeGenerated, string alertType, string productName = default(string), string description = default(string)) - { - AzureResourceId = azureResourceId; - ProductName = productName; - Description = description; - DisplayName = displayName; - Severity = severity; - EndTimeUtc = endTimeUtc; - StartTimeUtc = startTimeUtc; - TimeGenerated = timeGenerated; - AlertType = alertType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the alert azure resource id. - /// - [JsonProperty(PropertyName = "azureResourceId")] - public string AzureResourceId { get; set; } - - /// - /// Gets or sets the alert product name. - /// - [JsonProperty(PropertyName = "productName")] - public string ProductName { get; set; } - - /// - /// Gets or sets the alert description. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets the alert name. - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the alert severity. Possible values include: 'High', - /// 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } - - /// - /// Gets or sets the alert end time. - /// - [JsonProperty(PropertyName = "endTimeUtc")] - public System.DateTime EndTimeUtc { get; set; } - - /// - /// Gets or sets the alert start time. - /// - [JsonProperty(PropertyName = "startTimeUtc")] - public System.DateTime StartTimeUtc { get; set; } - - /// - /// Gets or sets the alert generated time. - /// - [JsonProperty(PropertyName = "timeGenerated")] - public System.DateTime TimeGenerated { get; set; } - - /// - /// Gets or sets the name of the alert type. - /// - [JsonProperty(PropertyName = "alertType")] - public string AlertType { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AzureResourceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AzureResourceId"); - } - if (DisplayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); - } - if (Severity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); - } - if (AlertType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AlertType"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQuery.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSetting.cs similarity index 75% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQuery.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSetting.cs index 799239036ed6..267912cf84a1 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityQuery.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSetting.cs @@ -13,20 +13,20 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Specific entity query. + /// Security ML Analytics Setting /// - public partial class EntityQuery : ResourceWithEtag + public partial class SecurityMLAnalyticsSetting : ResourceWithEtag { /// - /// Initializes a new instance of the EntityQuery class. + /// Initializes a new instance of the SecurityMLAnalyticsSetting class. /// - public EntityQuery() + public SecurityMLAnalyticsSetting() { CustomInit(); } /// - /// Initializes a new instance of the EntityQuery class. + /// Initializes a new instance of the SecurityMLAnalyticsSetting class. /// /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -37,7 +37,7 @@ public EntityQuery() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource - public EntityQuery(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) + public SecurityMLAnalyticsSetting(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) : base(id, name, type, systemData, etag) { CustomInit(); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.cs new file mode 100644 index 000000000000..333031d73728 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// security ml analytics settings data sources + /// + public partial class SecurityMLAnalyticsSettingsDataSource + { + /// + /// Initializes a new instance of the + /// SecurityMLAnalyticsSettingsDataSource class. + /// + public SecurityMLAnalyticsSettingsDataSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SecurityMLAnalyticsSettingsDataSource class. + /// + /// The connector id that provides the + /// following data types + /// The data types used by the security ml + /// analytics settings + public SecurityMLAnalyticsSettingsDataSource(string connectorId = default(string), IList dataTypes = default(IList)) + { + ConnectorId = connectorId; + DataTypes = dataTypes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connector id that provides the following data + /// types + /// + [JsonProperty(PropertyName = "connectorId")] + public string ConnectorId { get; set; } + + /// + /// Gets or sets the data types used by the security ml analytics + /// settings + /// + [JsonProperty(PropertyName = "dataTypes")] + public IList DataTypes { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OperatorModel.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsKind.cs similarity index 73% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OperatorModel.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsKind.cs index 141d60ebf837..f248fc74e5cf 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OperatorModel.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsKind.cs @@ -12,11 +12,10 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for OperatorModel. + /// Defines values for SecurityMLAnalyticsSettingsKind. /// - public static class OperatorModel + public static class SecurityMLAnalyticsSettingsKind { - public const string AND = "AND"; - public const string OR = "OR"; + public const string Anomaly = "Anomaly"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingList.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingList.cs deleted file mode 100644 index 4823ae5fbfa8..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingList.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// List of all the settings. - /// - public partial class SettingList - { - /// - /// Initializes a new instance of the SettingList class. - /// - public SettingList() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SettingList class. - /// - /// Array of settings. - public SettingList(IList value) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets array of settings. - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Value == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Value"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingType.cs deleted file mode 100644 index c9a26f01175f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingType.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for SettingType. - /// - public static class SettingType - { - public const string CopyableLabel = "CopyableLabel"; - public const string InstructionStepsGroup = "InstructionStepsGroup"; - public const string InfoMessage = "InfoMessage"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Settings.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Settings.cs deleted file mode 100644 index f7ec6d075a19..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Settings.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// The Setting. - /// - public partial class Settings : ResourceWithEtag - { - /// - /// Initializes a new instance of the Settings class. - /// - public Settings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Settings class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - public Settings(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData, etag) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PollingFrequency.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingsStatus.cs similarity index 60% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PollingFrequency.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingsStatus.cs index 0f7309540500..5e53628f62de 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PollingFrequency.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SettingsStatus.cs @@ -12,21 +12,17 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for PollingFrequency. + /// Defines values for SettingsStatus. /// - public static class PollingFrequency + public static class SettingsStatus { /// - /// Once a minute + /// Anomaly settings status in Production mode /// - public const string OnceAMinute = "OnceAMinute"; + public const string Production = "Production"; /// - /// Once an hour + /// Anomaly settings status in Flighting mode /// - public const string OnceAnHour = "OnceAnHour"; - /// - /// Once a day - /// - public const string OnceADay = "OnceADay"; + public const string Flighting = "Flighting"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Sku.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Sku.cs deleted file mode 100644 index 9a17eef0feac..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Sku.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The pricing tier of the solution - /// - public partial class Sku - { - /// - /// Initializes a new instance of the Sku class. - /// - public Sku() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Sku class. - /// - /// The kind of the tier. Possible values include: - /// 'PerGB', 'CapacityReservation' - /// The amount of reservation - /// level - public Sku(string name = default(string), int? capacityReservationLevel = default(int?)) - { - Name = name; - CapacityReservationLevel = capacityReservationLevel; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the kind of the tier. Possible values include: - /// 'PerGB', 'CapacityReservation' - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the amount of reservation level - /// - [JsonProperty(PropertyName = "capacityReservationLevel")] - public int? CapacityReservationLevel { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SkuKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SkuKind.cs deleted file mode 100644 index bba13758ad26..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SkuKind.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for SkuKind. - /// - public static class SkuKind - { - public const string PerGB = "PerGB"; - public const string CapacityReservation = "CapacityReservation"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Source.cs similarity index 88% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceType.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Source.cs index d4349b47c3cf..12261c5c8fa6 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceType.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Source.cs @@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for SourceType. + /// Defines values for Source. /// - public static class SourceType + public static class Source { public const string Localfile = "Local file"; public const string Remotestorage = "Remote storage"; diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs deleted file mode 100644 index f8da8b2a72fa..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs +++ /dev/null @@ -1,167 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a SourceControl in Azure Security Insights. - /// - [Rest.Serialization.JsonTransformation] - public partial class SourceControl : ResourceWithEtag - { - /// - /// Initializes a new instance of the SourceControl class. - /// - public SourceControl() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SourceControl class. - /// - /// The display name of the source - /// control - /// The repository type of the source control. - /// Possible values include: 'Github', 'DevOps' - /// Array of source control content - /// types. - /// Repository metadata. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The id (a Guid) of the source - /// control - /// The version number associated with the source - /// control. Possible values include: 'V1', 'V2' - /// A description of the source - /// control - /// Information regarding the - /// resources created in user's repository. - /// Information regarding the latest - /// deployment for the source control. - public SourceControl(string displayName, string repoType, IList contentTypes, Repository repository, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string sourceControlId = default(string), string version = default(string), string description = default(string), RepositoryResourceInfo repositoryResourceInfo = default(RepositoryResourceInfo), DeploymentInfo lastDeploymentInfo = default(DeploymentInfo)) - : base(id, name, type, systemData, etag) - { - SourceControlId = sourceControlId; - Version = version; - DisplayName = displayName; - Description = description; - RepoType = repoType; - ContentTypes = contentTypes; - Repository = repository; - RepositoryResourceInfo = repositoryResourceInfo; - LastDeploymentInfo = lastDeploymentInfo; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the id (a Guid) of the source control - /// - [JsonProperty(PropertyName = "properties.id")] - public string SourceControlId { get; set; } - - /// - /// Gets or sets the version number associated with the source control. - /// Possible values include: 'V1', 'V2' - /// - [JsonProperty(PropertyName = "properties.version")] - public string Version { get; set; } - - /// - /// Gets or sets the display name of the source control - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets a description of the source control - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the repository type of the source control. Possible - /// values include: 'Github', 'DevOps' - /// - [JsonProperty(PropertyName = "properties.repoType")] - public string RepoType { get; set; } - - /// - /// Gets or sets array of source control content types. - /// - [JsonProperty(PropertyName = "properties.contentTypes")] - public IList ContentTypes { get; set; } - - /// - /// Gets or sets repository metadata. - /// - [JsonProperty(PropertyName = "properties.repository")] - public Repository Repository { get; set; } - - /// - /// Gets or sets information regarding the resources created in user's - /// repository. - /// - [JsonProperty(PropertyName = "properties.repositoryResourceInfo")] - public RepositoryResourceInfo RepositoryResourceInfo { get; set; } - - /// - /// Gets or sets information regarding the latest deployment for the - /// source control. - /// - [JsonProperty(PropertyName = "properties.lastDeploymentInfo")] - public DeploymentInfo LastDeploymentInfo { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DisplayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); - } - if (RepoType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "RepoType"); - } - if (ContentTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContentTypes"); - } - if (Repository == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Repository"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceKind.cs deleted file mode 100644 index 17f8665ec8b0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceKind.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for SourceKind. - /// - public static class SourceKind - { - public const string LocalWorkspace = "LocalWorkspace"; - public const string Community = "Community"; - public const string Solution = "Solution"; - public const string SourceRepository = "SourceRepository"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SupportTier.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SupportTier.cs deleted file mode 100644 index 4bdf9668124f..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SupportTier.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for SupportTier. - /// - public static class SupportTier - { - public const string Microsoft = "Microsoft"; - public const string Partner = "Partner"; - public const string Community = "Community"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TICheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TICheckRequirements.cs deleted file mode 100644 index 1c791f26a454..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TICheckRequirements.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Threat Intelligence Platforms data connector check requirements - /// - [Newtonsoft.Json.JsonObject("ThreatIntelligence")] - [Rest.Serialization.JsonTransformation] - public partial class TICheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the TICheckRequirements class. - /// - public TICheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TICheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public TICheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnector.cs index 57be1bbe19a9..910f272edaeb 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnector.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnector.cs @@ -33,10 +33,6 @@ public TIDataConnector() /// /// Initializes a new instance of the TIDataConnector class. /// - /// The tenant id to connect to, and get the - /// data from. - /// The available data types for the - /// connector. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -46,9 +42,13 @@ public TIDataConnector() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource + /// The tenant id to connect to, and get the + /// data from. /// The lookback period for the feed to /// be imported. - public TIDataConnector(string tenantId, TIDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? tipLookbackPeriod = default(System.DateTime?)) + /// The available data types for the + /// connector. + public TIDataConnector(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string tenantId = default(string), System.DateTime? tipLookbackPeriod = default(System.DateTime?), TIDataConnectorDataTypes dataTypes = default(TIDataConnectorDataTypes)) : base(id, name, type, systemData, etag) { TenantId = tenantId; @@ -80,26 +80,5 @@ public TIDataConnector() [JsonProperty(PropertyName = "properties.dataTypes")] public TIDataConnectorDataTypes DataTypes { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypes.cs index 84fd0a33bd05..92fdaf0c1d61 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypes.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypes.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -32,7 +31,7 @@ public TIDataConnectorDataTypes() /// /// Data type for indicators /// connection. - public TIDataConnectorDataTypes(TIDataConnectorDataTypesIndicators indicators) + public TIDataConnectorDataTypes(TIDataConnectorDataTypesIndicators indicators = default(TIDataConnectorDataTypesIndicators)) { Indicators = indicators; CustomInit(); @@ -49,22 +48,5 @@ public TIDataConnectorDataTypes(TIDataConnectorDataTypesIndicators indicators) [JsonProperty(PropertyName = "indicators")] public TIDataConnectorDataTypesIndicators Indicators { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Indicators == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Indicators"); - } - if (Indicators != null) - { - Indicators.Validate(); - } - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.cs index 6fb216152973..75d480973671 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.cs @@ -33,7 +33,7 @@ public TIDataConnectorDataTypesIndicators() /// Describe whether this data type connection is /// enabled or not. Possible values include: 'Enabled', /// 'Disabled' - public TIDataConnectorDataTypesIndicators(string state) + public TIDataConnectorDataTypesIndicators(string state = default(string)) : base(state) { CustomInit(); @@ -44,15 +44,5 @@ public TIDataConnectorDataTypesIndicators(string state) /// partial void CustomInit(); - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamInformation.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamInformation.cs deleted file mode 100644 index bbe85604b9f5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamInformation.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes team information - /// - public partial class TeamInformation - { - /// - /// Initializes a new instance of the TeamInformation class. - /// - public TeamInformation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TeamInformation class. - /// - /// Team ID - /// The primary channel URL of the - /// team - /// The time the team was - /// created - /// The name of the team - /// The description of the team - public TeamInformation(string teamId = default(string), string primaryChannelUrl = default(string), System.DateTime? teamCreationTimeUtc = default(System.DateTime?), string name = default(string), string description = default(string)) - { - TeamId = teamId; - PrimaryChannelUrl = primaryChannelUrl; - TeamCreationTimeUtc = teamCreationTimeUtc; - Name = name; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets team ID - /// - [JsonProperty(PropertyName = "teamId")] - public string TeamId { get; private set; } - - /// - /// Gets the primary channel URL of the team - /// - [JsonProperty(PropertyName = "primaryChannelUrl")] - public string PrimaryChannelUrl { get; private set; } - - /// - /// Gets the time the team was created - /// - [JsonProperty(PropertyName = "teamCreationTimeUtc")] - public System.DateTime? TeamCreationTimeUtc { get; private set; } - - /// - /// Gets the name of the team - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets the description of the team - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamProperties.cs deleted file mode 100644 index 1aa427d3cde2..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TeamProperties.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes team properties - /// - public partial class TeamProperties - { - /// - /// Initializes a new instance of the TeamProperties class. - /// - public TeamProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TeamProperties class. - /// - /// The name of the team - /// The description of the team - /// List of member IDs to add to the - /// team - /// List of group IDs to add their members to - /// the team - public TeamProperties(string teamName, string teamDescription = default(string), IList memberIds = default(IList), IList groupIds = default(IList)) - { - TeamName = teamName; - TeamDescription = teamDescription; - MemberIds = memberIds; - GroupIds = groupIds; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the team - /// - [JsonProperty(PropertyName = "teamName")] - public string TeamName { get; set; } - - /// - /// Gets or sets the description of the team - /// - [JsonProperty(PropertyName = "teamDescription")] - public string TeamDescription { get; set; } - - /// - /// Gets or sets list of member IDs to add to the team - /// - [JsonProperty(PropertyName = "memberIds")] - public IList MemberIds { get; set; } - - /// - /// Gets or sets list of group IDs to add their members to the team - /// - [JsonProperty(PropertyName = "groupIds")] - public IList GroupIds { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TeamName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TeamName"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs deleted file mode 100644 index 1dfa47dfd681..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Threat Intelligence alert rule. - /// - [Newtonsoft.Json.JsonObject("ThreatIntelligence")] - [Rest.Serialization.JsonTransformation] - public partial class ThreatIntelligenceAlertRule : AlertRule - { - /// - /// Initializes a new instance of the ThreatIntelligenceAlertRule - /// class. - /// - public ThreatIntelligenceAlertRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ThreatIntelligenceAlertRule - /// class. - /// - /// The Name of the alert rule - /// template used to create this rule. - /// Determines whether this alert rule is enabled - /// or disabled. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The description of the alert - /// rule. - /// The display name for alerts created by - /// this alert rule. - /// The last time that this alert has - /// been modified. - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// The tactics of the alert rule - /// The techniques of the alert rule - public ThreatIntelligenceAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) - : base(id, name, type, systemData, etag) - { - AlertRuleTemplateName = alertRuleTemplateName; - Description = description; - DisplayName = displayName; - Enabled = enabled; - LastModifiedUtc = lastModifiedUtc; - Severity = severity; - Tactics = tactics; - Techniques = techniques; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Name of the alert rule template used to create - /// this rule. - /// - [JsonProperty(PropertyName = "properties.alertRuleTemplateName")] - public string AlertRuleTemplateName { get; set; } - - /// - /// Gets the description of the alert rule. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - /// - /// Gets the display name for alerts created by this alert rule. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets or sets determines whether this alert rule is enabled or - /// disabled. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool Enabled { get; set; } - - /// - /// Gets the last time that this alert has been modified. - /// - [JsonProperty(PropertyName = "properties.lastModifiedUtc")] - public System.DateTime? LastModifiedUtc { get; private set; } - - /// - /// Gets the severity for alerts created by this alert rule. Possible - /// values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "properties.severity")] - public string Severity { get; private set; } - - /// - /// Gets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; private set; } - - /// - /// Gets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AlertRuleTemplateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AlertRuleTemplateName"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs deleted file mode 100644 index 3c5469130d96..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs +++ /dev/null @@ -1,165 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents Threat Intelligence alert rule template. - /// - [Newtonsoft.Json.JsonObject("ThreatIntelligence")] - [Rest.Serialization.JsonTransformation] - public partial class ThreatIntelligenceAlertRuleTemplate : AlertRuleTemplate - { - /// - /// Initializes a new instance of the - /// ThreatIntelligenceAlertRuleTemplate class. - /// - public ThreatIntelligenceAlertRuleTemplate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ThreatIntelligenceAlertRuleTemplate class. - /// - /// The severity for alerts created by this - /// alert rule. Possible values include: 'High', 'Medium', 'Low', - /// 'Informational' - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// the number of alert - /// rules that were created by this template - /// The last time that this alert rule - /// template has been updated. - /// The time that this alert rule template - /// has been added. - /// The description of the alert rule - /// template. - /// The display name for alert rule - /// template. - /// The required data sources for - /// this template - /// The alert rule template status. Possible - /// values include: 'Installed', 'Available', 'NotAvailable' - /// The tactics of the alert rule - /// The techniques of the alert rule - public ThreatIntelligenceAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) - : base(id, name, type, systemData) - { - AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - LastUpdatedDateUTC = lastUpdatedDateUTC; - CreatedDateUTC = createdDateUTC; - Description = description; - DisplayName = displayName; - RequiredDataConnectors = requiredDataConnectors; - Status = status; - Tactics = tactics; - Techniques = techniques; - Severity = severity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the number of alert rules that were created by this - /// template - /// - [JsonProperty(PropertyName = "properties.alertRulesCreatedByTemplateCount")] - public int? AlertRulesCreatedByTemplateCount { get; set; } - - /// - /// Gets the last time that this alert rule template has been updated. - /// - [JsonProperty(PropertyName = "properties.lastUpdatedDateUTC")] - public System.DateTime? LastUpdatedDateUTC { get; private set; } - - /// - /// Gets the time that this alert rule template has been added. - /// - [JsonProperty(PropertyName = "properties.createdDateUTC")] - public System.DateTime? CreatedDateUTC { get; private set; } - - /// - /// Gets or sets the description of the alert rule template. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the display name for alert rule template. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the required data sources for this template - /// - [JsonProperty(PropertyName = "properties.requiredDataConnectors")] - public IList RequiredDataConnectors { get; set; } - - /// - /// Gets or sets the alert rule template status. Possible values - /// include: 'Installed', 'Available', 'NotAvailable' - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; set; } - - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - - /// - /// Gets or sets the techniques of the alert rule - /// - [JsonProperty(PropertyName = "properties.techniques")] - public IList Techniques { get; set; } - - /// - /// Gets or sets the severity for alerts created by this alert rule. - /// Possible values include: 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "properties.severity")] - public string Severity { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Severity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKindEnum.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceInnerKind.cs similarity index 83% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKindEnum.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceInnerKind.cs index 5e33e6324aa8..04dd0a98dd9e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKindEnum.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceInnerKind.cs @@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for ThreatIntelligenceResourceKindEnum. + /// Defines values for ThreatIntelligenceResourceInnerKind. /// - public static class ThreatIntelligenceResourceKindEnum + public static class ThreatIntelligenceResourceInnerKind { /// /// Entity represents threat intelligence indicator in the system. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceSortingCriteriaEnum.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceSortingOrder.cs similarity index 83% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceSortingCriteriaEnum.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceSortingOrder.cs index 4214c9098063..f020a15d0ea2 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceSortingCriteriaEnum.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceSortingOrder.cs @@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for ThreatIntelligenceSortingCriteriaEnum. + /// Defines values for ThreatIntelligenceSortingOrder. /// - public static class ThreatIntelligenceSortingCriteriaEnum + public static class ThreatIntelligenceSortingOrder { public const string Unsorted = "unsorted"; public const string Ascending = "ascending"; diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiCheckRequirements.cs deleted file mode 100644 index cc53c42a46f0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiCheckRequirements.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Threat Intelligence TAXII data connector check requirements - /// - [Newtonsoft.Json.JsonObject("ThreatIntelligenceTaxii")] - [Rest.Serialization.JsonTransformation] - public partial class TiTaxiiCheckRequirements : DataConnectorsCheckRequirements - { - /// - /// Initializes a new instance of the TiTaxiiCheckRequirements class. - /// - public TiTaxiiCheckRequirements() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TiTaxiiCheckRequirements class. - /// - /// The tenant id to connect to, and get the - /// data from. - public TiTaxiiCheckRequirements(string tenantId) - { - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnector.cs deleted file mode 100644 index a36b22bb3c71..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnector.cs +++ /dev/null @@ -1,173 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Data connector to pull Threat intelligence data from TAXII 2.0/2.1 - /// server - /// - [Newtonsoft.Json.JsonObject("ThreatIntelligenceTaxii")] - [Rest.Serialization.JsonTransformation] - public partial class TiTaxiiDataConnector : DataConnector - { - /// - /// Initializes a new instance of the TiTaxiiDataConnector class. - /// - public TiTaxiiDataConnector() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TiTaxiiDataConnector class. - /// - /// The tenant id to connect to, and get the - /// data from. - /// The polling frequency for the TAXII - /// server. Possible values include: 'OnceAMinute', 'OnceAnHour', - /// 'OnceADay' - /// The available data types for Threat - /// Intelligence TAXII data connector. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The workspace id. - /// The friendly name for the TAXII - /// server. - /// The API root for the TAXII - /// server. - /// The collection id of the TAXII - /// server. - /// The userName for the TAXII server. - /// The password for the TAXII server. - /// The lookback period for the TAXII - /// server. - public TiTaxiiDataConnector(string tenantId, string pollingFrequency, TiTaxiiDataConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string workspaceId = default(string), string friendlyName = default(string), string taxiiServer = default(string), string collectionId = default(string), string userName = default(string), string password = default(string), System.DateTime? taxiiLookbackPeriod = default(System.DateTime?)) - : base(id, name, type, systemData, etag) - { - TenantId = tenantId; - WorkspaceId = workspaceId; - FriendlyName = friendlyName; - TaxiiServer = taxiiServer; - CollectionId = collectionId; - UserName = userName; - Password = password; - TaxiiLookbackPeriod = taxiiLookbackPeriod; - PollingFrequency = pollingFrequency; - DataTypes = dataTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the tenant id to connect to, and get the data from. - /// - [JsonProperty(PropertyName = "properties.tenantId")] - public string TenantId { get; set; } - - /// - /// Gets or sets the workspace id. - /// - [JsonProperty(PropertyName = "properties.workspaceId")] - public string WorkspaceId { get; set; } - - /// - /// Gets or sets the friendly name for the TAXII server. - /// - [JsonProperty(PropertyName = "properties.friendlyName")] - public string FriendlyName { get; set; } - - /// - /// Gets or sets the API root for the TAXII server. - /// - [JsonProperty(PropertyName = "properties.taxiiServer")] - public string TaxiiServer { get; set; } - - /// - /// Gets or sets the collection id of the TAXII server. - /// - [JsonProperty(PropertyName = "properties.collectionId")] - public string CollectionId { get; set; } - - /// - /// Gets or sets the userName for the TAXII server. - /// - [JsonProperty(PropertyName = "properties.userName")] - public string UserName { get; set; } - - /// - /// Gets or sets the password for the TAXII server. - /// - [JsonProperty(PropertyName = "properties.password")] - public string Password { get; set; } - - /// - /// Gets or sets the lookback period for the TAXII server. - /// - [JsonProperty(PropertyName = "properties.taxiiLookbackPeriod")] - public System.DateTime? TaxiiLookbackPeriod { get; set; } - - /// - /// Gets or sets the polling frequency for the TAXII server. Possible - /// values include: 'OnceAMinute', 'OnceAnHour', 'OnceADay' - /// - [JsonProperty(PropertyName = "properties.pollingFrequency")] - public string PollingFrequency { get; set; } - - /// - /// Gets or sets the available data types for Threat Intelligence TAXII - /// data connector. - /// - [JsonProperty(PropertyName = "properties.dataTypes")] - public TiTaxiiDataConnectorDataTypes DataTypes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TenantId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); - } - if (PollingFrequency == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "PollingFrequency"); - } - if (DataTypes == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); - } - if (DataTypes != null) - { - DataTypes.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypes.cs deleted file mode 100644 index 6de51c2d0ca2..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypes.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The available data types for Threat Intelligence TAXII data connector. - /// - public partial class TiTaxiiDataConnectorDataTypes - { - /// - /// Initializes a new instance of the TiTaxiiDataConnectorDataTypes - /// class. - /// - public TiTaxiiDataConnectorDataTypes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TiTaxiiDataConnectorDataTypes - /// class. - /// - /// Data type for TAXII connector. - public TiTaxiiDataConnectorDataTypes(TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient) - { - TaxiiClient = taxiiClient; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets data type for TAXII connector. - /// - [JsonProperty(PropertyName = "taxiiClient")] - public TiTaxiiDataConnectorDataTypesTaxiiClient TaxiiClient { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TaxiiClient == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TaxiiClient"); - } - if (TaxiiClient != null) - { - TaxiiClient.Validate(); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypesTaxiiClient.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypesTaxiiClient.cs deleted file mode 100644 index 196767877045..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TiTaxiiDataConnectorDataTypesTaxiiClient.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using System.Linq; - - /// - /// Data type for TAXII connector. - /// - public partial class TiTaxiiDataConnectorDataTypesTaxiiClient : DataConnectorDataTypeCommon - { - /// - /// Initializes a new instance of the - /// TiTaxiiDataConnectorDataTypesTaxiiClient class. - /// - public TiTaxiiDataConnectorDataTypesTaxiiClient() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// TiTaxiiDataConnectorDataTypesTaxiiClient class. - /// - /// Describe whether this data type connection is - /// enabled or not. Possible values include: 'Enabled', - /// 'Disabled' - public TiTaxiiDataConnectorDataTypesTaxiiClient(string state) - : base(state) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineAggregation.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineAggregation.cs deleted file mode 100644 index 79b0193c3ad0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineAggregation.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// timeline aggregation information per kind - /// - public partial class TimelineAggregation - { - /// - /// Initializes a new instance of the TimelineAggregation class. - /// - public TimelineAggregation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TimelineAggregation class. - /// - /// the total items found for a kind - /// the query kind. Possible values include: - /// 'Activity', 'Bookmark', 'SecurityAlert' - public TimelineAggregation(int count, string kind) - { - Count = count; - Kind = kind; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the total items found for a kind - /// - [JsonProperty(PropertyName = "count")] - public int Count { get; set; } - - /// - /// Gets or sets the query kind. Possible values include: 'Activity', - /// 'Bookmark', 'SecurityAlert' - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Kind == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineError.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineError.cs deleted file mode 100644 index 90d64f7d80d9..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineError.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Timeline Query Errors. - /// - public partial class TimelineError - { - /// - /// Initializes a new instance of the TimelineError class. - /// - public TimelineError() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TimelineError class. - /// - /// the query kind. Possible values include: - /// 'Activity', 'Bookmark', 'SecurityAlert' - /// the error message - /// the query id - public TimelineError(string kind, string errorMessage, string queryId = default(string)) - { - Kind = kind; - QueryId = queryId; - ErrorMessage = errorMessage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the query kind. Possible values include: 'Activity', - /// 'Bookmark', 'SecurityAlert' - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets or sets the query id - /// - [JsonProperty(PropertyName = "queryId")] - public string QueryId { get; set; } - - /// - /// Gets or sets the error message - /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Kind == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); - } - if (ErrorMessage == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ErrorMessage"); - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineResultsMetadata.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineResultsMetadata.cs deleted file mode 100644 index 2f5583f8a9dd..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TimelineResultsMetadata.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Expansion result metadata. - /// - public partial class TimelineResultsMetadata - { - /// - /// Initializes a new instance of the TimelineResultsMetadata class. - /// - public TimelineResultsMetadata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TimelineResultsMetadata class. - /// - /// the total items found for the timeline - /// request - /// timeline aggregation per kind - /// information about the failure queries - public TimelineResultsMetadata(int totalCount, IList aggregations, IList errors = default(IList)) - { - TotalCount = totalCount; - Aggregations = aggregations; - Errors = errors; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the total items found for the timeline request - /// - [JsonProperty(PropertyName = "totalCount")] - public int TotalCount { get; set; } - - /// - /// Gets or sets timeline aggregation per kind - /// - [JsonProperty(PropertyName = "aggregations")] - public IList Aggregations { get; set; } - - /// - /// Gets or sets information about the failure queries - /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Aggregations == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Aggregations"); - } - if (Aggregations != null) - { - foreach (var element in Aggregations) - { - if (element != null) - { - element.Validate(); - } - } - } - if (Errors != null) - { - foreach (var element1 in Errors) - { - if (element1 != null) - { - element1.Validate(); - } - } - } - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs index ae772b63d87d..37f90f2c4478 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs @@ -20,5 +20,9 @@ public static class TriggersOn /// Trigger on Incidents /// public const string Incidents = "Incidents"; + /// + /// Trigger on Alerts + /// + public const string Alerts = "Alerts"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs index a840362759d8..26504ceba80b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs @@ -20,5 +20,9 @@ public static class TriggersWhen /// Trigger on created objects /// public const string Created = "Created"; + /// + /// Trigger on updated objects + /// + public const string Updated = "Updated"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Ueba.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Ueba.cs deleted file mode 100644 index 5c51113236c0..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Ueba.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Settings with single toggle. - /// - [Rest.Serialization.JsonTransformation] - public partial class Ueba : Settings - { - /// - /// Initializes a new instance of the Ueba class. - /// - public Ueba() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Ueba class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Etag of the azure resource - /// The relevant data sources that enriched - /// by ueba - public Ueba(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), IList dataSources = default(IList)) - : base(id, name, type, systemData, etag) - { - DataSources = dataSources; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the relevant data sources that enriched by ueba - /// - [JsonProperty(PropertyName = "properties.dataSources")] - public IList DataSources { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/UebaDataSources.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/UebaDataSources.cs deleted file mode 100644 index ebcd91eeb63c..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/UebaDataSources.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for UebaDataSources. - /// - public static class UebaDataSources - { - public const string AuditLogs = "AuditLogs"; - public const string AzureActivity = "AzureActivity"; - public const string SecurityEvent = "SecurityEvent"; - public const string SigninLogs = "SigninLogs"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs deleted file mode 100644 index f40ba92fcd84..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - - /// - /// Defines values for Version. - /// - public static class Version - { - public const string V1 = "V1"; - public const string V2 = "V2"; - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs index a9587dbd1368..2468ac47f826 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs @@ -36,6 +36,8 @@ public Watchlist() /// /// The display name of the watchlist /// The provider of the watchlist + /// The source of the watchlist. Possible values + /// include: 'Local file', 'Remote storage' /// The search key is used to optimize /// query performance when using watchlists for joins with other data. /// For example, enable a column with IP addresses to be the designated @@ -51,10 +53,6 @@ public Watchlist() /// createdBy and modifiedBy information. /// Etag of the azure resource /// The id (a Guid) of the watchlist - /// The filename of the watchlist, called - /// 'source' - /// The sourceType of the watchlist. Possible - /// values include: 'Local file', 'Remote storage' /// The time the watchlist was created /// The last time the watchlist was /// updated @@ -73,25 +71,24 @@ public Watchlist() /// (in ISO 8601 duration format) /// The tenantId where the watchlist belongs /// to - /// The number of lines in a csv/tsv + /// The number of lines in a csv /// content to skip before the header /// The raw content that represents to - /// watchlist items to create. In case of csv/tsv content type, it's - /// the content of the file that will parsed by the endpoint - /// The content type of the raw content. - /// Example : text/csv or text/tsv + /// watchlist items to create. Example : This line will be skipped + /// header1,header2 + /// value1,value2 + /// The content type of the raw content. For + /// now, only text/csv is valid /// The status of the Watchlist upload : - /// New, InProgress or Complete. Pls note : When a Watchlist upload - /// status is equal to InProgress, the Watchlist cannot be - /// deleted - public Watchlist(string displayName, string provider, string itemsSearchKey, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string watchlistId = default(string), string source = default(string), string sourceType = default(string), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), UserInfo createdBy = default(UserInfo), UserInfo updatedBy = default(UserInfo), string description = default(string), string watchlistType = default(string), string watchlistAlias = default(string), bool? isDeleted = default(bool?), IList labels = default(IList), System.TimeSpan? defaultDuration = default(System.TimeSpan?), string tenantId = default(string), int? numberOfLinesToSkip = default(int?), string rawContent = default(string), string contentType = default(string), string uploadStatus = default(string)) + /// New, InProgress or Complete. **Note** : When a Watchlist upload + /// status is InProgress, the Watchlist cannot be deleted + public Watchlist(string displayName, string provider, string source, string itemsSearchKey, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string watchlistId = default(string), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), UserInfo createdBy = default(UserInfo), UserInfo updatedBy = default(UserInfo), string description = default(string), string watchlistType = default(string), string watchlistAlias = default(string), bool? isDeleted = default(bool?), IList labels = default(IList), System.TimeSpan? defaultDuration = default(System.TimeSpan?), string tenantId = default(string), int? numberOfLinesToSkip = default(int?), string rawContent = default(string), string contentType = default(string), string uploadStatus = default(string)) : base(id, name, type, systemData, etag) { WatchlistId = watchlistId; DisplayName = displayName; Provider = provider; Source = source; - SourceType = sourceType; Created = created; Updated = updated; CreatedBy = createdBy; @@ -135,18 +132,12 @@ public Watchlist() public string Provider { get; set; } /// - /// Gets or sets the filename of the watchlist, called 'source' + /// Gets or sets the source of the watchlist. Possible values include: + /// 'Local file', 'Remote storage' /// [JsonProperty(PropertyName = "properties.source")] public string Source { get; set; } - /// - /// Gets or sets the sourceType of the watchlist. Possible values - /// include: 'Local file', 'Remote storage' - /// - [JsonProperty(PropertyName = "properties.sourceType")] - public string SourceType { get; set; } - /// /// Gets or sets the time the watchlist was created /// @@ -216,16 +207,17 @@ public Watchlist() public string TenantId { get; set; } /// - /// Gets or sets the number of lines in a csv/tsv content to skip - /// before the header + /// Gets or sets the number of lines in a csv content to skip before + /// the header /// [JsonProperty(PropertyName = "properties.numberOfLinesToSkip")] public int? NumberOfLinesToSkip { get; set; } /// /// Gets or sets the raw content that represents to watchlist items to - /// create. In case of csv/tsv content type, it's the content of the - /// file that will parsed by the endpoint + /// create. Example : This line will be skipped + /// header1,header2 + /// value1,value2 /// [JsonProperty(PropertyName = "properties.rawContent")] public string RawContent { get; set; } @@ -241,15 +233,15 @@ public Watchlist() public string ItemsSearchKey { get; set; } /// - /// Gets or sets the content type of the raw content. Example : - /// text/csv or text/tsv + /// Gets or sets the content type of the raw content. For now, only + /// text/csv is valid /// [JsonProperty(PropertyName = "properties.contentType")] public string ContentType { get; set; } /// /// Gets or sets the status of the Watchlist upload : New, InProgress - /// or Complete. Pls note : When a Watchlist upload status is equal to + /// or Complete. **Note** : When a Watchlist upload status is /// InProgress, the Watchlist cannot be deleted /// [JsonProperty(PropertyName = "properties.uploadStatus")] @@ -271,6 +263,10 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Provider"); } + if (Source == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Source"); + } if (ItemsSearchKey == null) { throw new ValidationException(ValidationRules.CannotBeNull, "ItemsSearchKey"); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistItem.cs index 161d2e5d31bc..91b67bf38c09 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistItem.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistItem.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Represents a Watchlist item in Azure Security Insights. + /// Represents a Watchlist Item in Azure Security Insights. /// [Rest.Serialization.JsonTransformation] public partial class WatchlistItem : ResourceWithEtag diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs deleted file mode 100644 index 2957b0966316..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines headers for CreateOrUpdate operation. - /// - public partial class WatchlistsCreateOrUpdateHeaders - { - /// - /// Initializes a new instance of the WatchlistsCreateOrUpdateHeaders - /// class. - /// - public WatchlistsCreateOrUpdateHeaders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WatchlistsCreateOrUpdateHeaders - /// class. - /// - /// Contains the status URL on which - /// clients are expected to poll the status of the operation. - public WatchlistsCreateOrUpdateHeaders(string azureAsyncOperation = default(string)) - { - AzureAsyncOperation = azureAsyncOperation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets contains the status URL on which clients are expected - /// to poll the status of the operation. - /// - [JsonProperty(PropertyName = "Azure-AsyncOperation")] - public string AzureAsyncOperation { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs deleted file mode 100644 index 6de85fb5416e..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines headers for Delete operation. - /// - public partial class WatchlistsDeleteHeaders - { - /// - /// Initializes a new instance of the WatchlistsDeleteHeaders class. - /// - public WatchlistsDeleteHeaders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WatchlistsDeleteHeaders class. - /// - /// Contains the status URL on which - /// clients are expected to poll the status of the delete - /// operation. - public WatchlistsDeleteHeaders(string azureAsyncOperation = default(string)) - { - AzureAsyncOperation = azureAsyncOperation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets contains the status URL on which clients are expected - /// to poll the status of the delete operation. - /// - [JsonProperty(PropertyName = "Azure-AsyncOperation")] - public string AzureAsyncOperation { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs deleted file mode 100644 index f76018a4cce5..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Detail about the webhook object. - /// - public partial class Webhook - { - /// - /// Initializes a new instance of the Webhook class. - /// - public Webhook() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Webhook class. - /// - /// Unique identifier for the webhook. - /// URL that gets invoked by the - /// webhook. - /// Time when the webhook secret - /// was updated. - /// A flag to instruct the backend - /// service to rotate webhook secret. - public Webhook(string webhookId = default(string), string webhookUrl = default(string), string webhookSecretUpdateTime = default(string), bool? rotateWebhookSecret = default(bool?)) - { - WebhookId = webhookId; - WebhookUrl = webhookUrl; - WebhookSecretUpdateTime = webhookSecretUpdateTime; - RotateWebhookSecret = rotateWebhookSecret; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique identifier for the webhook. - /// - [JsonProperty(PropertyName = "webhookId")] - public string WebhookId { get; set; } - - /// - /// Gets or sets URL that gets invoked by the webhook. - /// - [JsonProperty(PropertyName = "webhookUrl")] - public string WebhookUrl { get; set; } - - /// - /// Gets or sets time when the webhook secret was updated. - /// - [JsonProperty(PropertyName = "webhookSecretUpdateTime")] - public string WebhookSecretUpdateTime { get; set; } - - /// - /// Gets or sets a flag to instruct the backend service to rotate - /// webhook secret. - /// - [JsonProperty(PropertyName = "rotateWebhookSecret")] - public bool? RotateWebhookSecret { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs deleted file mode 100644 index 5300acb5198b..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs +++ /dev/null @@ -1,920 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// OfficeConsentsOperations operations. - /// - internal partial class OfficeConsentsOperations : IServiceOperations, IOfficeConsentsOperations - { - /// - /// Initializes a new instance of the OfficeConsentsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal OfficeConsentsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets all office365 consents. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets an office365 consent. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string consentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (consentId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "consentId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("consentId", consentId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{consentId}", System.Uri.EscapeDataString(consentId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete the office365 consent. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string consentId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (consentId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "consentId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("consentId", consentId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{consentId}", System.Uri.EscapeDataString(consentId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all office365 consents. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperationsExtensions.cs deleted file mode 100644 index 226117d9e12d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperationsExtensions.cs +++ /dev/null @@ -1,188 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for OfficeConsentsOperations. - /// - public static partial class OfficeConsentsOperationsExtensions - { - /// - /// Gets all office365 consents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - public static IPage List(this IOfficeConsentsOperations operations, string resourceGroupName, string workspaceName) - { - return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); - } - - /// - /// Gets all office365 consents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOfficeConsentsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an office365 consent. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - public static OfficeConsent Get(this IOfficeConsentsOperations operations, string resourceGroupName, string workspaceName, string consentId) - { - return operations.GetAsync(resourceGroupName, workspaceName, consentId).GetAwaiter().GetResult(); - } - - /// - /// Gets an office365 consent. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IOfficeConsentsOperations operations, string resourceGroupName, string workspaceName, string consentId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, consentId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the office365 consent. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - public static void Delete(this IOfficeConsentsOperations operations, string resourceGroupName, string workspaceName, string consentId) - { - operations.DeleteAsync(resourceGroupName, workspaceName, consentId).GetAwaiter().GetResult(); - } - - /// - /// Delete the office365 consent. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// consent ID - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IOfficeConsentsOperations operations, string resourceGroupName, string workspaceName, string consentId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, consentId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets all office365 consents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOfficeConsentsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all office365 consents. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOfficeConsentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs deleted file mode 100644 index acdfcbab4ada..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs +++ /dev/null @@ -1,1002 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ProductSettingsOperations operations. - /// - internal partial class ProductSettingsOperations : IServiceOperations, IProductSettingsOperations - { - /// - /// Initializes a new instance of the ProductSettingsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal ProductSettingsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// List of all the settings - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a setting. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (settingsName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "settingsName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("settingsName", settingsName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{settingsName}", System.Uri.EscapeDataString(settingsName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete setting of the product. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (settingsName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "settingsName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("settingsName", settingsName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{settingsName}", System.Uri.EscapeDataString(settingsName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Updates setting. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// The setting - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsName, Settings settings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (settingsName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "settingsName"); - } - if (settings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "settings"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("settingsName", settingsName); - tracingParameters.Add("settings", settings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{settingsName}", System.Uri.EscapeDataString(settingsName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(settings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(settings, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperationsExtensions.cs deleted file mode 100644 index e6a80552d519..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperationsExtensions.cs +++ /dev/null @@ -1,206 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ProductSettingsOperations. - /// - public static partial class ProductSettingsOperationsExtensions - { - /// - /// List of all the settings - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - public static SettingList List(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName) - { - return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); - } - - /// - /// List of all the settings - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - public static Settings Get(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsName) - { - return operations.GetAsync(resourceGroupName, workspaceName, settingsName).GetAwaiter().GetResult(); - } - - /// - /// Gets a setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, settingsName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete setting of the product. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - public static void Delete(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsName) - { - operations.DeleteAsync(resourceGroupName, workspaceName, settingsName).GetAwaiter().GetResult(); - } - - /// - /// Delete setting of the product. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, settingsName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// The setting - /// - public static Settings Update(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsName, Settings settings) - { - return operations.UpdateAsync(resourceGroupName, workspaceName, settingsName, settings).GetAwaiter().GetResult(); - } - - /// - /// Updates setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba - /// - /// - /// The setting - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IProductSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsName, Settings settings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, settingsName, settings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs index 60d9df8c0677..9d683ebe92ad 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs @@ -19,51 +19,25 @@ public static IEnumerable> ApiInfo_SecurityInsight { return new Tuple[] { - new Tuple("OperationalInsights", "Actions", "2022-01-01-preview"), - new Tuple("OperationalInsights", "AlertRuleTemplates", "2022-01-01-preview"), - new Tuple("OperationalInsights", "AlertRules", "2022-01-01-preview"), - new Tuple("OperationalInsights", "AutomationRules", "2022-01-01-preview"), - new Tuple("OperationalInsights", "Bookmark", "2022-01-01-preview"), - new Tuple("OperationalInsights", "BookmarkRelations", "2022-01-01-preview"), - new Tuple("OperationalInsights", "Bookmarks", "2022-01-01-preview"), - new Tuple("OperationalInsights", "DataConnectors", "2022-01-01-preview"), - new Tuple("OperationalInsights", "DataConnectorsCheckRequirements", "2022-01-01-preview"), - new Tuple("OperationalInsights", "Entities", "2022-01-01-preview"), - new Tuple("OperationalInsights", "EntitiesGetTimeline", "2022-01-01-preview"), - new Tuple("OperationalInsights", "EntitiesRelations", "2022-01-01-preview"), - new Tuple("OperationalInsights", "EntityQueries", "2022-01-01-preview"), - new Tuple("OperationalInsights", "EntityQueryTemplates", "2022-01-01-preview"), - new Tuple("OperationalInsights", "EntityRelations", "2022-01-01-preview"), - new Tuple("OperationalInsights", "IncidentComments", "2022-01-01-preview"), - new Tuple("OperationalInsights", "IncidentRelations", "2022-01-01-preview"), - new Tuple("OperationalInsights", "Incidents", "2022-01-01-preview"), - new Tuple("OperationalInsights", "Metadata", "2022-01-01-preview"), - new Tuple("OperationalInsights", "OfficeConsents", "2022-01-01-preview"), - new Tuple("OperationalInsights", "ProductSettings", "2022-01-01-preview"), - new Tuple("OperationalInsights", "SentinelOnboardingStates", "2022-01-01-preview"), - new Tuple("OperationalInsights", "SourceControl", "2022-01-01-preview"), - new Tuple("OperationalInsights", "SourceControls", "2022-01-01-preview"), - new Tuple("OperationalInsights", "ThreatIntelligenceIndicator", "2022-01-01-preview"), - new Tuple("OperationalInsights", "ThreatIntelligenceIndicatorMetrics", "2022-01-01-preview"), - new Tuple("OperationalInsights", "ThreatIntelligenceIndicators", "2022-01-01-preview"), - new Tuple("OperationalInsights", "WatchlistItems", "2022-01-01-preview"), - new Tuple("OperationalInsights", "Watchlists", "2022-01-01-preview"), - new Tuple("SecurityInsights", "DomainWhois", "2022-01-01-preview"), - new Tuple("SecurityInsights", "IPGeodata", "2022-01-01-preview"), - new Tuple("SecurityInsights", "Operations", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Actions", "2022-11-01"), + new Tuple("OperationalInsights", "AlertRuleTemplates", "2022-11-01"), + new Tuple("OperationalInsights", "AlertRules", "2022-11-01"), + new Tuple("OperationalInsights", "AutomationRules", "2022-11-01"), + new Tuple("OperationalInsights", "Bookmarks", "2022-11-01"), + new Tuple("OperationalInsights", "DataConnectors", "2022-11-01"), + new Tuple("OperationalInsights", "IncidentComments", "2022-11-01"), + new Tuple("OperationalInsights", "IncidentRelations", "2022-11-01"), + new Tuple("OperationalInsights", "Incidents", "2022-11-01"), + new Tuple("OperationalInsights", "SecurityMLAnalyticsSettings", "2022-11-01"), + new Tuple("OperationalInsights", "SentinelOnboardingStates", "2022-11-01"), + new Tuple("OperationalInsights", "ThreatIntelligenceIndicator", "2022-11-01"), + new Tuple("OperationalInsights", "ThreatIntelligenceIndicatorMetrics", "2022-11-01"), + new Tuple("OperationalInsights", "ThreatIntelligenceIndicators", "2022-11-01"), + new Tuple("OperationalInsights", "WatchlistItems", "2022-11-01"), + new Tuple("OperationalInsights", "Watchlists", "2022-11-01"), + new Tuple("SecurityInsights", "Operations", "2022-11-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "2.0.4421"; - public static readonly String AutoRestBootStrapperVersion = "autorest@3.5.1"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/securityinsights/resource-manager/readme.md --csharp --version=2.0.4421 --reflect-api-versions --csharp-sdks-folder=C:\\One\\azure\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "main"; - public static readonly String GithubCommidId = "96da969aa75e2beb27c3dbc2d69a76900856cc52"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs index 349e1e2ffd27..84141aa561a6 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs @@ -95,65 +95,20 @@ public partial class SecurityInsights : ServiceClient, ISecuri /// public virtual IAutomationRulesOperations AutomationRules { get; private set; } - /// - /// Gets the IIncidentsOperations. - /// - public virtual IIncidentsOperations Incidents { get; private set; } - /// /// Gets the IBookmarksOperations. /// public virtual IBookmarksOperations Bookmarks { get; private set; } /// - /// Gets the IBookmarkRelationsOperations. - /// - public virtual IBookmarkRelationsOperations BookmarkRelations { get; private set; } - - /// - /// Gets the IBookmarkOperations. - /// - public virtual IBookmarkOperations Bookmark { get; private set; } - - /// - /// Gets the IIPGeodataOperations. - /// - public virtual IIPGeodataOperations IPGeodata { get; private set; } - - /// - /// Gets the IDomainWhoisOperations. - /// - public virtual IDomainWhoisOperations DomainWhois { get; private set; } - - /// - /// Gets the IEntitiesOperations. - /// - public virtual IEntitiesOperations Entities { get; private set; } - - /// - /// Gets the IEntitiesGetTimelineOperations. - /// - public virtual IEntitiesGetTimelineOperations EntitiesGetTimeline { get; private set; } - - /// - /// Gets the IEntitiesRelationsOperations. - /// - public virtual IEntitiesRelationsOperations EntitiesRelations { get; private set; } - - /// - /// Gets the IEntityRelationsOperations. - /// - public virtual IEntityRelationsOperations EntityRelations { get; private set; } - - /// - /// Gets the IEntityQueriesOperations. + /// Gets the IDataConnectorsOperations. /// - public virtual IEntityQueriesOperations EntityQueries { get; private set; } + public virtual IDataConnectorsOperations DataConnectors { get; private set; } /// - /// Gets the IEntityQueryTemplatesOperations. + /// Gets the IIncidentsOperations. /// - public virtual IEntityQueryTemplatesOperations EntityQueryTemplates { get; private set; } + public virtual IIncidentsOperations Incidents { get; private set; } /// /// Gets the IIncidentCommentsOperations. @@ -165,35 +120,15 @@ public partial class SecurityInsights : ServiceClient, ISecuri /// public virtual IIncidentRelationsOperations IncidentRelations { get; private set; } - /// - /// Gets the IMetadataOperations. - /// - public virtual IMetadataOperations Metadata { get; private set; } - - /// - /// Gets the IOfficeConsentsOperations. - /// - public virtual IOfficeConsentsOperations OfficeConsents { get; private set; } - /// /// Gets the ISentinelOnboardingStatesOperations. /// public virtual ISentinelOnboardingStatesOperations SentinelOnboardingStates { get; private set; } /// - /// Gets the IProductSettingsOperations. + /// Gets the ISecurityMLAnalyticsSettingsOperations. /// - public virtual IProductSettingsOperations ProductSettings { get; private set; } - - /// - /// Gets the ISourceControlOperations. - /// - public virtual ISourceControlOperations SourceControl { get; private set; } - - /// - /// Gets the ISourceControlsOperations. - /// - public virtual ISourceControlsOperations SourceControls { get; private set; } + public virtual ISecurityMLAnalyticsSettingsOperations SecurityMLAnalyticsSettings { get; private set; } /// /// Gets the IThreatIntelligenceIndicatorOperations. @@ -220,16 +155,6 @@ public partial class SecurityInsights : ServiceClient, ISecuri /// public virtual IWatchlistItemsOperations WatchlistItems { get; private set; } - /// - /// Gets the IDataConnectorsOperations. - /// - public virtual IDataConnectorsOperations DataConnectors { get; private set; } - - /// - /// Gets the IDataConnectorsCheckRequirementsOperations. - /// - public virtual IDataConnectorsCheckRequirementsOperations DataConnectorsCheckRequirements { get; private set; } - /// /// Gets the IOperations. /// @@ -480,36 +405,21 @@ private void Initialize() Actions = new ActionsOperations(this); AlertRuleTemplates = new AlertRuleTemplatesOperations(this); AutomationRules = new AutomationRulesOperations(this); - Incidents = new IncidentsOperations(this); Bookmarks = new BookmarksOperations(this); - BookmarkRelations = new BookmarkRelationsOperations(this); - Bookmark = new BookmarkOperations(this); - IPGeodata = new IPGeodataOperations(this); - DomainWhois = new DomainWhoisOperations(this); - Entities = new EntitiesOperations(this); - EntitiesGetTimeline = new EntitiesGetTimelineOperations(this); - EntitiesRelations = new EntitiesRelationsOperations(this); - EntityRelations = new EntityRelationsOperations(this); - EntityQueries = new EntityQueriesOperations(this); - EntityQueryTemplates = new EntityQueryTemplatesOperations(this); + DataConnectors = new DataConnectorsOperations(this); + Incidents = new IncidentsOperations(this); IncidentComments = new IncidentCommentsOperations(this); IncidentRelations = new IncidentRelationsOperations(this); - Metadata = new MetadataOperations(this); - OfficeConsents = new OfficeConsentsOperations(this); SentinelOnboardingStates = new SentinelOnboardingStatesOperations(this); - ProductSettings = new ProductSettingsOperations(this); - SourceControl = new SourceControlOperations(this); - SourceControls = new SourceControlsOperations(this); + SecurityMLAnalyticsSettings = new SecurityMLAnalyticsSettingsOperations(this); ThreatIntelligenceIndicator = new ThreatIntelligenceIndicatorOperations(this); ThreatIntelligenceIndicators = new ThreatIntelligenceIndicatorsOperations(this); ThreatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsOperations(this); Watchlists = new WatchlistsOperations(this); WatchlistItems = new WatchlistItemsOperations(this); - DataConnectors = new DataConnectorsOperations(this); - DataConnectorsCheckRequirements = new DataConnectorsCheckRequirementsOperations(this); Operations = new Operations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2022-01-01-preview"; + ApiVersion = "2022-11-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -547,26 +457,14 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("conditionType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("actionType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("actionType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingsOperations.cs similarity index 91% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingsOperations.cs index 9a749a3cc322..a817bc5c4b3d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingsOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.SecurityInsights using System.Threading.Tasks; /// - /// EntityQueriesOperations operations. + /// SecurityMLAnalyticsSettingsOperations operations. /// - internal partial class EntityQueriesOperations : IServiceOperations, IEntityQueriesOperations + internal partial class SecurityMLAnalyticsSettingsOperations : IServiceOperations, ISecurityMLAnalyticsSettingsOperations { /// - /// Initializes a new instance of the EntityQueriesOperations class. + /// Initializes a new instance of the SecurityMLAnalyticsSettingsOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class EntityQueriesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntityQueriesOperations(SecurityInsights client) + internal SecurityMLAnalyticsSettingsOperations(SecurityInsights client) { if (client == null) { @@ -51,7 +51,7 @@ internal EntityQueriesOperations(SecurityInsights client) public SecurityInsights Client { get; private set; } /// - /// Gets all entity queries. + /// Gets all Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -59,10 +59,6 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// The name of the workspace. /// - /// - /// The entity query kind we want to fetch. Possible values include: - /// 'Expansion', 'Activity' - /// /// /// Headers that will be added to request. /// @@ -84,7 +80,7 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string kind = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -145,7 +141,6 @@ internal EntityQueriesOperations(SecurityInsights client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("kind", kind); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -153,15 +148,11 @@ internal EntityQueriesOperations(SecurityInsights client) } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); List _queryParameters = new List(); - if (kind != null) - { - _queryParameters.Add(string.Format("kind={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(kind, Client.SerializationSettings).Trim('"')))); - } if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); @@ -259,7 +250,7 @@ internal EntityQueriesOperations(SecurityInsights client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -272,7 +263,7 @@ internal EntityQueriesOperations(SecurityInsights client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -292,7 +283,7 @@ internal EntityQueriesOperations(SecurityInsights client) } /// - /// Gets an entity query. + /// Gets the Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -300,8 +291,8 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// The name of the workspace. /// - /// - /// entity query ID + /// + /// Security ML Analytics Settings resource name /// /// /// Headers that will be added to request. @@ -324,7 +315,7 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -378,9 +369,9 @@ internal EntityQueriesOperations(SecurityInsights client) throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); } } - if (entityQueryId == null) + if (settingsResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityQueryId"); + throw new ValidationException(ValidationRules.CannotBeNull, "settingsResourceName"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -391,17 +382,17 @@ internal EntityQueriesOperations(SecurityInsights client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityQueryId", entityQueryId); + tracingParameters.Add("settingsResourceName", settingsResourceName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityQueryId}", System.Uri.EscapeDataString(entityQueryId)); + _url = _url.Replace("{settingsResourceName}", System.Uri.EscapeDataString(settingsResourceName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -500,7 +491,7 @@ internal EntityQueriesOperations(SecurityInsights client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -513,7 +504,7 @@ internal EntityQueriesOperations(SecurityInsights client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -533,7 +524,7 @@ internal EntityQueriesOperations(SecurityInsights client) } /// - /// Creates or updates the entity query. + /// Creates or updates the Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -541,11 +532,11 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// The name of the workspace. /// - /// - /// entity query ID + /// + /// Security ML Analytics Settings resource name /// - /// - /// The entity query we want to create or update + /// + /// The security ML Analytics setting /// /// /// Headers that will be added to request. @@ -568,7 +559,7 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryId, CustomEntityQuery entityQuery, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsResourceName, SecurityMLAnalyticsSetting securityMLAnalyticsSetting, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -622,13 +613,13 @@ internal EntityQueriesOperations(SecurityInsights client) throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); } } - if (entityQueryId == null) + if (settingsResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityQueryId"); + throw new ValidationException(ValidationRules.CannotBeNull, "settingsResourceName"); } - if (entityQuery == null) + if (securityMLAnalyticsSetting == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityQuery"); + throw new ValidationException(ValidationRules.CannotBeNull, "securityMLAnalyticsSetting"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -639,18 +630,18 @@ internal EntityQueriesOperations(SecurityInsights client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityQueryId", entityQueryId); - tracingParameters.Add("entityQuery", entityQuery); + tracingParameters.Add("settingsResourceName", settingsResourceName); + tracingParameters.Add("securityMLAnalyticsSetting", securityMLAnalyticsSetting); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityQueryId}", System.Uri.EscapeDataString(entityQueryId)); + _url = _url.Replace("{settingsResourceName}", System.Uri.EscapeDataString(settingsResourceName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -694,9 +685,9 @@ internal EntityQueriesOperations(SecurityInsights client) // Serialize Request string _requestContent = null; - if(entityQuery != null) + if(securityMLAnalyticsSetting != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(entityQuery, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(securityMLAnalyticsSetting, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -755,7 +746,7 @@ internal EntityQueriesOperations(SecurityInsights client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -768,7 +759,7 @@ internal EntityQueriesOperations(SecurityInsights client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -786,7 +777,7 @@ internal EntityQueriesOperations(SecurityInsights client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -806,7 +797,7 @@ internal EntityQueriesOperations(SecurityInsights client) } /// - /// Delete the entity query. + /// Delete the Security ML Analytics Settings. /// /// /// The name of the resource group. The name is case insensitive. @@ -814,8 +805,8 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// The name of the workspace. /// - /// - /// entity query ID + /// + /// Security ML Analytics Settings resource name /// /// /// Headers that will be added to request. @@ -835,7 +826,7 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string entityQueryId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string settingsResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -889,9 +880,9 @@ internal EntityQueriesOperations(SecurityInsights client) throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); } } - if (entityQueryId == null) + if (settingsResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "entityQueryId"); + throw new ValidationException(ValidationRules.CannotBeNull, "settingsResourceName"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -902,17 +893,17 @@ internal EntityQueriesOperations(SecurityInsights client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("entityQueryId", entityQueryId); + tracingParameters.Add("settingsResourceName", settingsResourceName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{entityQueryId}", System.Uri.EscapeDataString(entityQueryId)); + _url = _url.Replace("{settingsResourceName}", System.Uri.EscapeDataString(settingsResourceName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -1026,7 +1017,7 @@ internal EntityQueriesOperations(SecurityInsights client) } /// - /// Gets all entity queries. + /// Gets all Security ML Analytics Settings. /// /// /// The NextLink from the previous successful call to List operation. @@ -1052,7 +1043,7 @@ internal EntityQueriesOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1166,7 +1157,7 @@ internal EntityQueriesOperations(SecurityInsights client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1179,7 +1170,7 @@ internal EntityQueriesOperations(SecurityInsights client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingsOperationsExtensions.cs similarity index 60% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperationsExtensions.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingsOperationsExtensions.cs index 431117562125..090746ea5297 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingsOperationsExtensions.cs @@ -17,12 +17,12 @@ namespace Microsoft.Azure.Management.SecurityInsights using System.Threading.Tasks; /// - /// Extension methods for SourceControlsOperations. + /// Extension methods for SecurityMLAnalyticsSettingsOperations. /// - public static partial class SourceControlsOperationsExtensions + public static partial class SecurityMLAnalyticsSettingsOperationsExtensions { /// - /// Gets all source controls, without source control items. + /// Gets all Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -33,13 +33,13 @@ public static partial class SourceControlsOperationsExtensions /// /// The name of the workspace. /// - public static IPage List(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName) + public static IPage List(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName) { return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); } /// - /// Gets all source controls, without source control items. + /// Gets all Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -53,7 +53,7 @@ public static IPage List(this ISourceControlsOperations operation /// /// The cancellation token. /// - public static async Task> ListAsync(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) { @@ -62,7 +62,7 @@ public static IPage List(this ISourceControlsOperations operation } /// - /// Gets a source control byt its identifier. + /// Gets the Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -73,16 +73,16 @@ public static IPage List(this ISourceControlsOperations operation /// /// The name of the workspace. /// - /// - /// Source control Id + /// + /// Security ML Analytics Settings resource name /// - public static SourceControl Get(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, string sourceControlId) + public static SecurityMLAnalyticsSetting Get(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsResourceName) { - return operations.GetAsync(resourceGroupName, workspaceName, sourceControlId).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, workspaceName, settingsResourceName).GetAwaiter().GetResult(); } /// - /// Gets a source control byt its identifier. + /// Gets the Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -93,22 +93,22 @@ public static SourceControl Get(this ISourceControlsOperations operations, strin /// /// The name of the workspace. /// - /// - /// Source control Id + /// + /// Security ML Analytics Settings resource name /// /// /// The cancellation token. /// - public static async Task GetAsync(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, string sourceControlId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsResourceName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sourceControlId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, settingsResourceName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Delete a source control. + /// Creates or updates the Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -119,16 +119,19 @@ public static SourceControl Get(this ISourceControlsOperations operations, strin /// /// The name of the workspace. /// - /// - /// Source control Id + /// + /// Security ML Analytics Settings resource name /// - public static void Delete(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, string sourceControlId) + /// + /// The security ML Analytics setting + /// + public static SecurityMLAnalyticsSetting CreateOrUpdate(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsResourceName, SecurityMLAnalyticsSetting securityMLAnalyticsSetting) { - operations.DeleteAsync(resourceGroupName, workspaceName, sourceControlId).GetAwaiter().GetResult(); + return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting).GetAwaiter().GetResult(); } /// - /// Delete a source control. + /// Creates or updates the Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -139,19 +142,25 @@ public static void Delete(this ISourceControlsOperations operations, string reso /// /// The name of the workspace. /// - /// - /// Source control Id + /// + /// Security ML Analytics Settings resource name + /// + /// + /// The security ML Analytics setting /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, string sourceControlId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsResourceName, SecurityMLAnalyticsSetting securityMLAnalyticsSetting, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, sourceControlId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Creates a source control. + /// Delete the Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -162,19 +171,16 @@ public static void Delete(this ISourceControlsOperations operations, string reso /// /// The name of the workspace. /// - /// - /// Source control Id + /// + /// Security ML Analytics Settings resource name /// - /// - /// The SourceControl - /// - public static SourceControl Create(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, string sourceControlId, SourceControl sourceControl) + public static void Delete(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsResourceName) { - return operations.CreateAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, workspaceName, settingsResourceName).GetAwaiter().GetResult(); } /// - /// Creates a source control. + /// Delete the Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -185,25 +191,19 @@ public static SourceControl Create(this ISourceControlsOperations operations, st /// /// The name of the workspace. /// - /// - /// Source control Id - /// - /// - /// The SourceControl + /// + /// Security ML Analytics Settings resource name /// /// /// The cancellation token. /// - public static async Task CreateAsync(this ISourceControlsOperations operations, string resourceGroupName, string workspaceName, string sourceControlId, SourceControl sourceControl, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this ISecurityMLAnalyticsSettingsOperations operations, string resourceGroupName, string workspaceName, string settingsResourceName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, settingsResourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Gets all source controls, without source control items. + /// Gets all Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -211,13 +211,13 @@ public static SourceControl Create(this ISourceControlsOperations operations, st /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListNext(this ISourceControlsOperations operations, string nextPageLink) + public static IPage ListNext(this ISecurityMLAnalyticsSettingsOperations operations, string nextPageLink) { return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Gets all source controls, without source control items. + /// Gets all Security ML Analytics Settings. /// /// /// The operations group for this extension method. @@ -228,7 +228,7 @@ public static IPage ListNext(this ISourceControlsOperations opera /// /// The cancellation token. /// - public static async Task> ListNextAsync(this ISourceControlsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync(this ISecurityMLAnalyticsSettingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs deleted file mode 100644 index 940c11eb6cba..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs +++ /dev/null @@ -1,473 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// SourceControlOperations operations. - /// - internal partial class SourceControlOperations : IServiceOperations, ISourceControlOperations - { - /// - /// Initializes a new instance of the SourceControlOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal SourceControlOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets a list of repositories metadata. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The repo type. Possible values include: 'Github', 'DevOps' - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListRepositoriesWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string repoType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (repoType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "repoType"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("repoType", repoType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRepositories", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/listRepositories").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(repoType != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(repoType, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a list of repositories metadata. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListRepositoriesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRepositoriesNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperationsExtensions.cs deleted file mode 100644 index 2c084adb4d8d..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperationsExtensions.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SourceControlOperations. - /// - public static partial class SourceControlOperationsExtensions - { - /// - /// Gets a list of repositories metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The repo type. Possible values include: 'Github', 'DevOps' - /// - public static IPage ListRepositories(this ISourceControlOperations operations, string resourceGroupName, string workspaceName, string repoType) - { - return operations.ListRepositoriesAsync(resourceGroupName, workspaceName, repoType).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of repositories metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// The repo type. Possible values include: 'Github', 'DevOps' - /// - /// - /// The cancellation token. - /// - public static async Task> ListRepositoriesAsync(this ISourceControlOperations operations, string resourceGroupName, string workspaceName, string repoType, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRepositoriesWithHttpMessagesAsync(resourceGroupName, workspaceName, repoType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of repositories metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListRepositoriesNext(this ISourceControlOperations operations, string nextPageLink) - { - return operations.ListRepositoriesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of repositories metadata. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRepositoriesNextAsync(this ISourceControlOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRepositoriesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs deleted file mode 100644 index 8f6d46fb0e0a..000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs +++ /dev/null @@ -1,1197 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// SourceControlsOperations operations. - /// - internal partial class SourceControlsOperations : IServiceOperations, ISourceControlsOperations - { - /// - /// Initializes a new instance of the SourceControlsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal SourceControlsOperations(SecurityInsights client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the SecurityInsights - /// - public SecurityInsights Client { get; private set; } - - /// - /// Gets all source controls, without source control items. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a source control byt its identifier. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Source control Id - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sourceControlId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (sourceControlId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sourceControlId", sourceControlId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sourceControlId}", System.Uri.EscapeDataString(sourceControlId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a source control. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Source control Id - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sourceControlId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (sourceControlId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sourceControlId", sourceControlId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sourceControlId}", System.Uri.EscapeDataString(sourceControlId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates a source control. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the workspace. - /// - /// - /// Source control Id - /// - /// - /// The SourceControl - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sourceControlId, SourceControl sourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) - { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (workspaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); - } - if (workspaceName != null) - { - if (workspaceName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); - } - if (workspaceName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); - } - } - if (sourceControlId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlId"); - } - if (sourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControl"); - } - if (sourceControl != null) - { - sourceControl.Validate(); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("sourceControlId", sourceControlId); - tracingParameters.Add("sourceControl", sourceControl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{sourceControlId}", System.Uri.EscapeDataString(sourceControlId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(sourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(sourceControl, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets all source controls, without source control items. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs index faf1dd210e16..b0210dc55f70 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs @@ -62,9 +62,6 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) /// /// Filters the results, based on a Boolean condition. Optional. /// - /// - /// Sorts the results. Optional. - /// /// /// Returns only the first n results. Optional. /// @@ -74,6 +71,9 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) /// nextLink element will include a skiptoken parameter that specifies a /// starting point to use for subsequent calls. Optional. /// + /// + /// Sorts the results. Optional. + /// /// /// Headers that will be added to request. /// @@ -95,7 +95,7 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string filter = default(string), int? top = default(int?), string skipToken = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -159,9 +159,9 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); tracingParameters.Add("filter", filter); - tracingParameters.Add("orderby", orderby); tracingParameters.Add("top", top); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -180,10 +180,6 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) { _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); } - if (orderby != null) - { - _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); - } if (top != null) { _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); @@ -192,6 +188,10 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperationsExtensions.cs index 4cc14ece7746..d2d3a49de87e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperationsExtensions.cs @@ -36,9 +36,6 @@ public static partial class ThreatIntelligenceIndicatorsOperationsExtensions /// /// Filters the results, based on a Boolean condition. Optional. /// - /// - /// Sorts the results. Optional. - /// /// /// Returns only the first n results. Optional. /// @@ -48,9 +45,12 @@ public static partial class ThreatIntelligenceIndicatorsOperationsExtensions /// nextLink element will include a skiptoken parameter that specifies a /// starting point to use for subsequent calls. Optional. /// - public static IPage List(this IThreatIntelligenceIndicatorsOperations operations, string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), string skipToken = default(string)) + /// + /// Sorts the results. Optional. + /// + public static IPage List(this IThreatIntelligenceIndicatorsOperations operations, string resourceGroupName, string workspaceName, string filter = default(string), int? top = default(int?), string skipToken = default(string), string orderby = default(string)) { - return operations.ListAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken).GetAwaiter().GetResult(); + return operations.ListAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby).GetAwaiter().GetResult(); } /// @@ -68,9 +68,6 @@ public static partial class ThreatIntelligenceIndicatorsOperationsExtensions /// /// Filters the results, based on a Boolean condition. Optional. /// - /// - /// Sorts the results. Optional. - /// /// /// Returns only the first n results. Optional. /// @@ -80,12 +77,15 @@ public static partial class ThreatIntelligenceIndicatorsOperationsExtensions /// nextLink element will include a skiptoken parameter that specifies a /// starting point to use for subsequent calls. Optional. /// + /// + /// Sorts the results. Optional. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IThreatIntelligenceIndicatorsOperations operations, string resourceGroupName, string workspaceName, string filter = default(string), string orderby = default(string), int? top = default(int?), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IThreatIntelligenceIndicatorsOperations operations, string resourceGroupName, string workspaceName, string filter = default(string), int? top = default(int?), string skipToken = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs index 1ccd4616a230..573ac6e9168c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs @@ -51,7 +51,7 @@ internal WatchlistItemsOperations(SecurityInsights client) public SecurityInsights Client { get; private set; } /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The name of the resource group. The name is case insensitive. @@ -60,7 +60,7 @@ internal WatchlistItemsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// Skiptoken is only used if a previous operation returned a partial result. @@ -156,8 +156,8 @@ internal WatchlistItemsOperations(SecurityInsights client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("watchlistAlias", watchlistAlias); + tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -303,7 +303,7 @@ internal WatchlistItemsOperations(SecurityInsights client) } /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist item. /// /// /// The name of the resource group. The name is case insensitive. @@ -312,10 +312,10 @@ internal WatchlistItemsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// Headers that will be added to request. @@ -562,10 +562,10 @@ internal WatchlistItemsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// Headers that will be added to request. @@ -782,7 +782,7 @@ internal WatchlistItemsOperations(SecurityInsights client) } /// - /// Creates or updates a watchlist item. + /// Create or update a watchlist item. /// /// /// The name of the resource group. The name is case insensitive. @@ -791,10 +791,10 @@ internal WatchlistItemsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The watchlist item @@ -1068,7 +1068,7 @@ internal WatchlistItemsOperations(SecurityInsights client) } /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs index ce588ad7a0af..1a650c7f8b88 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public static partial class WatchlistItemsOperationsExtensions { /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The operations group for this extension method. @@ -34,7 +34,7 @@ public static partial class WatchlistItemsOperationsExtensions /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// Skiptoken is only used if a previous operation returned a partial result. @@ -48,7 +48,7 @@ public static partial class WatchlistItemsOperationsExtensions } /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The operations group for this extension method. @@ -60,7 +60,7 @@ public static partial class WatchlistItemsOperationsExtensions /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// Skiptoken is only used if a previous operation returned a partial result. @@ -80,7 +80,7 @@ public static partial class WatchlistItemsOperationsExtensions } /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist item. /// /// /// The operations group for this extension method. @@ -92,10 +92,10 @@ public static partial class WatchlistItemsOperationsExtensions /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// public static WatchlistItem Get(this IWatchlistItemsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, string watchlistItemId) { @@ -103,7 +103,7 @@ public static WatchlistItem Get(this IWatchlistItemsOperations operations, strin } /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist item. /// /// /// The operations group for this extension method. @@ -115,10 +115,10 @@ public static WatchlistItem Get(this IWatchlistItemsOperations operations, strin /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The cancellation token. @@ -144,10 +144,10 @@ public static WatchlistItem Get(this IWatchlistItemsOperations operations, strin /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// public static void Delete(this IWatchlistItemsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, string watchlistItemId) { @@ -167,10 +167,10 @@ public static void Delete(this IWatchlistItemsOperations operations, string reso /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The cancellation token. @@ -181,7 +181,7 @@ public static void Delete(this IWatchlistItemsOperations operations, string reso } /// - /// Creates or updates a watchlist item. + /// Create or update a watchlist item. /// /// /// The operations group for this extension method. @@ -193,10 +193,10 @@ public static void Delete(this IWatchlistItemsOperations operations, string reso /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The watchlist item @@ -207,7 +207,7 @@ public static WatchlistItem CreateOrUpdate(this IWatchlistItemsOperations operat } /// - /// Creates or updates a watchlist item. + /// Create or update a watchlist item. /// /// /// The operations group for this extension method. @@ -219,10 +219,10 @@ public static WatchlistItem CreateOrUpdate(this IWatchlistItemsOperations operat /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// - /// Watchlist Item Id (GUID) + /// The watchlist item id (GUID) /// /// /// The watchlist item @@ -239,7 +239,7 @@ public static WatchlistItem CreateOrUpdate(this IWatchlistItemsOperations operat } /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The operations group for this extension method. @@ -253,7 +253,7 @@ public static IPage ListNext(this IWatchlistItemsOperations opera } /// - /// Gets all watchlist Items. + /// Get all watchlist Items. /// /// /// The operations group for this extension method. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs index d18692182c5d..a8159982dfdd 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs @@ -51,7 +51,7 @@ internal WatchlistsOperations(SecurityInsights client) public SecurityInsights Client { get; private set; } /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The name of the resource group. The name is case insensitive. @@ -294,7 +294,7 @@ internal WatchlistsOperations(SecurityInsights client) } /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist, without its watchlist items. /// /// /// The name of the resource group. The name is case insensitive. @@ -303,7 +303,7 @@ internal WatchlistsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// Headers that will be added to request. @@ -544,7 +544,7 @@ internal WatchlistsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// Headers that will be added to request. @@ -564,7 +564,7 @@ internal WatchlistsOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -740,26 +740,13 @@ internal WatchlistsOperations(SecurityInsights client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - try - { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -770,12 +757,7 @@ internal WatchlistsOperations(SecurityInsights client) /// /// 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. + /// should call this endpoint with rawContent and contentType properties. /// /// /// The name of the resource group. The name is case insensitive. @@ -784,7 +766,7 @@ internal WatchlistsOperations(SecurityInsights client) /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The watchlist @@ -810,7 +792,7 @@ internal WatchlistsOperations(SecurityInsights client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -1001,7 +983,7 @@ internal WatchlistsOperations(SecurityInsights client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1044,19 +1026,6 @@ internal WatchlistsOperations(SecurityInsights client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } - try - { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); - } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -1065,7 +1034,7 @@ internal WatchlistsOperations(SecurityInsights client) } /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs index f40955205591..5b12432c4e72 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public static partial class WatchlistsOperationsExtensions { /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The operations group for this extension method. @@ -45,7 +45,7 @@ public static partial class WatchlistsOperationsExtensions } /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The operations group for this extension method. @@ -74,7 +74,7 @@ public static partial class WatchlistsOperationsExtensions } /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist, without its watchlist items. /// /// /// The operations group for this extension method. @@ -86,7 +86,7 @@ public static partial class WatchlistsOperationsExtensions /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// public static Watchlist Get(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias) { @@ -94,7 +94,7 @@ public static Watchlist Get(this IWatchlistsOperations operations, string resour } /// - /// Gets a watchlist, without its watchlist items. + /// Get a watchlist, without its watchlist items. /// /// /// The operations group for this extension method. @@ -106,7 +106,7 @@ public static Watchlist Get(this IWatchlistsOperations operations, string resour /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The cancellation token. @@ -132,11 +132,11 @@ public static Watchlist Get(this IWatchlistsOperations operations, string resour /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// - public static WatchlistsDeleteHeaders Delete(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias) + public static void Delete(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias) { - return operations.DeleteAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult(); } /// @@ -152,28 +152,20 @@ public static WatchlistsDeleteHeaders Delete(this IWatchlistsOperations operatio /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// /// 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. + /// should call this endpoint with rawContent and contentType properties. /// /// /// The operations group for this extension method. @@ -185,7 +177,7 @@ public static WatchlistsDeleteHeaders Delete(this IWatchlistsOperations operatio /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The watchlist @@ -198,12 +190,7 @@ public static Watchlist CreateOrUpdate(this IWatchlistsOperations operations, st /// /// 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. + /// should call this endpoint with rawContent and contentType properties. /// /// /// The operations group for this extension method. @@ -215,7 +202,7 @@ public static Watchlist CreateOrUpdate(this IWatchlistsOperations operations, st /// The name of the workspace. /// /// - /// Watchlist Alias + /// The watchlist alias /// /// /// The watchlist @@ -232,7 +219,7 @@ public static Watchlist CreateOrUpdate(this IWatchlistsOperations operations, st } /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The operations group for this extension method. @@ -246,7 +233,7 @@ public static IPage ListNext(this IWatchlistsOperations operations, s } /// - /// Gets all watchlists, without watchlist items. + /// Get all watchlists, without watchlist items. /// /// /// The operations group for this extension method.