-
Notifications
You must be signed in to change notification settings - Fork 40
/
client.go
125 lines (102 loc) · 6.64 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package v2023_02_01
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/actions"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/alertrules"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/alertruletemplates"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/automationrules"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/bookmarks"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/dataconnectors"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentalerts"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentbookmarks"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentcomments"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidententities"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentrelations"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidents"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/metadata"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/threatintelligence"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/watchlistitems"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/watchlists"
)
type Client struct {
Actions *actions.ActionsClient
AlertRuleTemplates *alertruletemplates.AlertRuleTemplatesClient
AlertRules *alertrules.AlertRulesClient
AutomationRules *automationrules.AutomationRulesClient
Bookmarks *bookmarks.BookmarksClient
DataConnectors *dataconnectors.DataConnectorsClient
IncidentAlerts *incidentalerts.IncidentAlertsClient
IncidentBookmarks *incidentbookmarks.IncidentBookmarksClient
IncidentComments *incidentcomments.IncidentCommentsClient
IncidentEntities *incidententities.IncidentEntitiesClient
IncidentRelations *incidentrelations.IncidentRelationsClient
Incidents *incidents.IncidentsClient
Metadata *metadata.MetadataClient
SecurityMLAnalyticsSettings *securitymlanalyticssettings.SecurityMLAnalyticsSettingsClient
SentinelOnboardingStates *sentinelonboardingstates.SentinelOnboardingStatesClient
ThreatIntelligence *threatintelligence.ThreatIntelligenceClient
WatchlistItems *watchlistitems.WatchlistItemsClient
Watchlists *watchlists.WatchlistsClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
actionsClient := actions.NewActionsClientWithBaseURI(endpoint)
configureAuthFunc(&actionsClient.Client)
alertRuleTemplatesClient := alertruletemplates.NewAlertRuleTemplatesClientWithBaseURI(endpoint)
configureAuthFunc(&alertRuleTemplatesClient.Client)
alertRulesClient := alertrules.NewAlertRulesClientWithBaseURI(endpoint)
configureAuthFunc(&alertRulesClient.Client)
automationRulesClient := automationrules.NewAutomationRulesClientWithBaseURI(endpoint)
configureAuthFunc(&automationRulesClient.Client)
bookmarksClient := bookmarks.NewBookmarksClientWithBaseURI(endpoint)
configureAuthFunc(&bookmarksClient.Client)
dataConnectorsClient := dataconnectors.NewDataConnectorsClientWithBaseURI(endpoint)
configureAuthFunc(&dataConnectorsClient.Client)
incidentAlertsClient := incidentalerts.NewIncidentAlertsClientWithBaseURI(endpoint)
configureAuthFunc(&incidentAlertsClient.Client)
incidentBookmarksClient := incidentbookmarks.NewIncidentBookmarksClientWithBaseURI(endpoint)
configureAuthFunc(&incidentBookmarksClient.Client)
incidentCommentsClient := incidentcomments.NewIncidentCommentsClientWithBaseURI(endpoint)
configureAuthFunc(&incidentCommentsClient.Client)
incidentEntitiesClient := incidententities.NewIncidentEntitiesClientWithBaseURI(endpoint)
configureAuthFunc(&incidentEntitiesClient.Client)
incidentRelationsClient := incidentrelations.NewIncidentRelationsClientWithBaseURI(endpoint)
configureAuthFunc(&incidentRelationsClient.Client)
incidentsClient := incidents.NewIncidentsClientWithBaseURI(endpoint)
configureAuthFunc(&incidentsClient.Client)
metadataClient := metadata.NewMetadataClientWithBaseURI(endpoint)
configureAuthFunc(&metadataClient.Client)
securityMLAnalyticsSettingsClient := securitymlanalyticssettings.NewSecurityMLAnalyticsSettingsClientWithBaseURI(endpoint)
configureAuthFunc(&securityMLAnalyticsSettingsClient.Client)
sentinelOnboardingStatesClient := sentinelonboardingstates.NewSentinelOnboardingStatesClientWithBaseURI(endpoint)
configureAuthFunc(&sentinelOnboardingStatesClient.Client)
threatIntelligenceClient := threatintelligence.NewThreatIntelligenceClientWithBaseURI(endpoint)
configureAuthFunc(&threatIntelligenceClient.Client)
watchlistItemsClient := watchlistitems.NewWatchlistItemsClientWithBaseURI(endpoint)
configureAuthFunc(&watchlistItemsClient.Client)
watchlistsClient := watchlists.NewWatchlistsClientWithBaseURI(endpoint)
configureAuthFunc(&watchlistsClient.Client)
return Client{
Actions: &actionsClient,
AlertRuleTemplates: &alertRuleTemplatesClient,
AlertRules: &alertRulesClient,
AutomationRules: &automationRulesClient,
Bookmarks: &bookmarksClient,
DataConnectors: &dataConnectorsClient,
IncidentAlerts: &incidentAlertsClient,
IncidentBookmarks: &incidentBookmarksClient,
IncidentComments: &incidentCommentsClient,
IncidentEntities: &incidentEntitiesClient,
IncidentRelations: &incidentRelationsClient,
Incidents: &incidentsClient,
Metadata: &metadataClient,
SecurityMLAnalyticsSettings: &securityMLAnalyticsSettingsClient,
SentinelOnboardingStates: &sentinelOnboardingStatesClient,
ThreatIntelligence: &threatIntelligenceClient,
WatchlistItems: &watchlistItemsClient,
Watchlists: &watchlistsClient,
}
}