-
Notifications
You must be signed in to change notification settings - Fork 40
/
model_dataconnectorscheckrequirements.go
181 lines (155 loc) · 5.38 KB
/
model_dataconnectorscheckrequirements.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
package checkdataconnectorrequirements
import (
"encoding/json"
"fmt"
"strings"
)
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
type DataConnectorsCheckRequirements interface {
}
// RawDataConnectorsCheckRequirementsImpl is returned when the Discriminated Value
// doesn't match any of the defined types
// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround)
// and is used only for Deserialization (e.g. this cannot be used as a Request Payload).
type RawDataConnectorsCheckRequirementsImpl struct {
Type string
Values map[string]interface{}
}
func unmarshalDataConnectorsCheckRequirementsImplementation(input []byte) (DataConnectorsCheckRequirements, error) {
if input == nil {
return nil, nil
}
var temp map[string]interface{}
if err := json.Unmarshal(input, &temp); err != nil {
return nil, fmt.Errorf("unmarshaling DataConnectorsCheckRequirements into map[string]interface: %+v", err)
}
value, ok := temp["kind"].(string)
if !ok {
return nil, nil
}
if strings.EqualFold(value, "AzureActiveDirectory") {
var out AADCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into AADCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "AzureAdvancedThreatProtection") {
var out AATPCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into AATPCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "AzureSecurityCenter") {
var out ASCCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into ASCCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "AmazonWebServicesCloudTrail") {
var out AwsCloudTrailCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into AwsCloudTrailCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "AmazonWebServicesS3") {
var out AwsS3CheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into AwsS3CheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "Dynamics365") {
var out Dynamics365CheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into Dynamics365CheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "IOT") {
var out IoTCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into IoTCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "MicrosoftCloudAppSecurity") {
var out MCASCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into MCASCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "MicrosoftDefenderAdvancedThreatProtection") {
var out MDATPCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into MDATPCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "MicrosoftThreatIntelligence") {
var out MSTICheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into MSTICheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "MicrosoftThreatProtection") {
var out MtpCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into MtpCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "Office365Project") {
var out Office365ProjectCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into Office365ProjectCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "OfficeATP") {
var out OfficeATPCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into OfficeATPCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "OfficeIRM") {
var out OfficeIRMCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into OfficeIRMCheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "OfficePowerBI") {
var out OfficePowerBICheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into OfficePowerBICheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "ThreatIntelligence") {
var out TICheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into TICheckRequirements: %+v", err)
}
return out, nil
}
if strings.EqualFold(value, "ThreatIntelligenceTaxii") {
var out TiTaxiiCheckRequirements
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into TiTaxiiCheckRequirements: %+v", err)
}
return out, nil
}
out := RawDataConnectorsCheckRequirementsImpl{
Type: value,
Values: temp,
}
return out, nil
}