/
models.go
6739 lines (6073 loc) · 225 KB
/
models.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package security
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v1.0/security"
// AadConnectivityState enumerates the values for aad connectivity state.
type AadConnectivityState string
const (
// Connected ...
Connected AadConnectivityState = "Connected"
// Discovered ...
Discovered AadConnectivityState = "Discovered"
// NotLicensed ...
NotLicensed AadConnectivityState = "NotLicensed"
)
// PossibleAadConnectivityStateValues returns an array of possible values for the AadConnectivityState const type.
func PossibleAadConnectivityStateValues() []AadConnectivityState {
return []AadConnectivityState{Connected, Discovered, NotLicensed}
}
// Action enumerates the values for action.
type Action string
const (
// Add ...
Add Action = "Add"
// Recommended ...
Recommended Action = "Recommended"
// Remove ...
Remove Action = "Remove"
)
// PossibleActionValues returns an array of possible values for the Action const type.
func PossibleActionValues() []Action {
return []Action{Add, Recommended, Remove}
}
// AlertNotifications enumerates the values for alert notifications.
type AlertNotifications string
const (
// Off Don't get notifications on new alerts
Off AlertNotifications = "Off"
// On Get notifications on new alerts
On AlertNotifications = "On"
)
// PossibleAlertNotificationsValues returns an array of possible values for the AlertNotifications const type.
func PossibleAlertNotificationsValues() []AlertNotifications {
return []AlertNotifications{Off, On}
}
// AlertsToAdmins enumerates the values for alerts to admins.
type AlertsToAdmins string
const (
// AlertsToAdminsOff Don't send notification on new alerts to the subscription's admins
AlertsToAdminsOff AlertsToAdmins = "Off"
// AlertsToAdminsOn Send notification on new alerts to the subscription's admins
AlertsToAdminsOn AlertsToAdmins = "On"
)
// PossibleAlertsToAdminsValues returns an array of possible values for the AlertsToAdmins const type.
func PossibleAlertsToAdminsValues() []AlertsToAdmins {
return []AlertsToAdmins{AlertsToAdminsOff, AlertsToAdminsOn}
}
// AutoProvision enumerates the values for auto provision.
type AutoProvision string
const (
// AutoProvisionOff Do not install security agent on the VMs automatically
AutoProvisionOff AutoProvision = "Off"
// AutoProvisionOn Install missing security agent on VMs automatically
AutoProvisionOn AutoProvision = "On"
)
// PossibleAutoProvisionValues returns an array of possible values for the AutoProvision const type.
func PossibleAutoProvisionValues() []AutoProvision {
return []AutoProvision{AutoProvisionOff, AutoProvisionOn}
}
// ConfigurationStatus enumerates the values for configuration status.
type ConfigurationStatus string
const (
// Configured ...
Configured ConfigurationStatus = "Configured"
// Failed ...
Failed ConfigurationStatus = "Failed"
// InProgress ...
InProgress ConfigurationStatus = "InProgress"
// NoStatus ...
NoStatus ConfigurationStatus = "NoStatus"
// NotConfigured ...
NotConfigured ConfigurationStatus = "NotConfigured"
)
// PossibleConfigurationStatusValues returns an array of possible values for the ConfigurationStatus const type.
func PossibleConfigurationStatusValues() []ConfigurationStatus {
return []ConfigurationStatus{Configured, Failed, InProgress, NoStatus, NotConfigured}
}
// ConfigurationStatus1 enumerates the values for configuration status 1.
type ConfigurationStatus1 string
const (
// ConfigurationStatus1Configured ...
ConfigurationStatus1Configured ConfigurationStatus1 = "Configured"
// ConfigurationStatus1Failed ...
ConfigurationStatus1Failed ConfigurationStatus1 = "Failed"
// ConfigurationStatus1InProgress ...
ConfigurationStatus1InProgress ConfigurationStatus1 = "InProgress"
// ConfigurationStatus1NoStatus ...
ConfigurationStatus1NoStatus ConfigurationStatus1 = "NoStatus"
// ConfigurationStatus1NotConfigured ...
ConfigurationStatus1NotConfigured ConfigurationStatus1 = "NotConfigured"
)
// PossibleConfigurationStatus1Values returns an array of possible values for the ConfigurationStatus1 const type.
func PossibleConfigurationStatus1Values() []ConfigurationStatus1 {
return []ConfigurationStatus1{ConfigurationStatus1Configured, ConfigurationStatus1Failed, ConfigurationStatus1InProgress, ConfigurationStatus1NoStatus, ConfigurationStatus1NotConfigured}
}
// ConfigurationStatus2 enumerates the values for configuration status 2.
type ConfigurationStatus2 string
const (
// ConfigurationStatus2Configured ...
ConfigurationStatus2Configured ConfigurationStatus2 = "Configured"
// ConfigurationStatus2Failed ...
ConfigurationStatus2Failed ConfigurationStatus2 = "Failed"
// ConfigurationStatus2InProgress ...
ConfigurationStatus2InProgress ConfigurationStatus2 = "InProgress"
// ConfigurationStatus2NoStatus ...
ConfigurationStatus2NoStatus ConfigurationStatus2 = "NoStatus"
// ConfigurationStatus2NotConfigured ...
ConfigurationStatus2NotConfigured ConfigurationStatus2 = "NotConfigured"
)
// PossibleConfigurationStatus2Values returns an array of possible values for the ConfigurationStatus2 const type.
func PossibleConfigurationStatus2Values() []ConfigurationStatus2 {
return []ConfigurationStatus2{ConfigurationStatus2Configured, ConfigurationStatus2Failed, ConfigurationStatus2InProgress, ConfigurationStatus2NoStatus, ConfigurationStatus2NotConfigured}
}
// ConnectionType enumerates the values for connection type.
type ConnectionType string
const (
// External ...
External ConnectionType = "External"
// Internal ...
Internal ConnectionType = "Internal"
)
// PossibleConnectionTypeValues returns an array of possible values for the ConnectionType const type.
func PossibleConnectionTypeValues() []ConnectionType {
return []ConnectionType{External, Internal}
}
// Direction enumerates the values for direction.
type Direction string
const (
// Inbound ...
Inbound Direction = "Inbound"
// Outbound ...
Outbound Direction = "Outbound"
)
// PossibleDirectionValues returns an array of possible values for the Direction const type.
func PossibleDirectionValues() []Direction {
return []Direction{Inbound, Outbound}
}
// EnforcementMode enumerates the values for enforcement mode.
type EnforcementMode string
const (
// Audit ...
Audit EnforcementMode = "Audit"
// Enforce ...
Enforce EnforcementMode = "Enforce"
)
// PossibleEnforcementModeValues returns an array of possible values for the EnforcementMode const type.
func PossibleEnforcementModeValues() []EnforcementMode {
return []EnforcementMode{Audit, Enforce}
}
// EnforcementMode1 enumerates the values for enforcement mode 1.
type EnforcementMode1 string
const (
// EnforcementMode1Audit ...
EnforcementMode1Audit EnforcementMode1 = "Audit"
// EnforcementMode1Enforce ...
EnforcementMode1Enforce EnforcementMode1 = "Enforce"
)
// PossibleEnforcementMode1Values returns an array of possible values for the EnforcementMode1 const type.
func PossibleEnforcementMode1Values() []EnforcementMode1 {
return []EnforcementMode1{EnforcementMode1Audit, EnforcementMode1Enforce}
}
// ExternalSecuritySolutionKind enumerates the values for external security solution kind.
type ExternalSecuritySolutionKind string
const (
// AAD ...
AAD ExternalSecuritySolutionKind = "AAD"
// ATA ...
ATA ExternalSecuritySolutionKind = "ATA"
// CEF ...
CEF ExternalSecuritySolutionKind = "CEF"
)
// PossibleExternalSecuritySolutionKindValues returns an array of possible values for the ExternalSecuritySolutionKind const type.
func PossibleExternalSecuritySolutionKindValues() []ExternalSecuritySolutionKind {
return []ExternalSecuritySolutionKind{AAD, ATA, CEF}
}
// Family enumerates the values for family.
type Family string
const (
// Ngfw ...
Ngfw Family = "Ngfw"
// SaasWaf ...
SaasWaf Family = "SaasWaf"
// Va ...
Va Family = "Va"
// Waf ...
Waf Family = "Waf"
)
// PossibleFamilyValues returns an array of possible values for the Family const type.
func PossibleFamilyValues() []Family {
return []Family{Ngfw, SaasWaf, Va, Waf}
}
// FileType enumerates the values for file type.
type FileType string
const (
// Dll ...
Dll FileType = "Dll"
// Exe ...
Exe FileType = "Exe"
// Executable ...
Executable FileType = "Executable"
// Msi ...
Msi FileType = "Msi"
// Script ...
Script FileType = "Script"
// Unknown ...
Unknown FileType = "Unknown"
)
// PossibleFileTypeValues returns an array of possible values for the FileType const type.
func PossibleFileTypeValues() []FileType {
return []FileType{Dll, Exe, Executable, Msi, Script, Unknown}
}
// Issue enumerates the values for issue.
type Issue string
const (
// ExecutableViolationsAudited ...
ExecutableViolationsAudited Issue = "ExecutableViolationsAudited"
// MsiAndScriptViolationsAudited ...
MsiAndScriptViolationsAudited Issue = "MsiAndScriptViolationsAudited"
// MsiAndScriptViolationsBlocked ...
MsiAndScriptViolationsBlocked Issue = "MsiAndScriptViolationsBlocked"
// RulesViolatedManually ...
RulesViolatedManually Issue = "RulesViolatedManually"
// ViolationsAudited ...
ViolationsAudited Issue = "ViolationsAudited"
// ViolationsBlocked ...
ViolationsBlocked Issue = "ViolationsBlocked"
)
// PossibleIssueValues returns an array of possible values for the Issue const type.
func PossibleIssueValues() []Issue {
return []Issue{ExecutableViolationsAudited, MsiAndScriptViolationsAudited, MsiAndScriptViolationsBlocked, RulesViolatedManually, ViolationsAudited, ViolationsBlocked}
}
// KindEnum enumerates the values for kind enum.
type KindEnum string
const (
// KindAAD ...
KindAAD KindEnum = "AAD"
// KindATA ...
KindATA KindEnum = "ATA"
// KindCEF ...
KindCEF KindEnum = "CEF"
// KindExternalSecuritySolution ...
KindExternalSecuritySolution KindEnum = "ExternalSecuritySolution"
)
// PossibleKindEnumValues returns an array of possible values for the KindEnum const type.
func PossibleKindEnumValues() []KindEnum {
return []KindEnum{KindAAD, KindATA, KindCEF, KindExternalSecuritySolution}
}
// PricingTier enumerates the values for pricing tier.
type PricingTier string
const (
// Free Get free Azure security center experience with basic security features
Free PricingTier = "Free"
// Standard Get the standard Azure security center experience with advanced security features
Standard PricingTier = "Standard"
)
// PossiblePricingTierValues returns an array of possible values for the PricingTier const type.
func PossiblePricingTierValues() []PricingTier {
return []PricingTier{Free, Standard}
}
// Protocol enumerates the values for protocol.
type Protocol string
const (
// All ...
All Protocol = "*"
// TCP ...
TCP Protocol = "TCP"
// UDP ...
UDP Protocol = "UDP"
)
// PossibleProtocolValues returns an array of possible values for the Protocol const type.
func PossibleProtocolValues() []Protocol {
return []Protocol{All, TCP, UDP}
}
// RecommendationAction enumerates the values for recommendation action.
type RecommendationAction string
const (
// RecommendationActionAdd ...
RecommendationActionAdd RecommendationAction = "Add"
// RecommendationActionRecommended ...
RecommendationActionRecommended RecommendationAction = "Recommended"
// RecommendationActionRemove ...
RecommendationActionRemove RecommendationAction = "Remove"
)
// PossibleRecommendationActionValues returns an array of possible values for the RecommendationAction const type.
func PossibleRecommendationActionValues() []RecommendationAction {
return []RecommendationAction{RecommendationActionAdd, RecommendationActionRecommended, RecommendationActionRemove}
}
// RecommendationAction1 enumerates the values for recommendation action 1.
type RecommendationAction1 string
const (
// RecommendationAction1Add ...
RecommendationAction1Add RecommendationAction1 = "Add"
// RecommendationAction1Recommended ...
RecommendationAction1Recommended RecommendationAction1 = "Recommended"
// RecommendationAction1Remove ...
RecommendationAction1Remove RecommendationAction1 = "Remove"
)
// PossibleRecommendationAction1Values returns an array of possible values for the RecommendationAction1 const type.
func PossibleRecommendationAction1Values() []RecommendationAction1 {
return []RecommendationAction1{RecommendationAction1Add, RecommendationAction1Recommended, RecommendationAction1Remove}
}
// RecommendationStatus enumerates the values for recommendation status.
type RecommendationStatus string
const (
// RecommendationStatusNoStatus ...
RecommendationStatusNoStatus RecommendationStatus = "NoStatus"
// RecommendationStatusNotAvailable ...
RecommendationStatusNotAvailable RecommendationStatus = "NotAvailable"
// RecommendationStatusNotRecommended ...
RecommendationStatusNotRecommended RecommendationStatus = "NotRecommended"
// RecommendationStatusRecommended ...
RecommendationStatusRecommended RecommendationStatus = "Recommended"
)
// PossibleRecommendationStatusValues returns an array of possible values for the RecommendationStatus const type.
func PossibleRecommendationStatusValues() []RecommendationStatus {
return []RecommendationStatus{RecommendationStatusNoStatus, RecommendationStatusNotAvailable, RecommendationStatusNotRecommended, RecommendationStatusRecommended}
}
// ReportedSeverity enumerates the values for reported severity.
type ReportedSeverity string
const (
// High ...
High ReportedSeverity = "High"
// Information ...
Information ReportedSeverity = "Information"
// Low ...
Low ReportedSeverity = "Low"
// Silent ...
Silent ReportedSeverity = "Silent"
)
// PossibleReportedSeverityValues returns an array of possible values for the ReportedSeverity const type.
func PossibleReportedSeverityValues() []ReportedSeverity {
return []ReportedSeverity{High, Information, Low, Silent}
}
// SettingKind enumerates the values for setting kind.
type SettingKind string
const (
// SettingKindAlertSuppressionSetting ...
SettingKindAlertSuppressionSetting SettingKind = "AlertSuppressionSetting"
// SettingKindDataExportSetting ...
SettingKindDataExportSetting SettingKind = "DataExportSetting"
)
// PossibleSettingKindValues returns an array of possible values for the SettingKind const type.
func PossibleSettingKindValues() []SettingKind {
return []SettingKind{SettingKindAlertSuppressionSetting, SettingKindDataExportSetting}
}
// SourceSystem enumerates the values for source system.
type SourceSystem string
const (
// AzureAppLocker ...
AzureAppLocker SourceSystem = "Azure_AppLocker"
// AzureAuditD ...
AzureAuditD SourceSystem = "Azure_AuditD"
// NonAzureAppLocker ...
NonAzureAppLocker SourceSystem = "NonAzure_AppLocker"
// NonAzureAuditD ...
NonAzureAuditD SourceSystem = "NonAzure_AuditD"
// None ...
None SourceSystem = "None"
)
// PossibleSourceSystemValues returns an array of possible values for the SourceSystem const type.
func PossibleSourceSystemValues() []SourceSystem {
return []SourceSystem{AzureAppLocker, AzureAuditD, NonAzureAppLocker, NonAzureAuditD, None}
}
// State enumerates the values for state.
type State string
const (
// StateFailed At least one supported regulatory compliance control in the given standard has a state of
// failed
StateFailed State = "Failed"
// StatePassed All supported regulatory compliance controls in the given standard have a passed state
StatePassed State = "Passed"
// StateSkipped All supported regulatory compliance controls in the given standard have a state of skipped
StateSkipped State = "Skipped"
// StateUnsupported No supported regulatory compliance data for the given standard
StateUnsupported State = "Unsupported"
)
// PossibleStateValues returns an array of possible values for the State const type.
func PossibleStateValues() []State {
return []State{StateFailed, StatePassed, StateSkipped, StateUnsupported}
}
// Status enumerates the values for status.
type Status string
const (
// Initiated ...
Initiated Status = "Initiated"
// Revoked ...
Revoked Status = "Revoked"
)
// PossibleStatusValues returns an array of possible values for the Status const type.
func PossibleStatusValues() []Status {
return []Status{Initiated, Revoked}
}
// StatusReason enumerates the values for status reason.
type StatusReason string
const (
// Expired ...
Expired StatusReason = "Expired"
// NewerRequestInitiated ...
NewerRequestInitiated StatusReason = "NewerRequestInitiated"
// UserRequested ...
UserRequested StatusReason = "UserRequested"
)
// PossibleStatusReasonValues returns an array of possible values for the StatusReason const type.
func PossibleStatusReasonValues() []StatusReason {
return []StatusReason{Expired, NewerRequestInitiated, UserRequested}
}
// TransportProtocol enumerates the values for transport protocol.
type TransportProtocol string
const (
// TransportProtocolTCP ...
TransportProtocolTCP TransportProtocol = "TCP"
// TransportProtocolUDP ...
TransportProtocolUDP TransportProtocol = "UDP"
)
// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type.
func PossibleTransportProtocolValues() []TransportProtocol {
return []TransportProtocol{TransportProtocolTCP, TransportProtocolUDP}
}
// Type enumerates the values for type.
type Type string
const (
// BinarySignature ...
BinarySignature Type = "BinarySignature"
// File ...
File Type = "File"
// FileHash ...
FileHash Type = "FileHash"
// ProductSignature ...
ProductSignature Type = "ProductSignature"
// PublisherSignature ...
PublisherSignature Type = "PublisherSignature"
// VersionAndAboveSignature ...
VersionAndAboveSignature Type = "VersionAndAboveSignature"
)
// PossibleTypeValues returns an array of possible values for the Type const type.
func PossibleTypeValues() []Type {
return []Type{BinarySignature, File, FileHash, ProductSignature, PublisherSignature, VersionAndAboveSignature}
}
// ValueType enumerates the values for value type.
type ValueType string
const (
// IPCidr An IP range in CIDR format (e.g. '192.168.0.1/8').
IPCidr ValueType = "IpCidr"
// String Any string value.
String ValueType = "String"
)
// PossibleValueTypeValues returns an array of possible values for the ValueType const type.
func PossibleValueTypeValues() []ValueType {
return []ValueType{IPCidr, String}
}
// AadConnectivityState1 describes an Azure resource with kind
type AadConnectivityState1 struct {
// ConnectivityState - Possible values include: 'Discovered', 'NotLicensed', 'Connected'
ConnectivityState AadConnectivityState `json:"connectivityState,omitempty"`
}
// AadExternalSecuritySolution represents an AAD identity protection solution which sends logs to an OMS
// workspace.
type AadExternalSecuritySolution struct {
Properties *AadSolutionProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Resource type
Type *string `json:"type,omitempty"`
// Location - READ-ONLY; Location where the resource is stored
Location *string `json:"location,omitempty"`
// Kind - Possible values include: 'KindExternalSecuritySolution', 'KindCEF', 'KindATA', 'KindAAD'
Kind KindEnum `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for AadExternalSecuritySolution.
func (aess AadExternalSecuritySolution) MarshalJSON() ([]byte, error) {
aess.Kind = KindAAD
objectMap := make(map[string]interface{})
if aess.Properties != nil {
objectMap["properties"] = aess.Properties
}
if aess.Kind != "" {
objectMap["kind"] = aess.Kind
}
return json.Marshal(objectMap)
}
// AsCefExternalSecuritySolution is the BasicExternalSecuritySolution implementation for AadExternalSecuritySolution.
func (aess AadExternalSecuritySolution) AsCefExternalSecuritySolution() (*CefExternalSecuritySolution, bool) {
return nil, false
}
// AsAtaExternalSecuritySolution is the BasicExternalSecuritySolution implementation for AadExternalSecuritySolution.
func (aess AadExternalSecuritySolution) AsAtaExternalSecuritySolution() (*AtaExternalSecuritySolution, bool) {
return nil, false
}
// AsAadExternalSecuritySolution is the BasicExternalSecuritySolution implementation for AadExternalSecuritySolution.
func (aess AadExternalSecuritySolution) AsAadExternalSecuritySolution() (*AadExternalSecuritySolution, bool) {
return &aess, true
}
// AsExternalSecuritySolution is the BasicExternalSecuritySolution implementation for AadExternalSecuritySolution.
func (aess AadExternalSecuritySolution) AsExternalSecuritySolution() (*ExternalSecuritySolution, bool) {
return nil, false
}
// AsBasicExternalSecuritySolution is the BasicExternalSecuritySolution implementation for AadExternalSecuritySolution.
func (aess AadExternalSecuritySolution) AsBasicExternalSecuritySolution() (BasicExternalSecuritySolution, bool) {
return &aess, true
}
// AadSolutionProperties ...
type AadSolutionProperties struct {
DeviceVendor *string `json:"deviceVendor,omitempty"`
DeviceType *string `json:"deviceType,omitempty"`
Workspace *ConnectedWorkspace `json:"workspace,omitempty"`
// ConnectivityState - Possible values include: 'Discovered', 'NotLicensed', 'Connected'
ConnectivityState AadConnectivityState `json:"connectivityState,omitempty"`
}
// AdaptiveNetworkHardening the resource whose properties describes the Adaptive Network Hardening settings
// for some Azure resource
type AdaptiveNetworkHardening struct {
autorest.Response `json:"-"`
// AdaptiveNetworkHardeningProperties - Properties of the Adaptive Network Hardening resource
*AdaptiveNetworkHardeningProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Resource type
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AdaptiveNetworkHardening.
func (anh AdaptiveNetworkHardening) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if anh.AdaptiveNetworkHardeningProperties != nil {
objectMap["properties"] = anh.AdaptiveNetworkHardeningProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AdaptiveNetworkHardening struct.
func (anh *AdaptiveNetworkHardening) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var adaptiveNetworkHardeningProperties AdaptiveNetworkHardeningProperties
err = json.Unmarshal(*v, &adaptiveNetworkHardeningProperties)
if err != nil {
return err
}
anh.AdaptiveNetworkHardeningProperties = &adaptiveNetworkHardeningProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
anh.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
anh.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
anh.Type = &typeVar
}
}
}
return nil
}
// AdaptiveNetworkHardeningEnforceRequest ...
type AdaptiveNetworkHardeningEnforceRequest struct {
// Rules - The rules to enforce
Rules *[]Rule `json:"rules,omitempty"`
// NetworkSecurityGroups - The Azure resource IDs of the effective network security groups that will be updated with the created security rules from the Adaptive Network Hardening rules
NetworkSecurityGroups *[]string `json:"networkSecurityGroups,omitempty"`
}
// AdaptiveNetworkHardeningProperties adaptive Network Hardening resource properties
type AdaptiveNetworkHardeningProperties struct {
// Rules - The security rules which are recommended to be effective on the VM
Rules *[]Rule `json:"rules,omitempty"`
// RulesCalculationTime - The UTC time on which the rules were calculated
RulesCalculationTime *date.Time `json:"rulesCalculationTime,omitempty"`
// EffectiveNetworkSecurityGroups - The Network Security Groups effective on the network interfaces of the protected resource
EffectiveNetworkSecurityGroups *[]EffectiveNetworkSecurityGroups `json:"effectiveNetworkSecurityGroups,omitempty"`
}
// AdaptiveNetworkHardeningsEnforceFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type AdaptiveNetworkHardeningsEnforceFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *AdaptiveNetworkHardeningsEnforceFuture) Result(client AdaptiveNetworkHardeningsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "security.AdaptiveNetworkHardeningsEnforceFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("security.AdaptiveNetworkHardeningsEnforceFuture")
return
}
ar.Response = future.Response()
return
}
// AdaptiveNetworkHardeningsList response for ListAdaptiveNetworkHardenings API service call
type AdaptiveNetworkHardeningsList struct {
autorest.Response `json:"-"`
// Value - A list of Adaptive Network Hardenings resources
Value *[]AdaptiveNetworkHardening `json:"value,omitempty"`
// NextLink - The URL to get the next set of results
NextLink *string `json:"nextLink,omitempty"`
}
// AdaptiveNetworkHardeningsListIterator provides access to a complete listing of AdaptiveNetworkHardening
// values.
type AdaptiveNetworkHardeningsListIterator struct {
i int
page AdaptiveNetworkHardeningsListPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *AdaptiveNetworkHardeningsListIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AdaptiveNetworkHardeningsListIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *AdaptiveNetworkHardeningsListIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AdaptiveNetworkHardeningsListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter AdaptiveNetworkHardeningsListIterator) Response() AdaptiveNetworkHardeningsList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter AdaptiveNetworkHardeningsListIterator) Value() AdaptiveNetworkHardening {
if !iter.page.NotDone() {
return AdaptiveNetworkHardening{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AdaptiveNetworkHardeningsListIterator type.
func NewAdaptiveNetworkHardeningsListIterator(page AdaptiveNetworkHardeningsListPage) AdaptiveNetworkHardeningsListIterator {
return AdaptiveNetworkHardeningsListIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (anhl AdaptiveNetworkHardeningsList) IsEmpty() bool {
return anhl.Value == nil || len(*anhl.Value) == 0
}
// adaptiveNetworkHardeningsListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (anhl AdaptiveNetworkHardeningsList) adaptiveNetworkHardeningsListPreparer(ctx context.Context) (*http.Request, error) {
if anhl.NextLink == nil || len(to.String(anhl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(anhl.NextLink)))
}
// AdaptiveNetworkHardeningsListPage contains a page of AdaptiveNetworkHardening values.
type AdaptiveNetworkHardeningsListPage struct {
fn func(context.Context, AdaptiveNetworkHardeningsList) (AdaptiveNetworkHardeningsList, error)
anhl AdaptiveNetworkHardeningsList
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *AdaptiveNetworkHardeningsListPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AdaptiveNetworkHardeningsListPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.anhl)
if err != nil {
return err
}
page.anhl = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *AdaptiveNetworkHardeningsListPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AdaptiveNetworkHardeningsListPage) NotDone() bool {
return !page.anhl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AdaptiveNetworkHardeningsListPage) Response() AdaptiveNetworkHardeningsList {
return page.anhl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AdaptiveNetworkHardeningsListPage) Values() []AdaptiveNetworkHardening {
if page.anhl.IsEmpty() {
return nil
}
return *page.anhl.Value
}
// Creates a new instance of the AdaptiveNetworkHardeningsListPage type.
func NewAdaptiveNetworkHardeningsListPage(getNextPage func(context.Context, AdaptiveNetworkHardeningsList) (AdaptiveNetworkHardeningsList, error)) AdaptiveNetworkHardeningsListPage {
return AdaptiveNetworkHardeningsListPage{fn: getNextPage}
}
// AdvancedThreatProtectionProperties the Advanced Threat Protection settings.
type AdvancedThreatProtectionProperties struct {
// IsEnabled - Indicates whether Advanced Threat Protection is enabled.
IsEnabled *bool `json:"isEnabled,omitempty"`
}
// AdvancedThreatProtectionSetting the Advanced Threat Protection resource.
type AdvancedThreatProtectionSetting struct {
autorest.Response `json:"-"`
*AdvancedThreatProtectionProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Resource type
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AdvancedThreatProtectionSetting.
func (atps AdvancedThreatProtectionSetting) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if atps.AdvancedThreatProtectionProperties != nil {
objectMap["properties"] = atps.AdvancedThreatProtectionProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AdvancedThreatProtectionSetting struct.
func (atps *AdvancedThreatProtectionSetting) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var advancedThreatProtectionProperties AdvancedThreatProtectionProperties
err = json.Unmarshal(*v, &advancedThreatProtectionProperties)
if err != nil {
return err
}
atps.AdvancedThreatProtectionProperties = &advancedThreatProtectionProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
atps.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
atps.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
atps.Type = &typeVar
}
}
}
return nil
}
// Alert security alert
type Alert struct {
autorest.Response `json:"-"`
*AlertProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Resource type