-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxml_structure.go
390 lines (363 loc) · 13.6 KB
/
xml_structure.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
package bigfix
import "encoding/xml"
//=====================================================================================
// ComputerDetails : Contains details of computer.
//
// API_Utility : GetComputerDetailAPI()
type ComputerDetails struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Query struct {
Text string `xml:",chardata"`
Result struct {
Text string `xml:",chardata"`
Tuple struct {
Text string `xml:",chardata"`
Answer []struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"Answer"`
} `xml:"Tuple"`
} `xml:"Result"`
Evaluation struct {
Text string `xml:",chardata"`
Time string `xml:"Time"`
Plurality string `xml:"Plurality"`
} `xml:"Evaluation"`
Error string `xml:"Error"`
} `xml:"Query"`
}
//=====================================================================================
// CountComputerStruct : To Store count of computer
//
// API_Utility : GetComputerCountAPI()
type CountComputerStruct struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Query struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Result struct {
Text string `xml:",chardata"`
Answer struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"Answer"`
} `xml:"Result"`
Evaluation struct {
Text string `xml:",chardata"`
Time string `xml:"Time"`
Plurality string `xml:"Plurality"`
} `xml:"Evaluation"`
} `xml:"Query"`
}
//=====================================================================================
// MAGFile : Structure to store xml file data of MAG
type MAGFile struct {
XMLName xml.Name `xml:"BES"`
Xmlns_xsi string `xml:"xmlns:xsi,attr,omitempty"`
Xsi_noNamespaceSchemaLocation string `xml:"xsi:noNamespaceSchemaLocation,attr,omitempty"`
MultipleActionGroup struct {
Text string `xml:",chardata"`
Title string `xml:"Title"`
Relevance string `xml:"Relevance"`
} `xml:"MultipleActionGroup"`
}
//=====================================================================================
// FixletMetaData : Struct for fixlet data
//
// API_Utility : GetFixletMetaDataAPI()
type FixletMetaData struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Query Query `xml:"Query"`
}
// Query :
type Query struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Result Result `xml:"Result"`
Evaluation Evaluation `xml:"Evaluation"`
}
// Result :
type Result struct {
XMLName xml.Name `xml:"Result"`
Text string `xml:",chardata"`
Tuple Tuple `xml:"Tuple"`
}
//Tuple :
type Tuple struct {
XMLName xml.Name `xml:"Tuple"`
Text string `xml:",chardata"`
Answer []Answer `xml:"Answer"`
}
//Answer :
type Answer struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
}
//Evaluation :
type Evaluation struct {
XMLName xml.Name `xml:"Evaluation"`
Text string `xml:",chardata"`
Time string `xml:"Time"`
Plurality string `xml:"Plurality"`
}
//=====================================================================================
// ActionCreationResponse : To check whether action is created.
//
// API_Utility : CreateMAGAPI()
type ActionCreationResponse struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Action struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
LastModified string `xml:"LastModified,attr"`
Name string `xml:"Name"`
ID string `xml:"ID"`
} `xml:"Action"`
}
//=====================================================================================
// Action : Contains details of action
type Action struct {
XMLName xml.Name `xml:"BES"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
MultipleActionGroup struct {
Text string `xml:",chardata"`
Title string `xml:"Title"`
Relevance string `xml:"Relevance"`
MemberAction []struct {
Text string `xml:",chardata"`
Title string `xml:"Title"`
Relevance string `xml:"Relevance"`
ActionScript struct {
Text string `xml:",chardata"`
MIMEType string `xml:"MIMEType,attr"`
} `xml:"ActionScript"`
SuccessCriteria struct {
Text string `xml:",chardata"`
Option string `xml:"Option,attr"`
} `xml:"SuccessCriteria"`
IncludeInGroupRelevance string `xml:"IncludeInGroupRelevance"`
} `xml:"MemberAction"`
Settings struct {
Text string `xml:",chardata"`
PreActionShowUI string `xml:"PreActionShowUI"`
HasRunningMessage string `xml:"HasRunningMessage"`
HasTimeRange string `xml:"HasTimeRange"`
HasStartTime string `xml:"HasStartTime"`
HasEndTime string `xml:"HasEndTime"`
EndDateTimeLocalOffset string `xml:"EndDateTimeLocalOffset"`
HasDayOfWeekConstraint string `xml:"HasDayOfWeekConstraint"`
UseUTCTime string `xml:"UseUTCTime"`
ActiveUserRequirement string `xml:"ActiveUserRequirement"`
ActiveUserType string `xml:"ActiveUserType"`
HasWhose string `xml:"HasWhose"`
PreActionCacheDownload string `xml:"PreActionCacheDownload"`
Reapply string `xml:"Reapply"`
HasReapplyLimit string `xml:"HasReapplyLimit"`
ReapplyLimit string `xml:"ReapplyLimit"`
HasReapplyInterval string `xml:"HasReapplyInterval"`
HasRetry string `xml:"HasRetry"`
HasTemporalDistribution string `xml:"HasTemporalDistribution"`
ContinueOnErrors string `xml:"ContinueOnErrors"`
PostActionBehavior struct {
Text string `xml:",chardata"`
Behavior string `xml:"Behavior,attr"`
} `xml:"PostActionBehavior"`
IsOffer string `xml:"IsOffer"`
} `xml:"Settings"`
SettingsLocks struct {
Text string `xml:",chardata"`
ActionUITitle string `xml:"ActionUITitle"`
PreActionShowUI string `xml:"PreActionShowUI"`
PreAction struct {
Chardata string `xml:",chardata"`
Text string `xml:"Text"`
AskToSaveWork string `xml:"AskToSaveWork"`
ShowActionButton string `xml:"ShowActionButton"`
ShowCancelButton string `xml:"ShowCancelButton"`
DeadlineBehavior string `xml:"DeadlineBehavior"`
ShowConfirmation string `xml:"ShowConfirmation"`
} `xml:"PreAction"`
HasRunningMessage string `xml:"HasRunningMessage"`
RunningMessage struct {
Chardata string `xml:",chardata"`
Text string `xml:"Text"`
} `xml:"RunningMessage"`
TimeRange string `xml:"TimeRange"`
StartDateTimeOffset string `xml:"StartDateTimeOffset"`
EndDateTimeOffset string `xml:"EndDateTimeOffset"`
DayOfWeekConstraint string `xml:"DayOfWeekConstraint"`
ActiveUserRequirement string `xml:"ActiveUserRequirement"`
ActiveUserType string `xml:"ActiveUserType"`
Whose string `xml:"Whose"`
PreActionCacheDownload string `xml:"PreActionCacheDownload"`
Reapply string `xml:"Reapply"`
ReapplyLimit string `xml:"ReapplyLimit"`
RetryCount string `xml:"RetryCount"`
RetryWait string `xml:"RetryWait"`
TemporalDistribution string `xml:"TemporalDistribution"`
ContinueOnErrors string `xml:"ContinueOnErrors"`
PostActionBehavior struct {
Chardata string `xml:",chardata"`
Behavior string `xml:"Behavior"`
AllowCancel string `xml:"AllowCancel"`
Deadline string `xml:"Deadline"`
Title string `xml:"Title"`
Text string `xml:"Text"`
} `xml:"PostActionBehavior"`
IsOffer string `xml:"IsOffer"`
AnnounceOffer string `xml:"AnnounceOffer"`
OfferCategory string `xml:"OfferCategory"`
OfferDescriptionHTML string `xml:"OfferDescriptionHTML"`
} `xml:"SettingsLocks"`
Target struct {
Text string `xml:",chardata"`
AllComputers string `xml:"AllComputers"`
} `xml:"Target"`
} `xml:"MultipleActionGroup"`
}
//=====================================================================================
// SourcedMemeberContent : Contains members(relevant fixlets) from particular site.
//
// API_Utility : GetRelevantFixletsAPI()
type SourcedMemeberContent struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Query struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Result struct {
Text string `xml:",chardata"`
Tuple []struct {
Text string `xml:",chardata"`
Answer []struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"Answer"`
} `xml:"Tuple"`
} `xml:"Result"`
Evaluation struct {
Text string `xml:",chardata"`
Time string `xml:"Time"`
Plurality string `xml:"Plurality"`
} `xml:"Evaluation"`
Error string `xml:"Error"`
} `xml:"Query"`
}
//=====================================================================================
// CountofRelevantFixlet : Contains count of relevant fixlets for a particular site.
//
// API_Utility : GetCountofRelevantFixletsAPI()
type CountofRelevantFixlet struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Query struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Result struct {
Text string `xml:",chardata"`
Answer struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"Answer"`
} `xml:"Result"`
Evaluation struct {
Text string `xml:",chardata"`
Time string `xml:"Time"`
Plurality string `xml:"Plurality"`
} `xml:"Evaluation"`
} `xml:"Query"`
}
//=====================================================================================
// AllSites : Contains list of all sites.
//
// API_Utility : GetAllSitesAPI()
type AllSites struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
ExternalSite []struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Name string `xml:"Name"`
GatherURL string `xml:"GatherURL"`
DisplayName string `xml:"DisplayName"`
} `xml:"ExternalSite"`
OperatorSite struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Name string `xml:"Name"`
GatherURL string `xml:"GatherURL"`
} `xml:"OperatorSite"`
ActionSite struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Name string `xml:"Name"`
GatherURL string `xml:"GatherURL"`
} `xml:"ActionSite"`
}
//=====================================================================================
// ComputerName : Contains name of computer.
//
// API_Utility : GetComputerNameAPI()
type ComputerName struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
Query struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
Result struct {
Text string `xml:",chardata"`
Answer struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"Answer"`
} `xml:"Result"`
Evaluation struct {
Text string `xml:",chardata"`
Time string `xml:"Time"`
Plurality string `xml:"Plurality"`
} `xml:"Evaluation"`
} `xml:"Query"`
}
// ActionStatus : Contains name of computer.
//
// API_Utility : GetActionStatus()
type ActionStatus struct {
XMLName xml.Name `xml:"BESAPI"`
Text string `xml:",chardata"`
Xsi string `xml:"xsi,attr"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr"`
ActionResults struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
ActionID string `xml:"ActionID"`
Status string `xml:"Status"`
DateIssued string `xml:"DateIssued"`
MemberActionResult []struct {
Text string `xml:",chardata"`
Resource string `xml:"Resource,attr"`
ActionID string `xml:"ActionID"`
} `xml:"MemberActionResult"`
} `xml:"ActionResults"`
}