1 package insights
2
3
4
5
6
7
8
9 import (
10 "encoding/json"
11 "github.com/Azure/go-autorest/autorest"
12 "github.com/Azure/go-autorest/autorest/date"
13 )
14
15
16 const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appinsights/v1/insights"
17
18
19 type Column struct {
20
21 Name *string `json:"name,omitempty"`
22
23 Type *string `json:"type,omitempty"`
24 }
25
26
27 type ErrorDetail struct {
28
29 Code *string `json:"code,omitempty"`
30
31 Message *string `json:"message,omitempty"`
32
33 Target *string `json:"target,omitempty"`
34
35 Value *string `json:"value,omitempty"`
36
37 Resources *[]string `json:"resources,omitempty"`
38 AdditionalProperties interface{} `json:"additionalProperties,omitempty"`
39 }
40
41
42 type ErrorInfo struct {
43
44 Code *string `json:"code,omitempty"`
45
46 Message *string `json:"message,omitempty"`
47
48 Details *[]ErrorDetail `json:"details,omitempty"`
49
50 Innererror *ErrorInfo `json:"innererror,omitempty"`
51 AdditionalProperties interface{} `json:"additionalProperties,omitempty"`
52 }
53
54
55 type ErrorResponse struct {
56
57 Error *ErrorInfo `json:"error,omitempty"`
58 }
59
60
61 type EventsAiInfo struct {
62
63 IKey *string `json:"iKey,omitempty"`
64
65 AppName *string `json:"appName,omitempty"`
66
67 AppID *string `json:"appId,omitempty"`
68
69 SdkVersion *string `json:"sdkVersion,omitempty"`
70 }
71
72
73 type EventsApplicationInfo struct {
74
75 Version *string `json:"version,omitempty"`
76 }
77
78
79 type EventsAvailabilityResultInfo struct {
80
81 Name *string `json:"name,omitempty"`
82
83 Success *string `json:"success,omitempty"`
84
85 Duration *int64 `json:"duration,omitempty"`
86
87 PerformanceBucket *string `json:"performanceBucket,omitempty"`
88
89 Message *string `json:"message,omitempty"`
90
91 Location *string `json:"location,omitempty"`
92
93 ID *string `json:"id,omitempty"`
94
95 Size *string `json:"size,omitempty"`
96 }
97
98
99 type EventsAvailabilityResultResult struct {
100 AvailabilityResult *EventsAvailabilityResultInfo `json:"availabilityResult,omitempty"`
101
102 ID *string `json:"id,omitempty"`
103
104 Count *int64 `json:"count,omitempty"`
105
106 Timestamp *date.Time `json:"timestamp,omitempty"`
107
108 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
109
110 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
111
112 Operation *EventsOperationInfo `json:"operation,omitempty"`
113
114 Session *EventsSessionInfo `json:"session,omitempty"`
115
116 User *EventsUserInfo `json:"user,omitempty"`
117
118 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
119
120 Ai *EventsAiInfo `json:"ai,omitempty"`
121
122 Application *EventsApplicationInfo `json:"application,omitempty"`
123
124 Client *EventsClientInfo `json:"client,omitempty"`
125
126 Type Type `json:"type,omitempty"`
127 }
128
129
130 func (earr EventsAvailabilityResultResult) MarshalJSON() ([]byte, error) {
131 earr.Type = TypeAvailabilityResult
132 objectMap := make(map[string]interface{})
133 if earr.AvailabilityResult != nil {
134 objectMap["availabilityResult"] = earr.AvailabilityResult
135 }
136 if earr.ID != nil {
137 objectMap["id"] = earr.ID
138 }
139 if earr.Count != nil {
140 objectMap["count"] = earr.Count
141 }
142 if earr.Timestamp != nil {
143 objectMap["timestamp"] = earr.Timestamp
144 }
145 if earr.CustomDimensions != nil {
146 objectMap["customDimensions"] = earr.CustomDimensions
147 }
148 if earr.CustomMeasurements != nil {
149 objectMap["customMeasurements"] = earr.CustomMeasurements
150 }
151 if earr.Operation != nil {
152 objectMap["operation"] = earr.Operation
153 }
154 if earr.Session != nil {
155 objectMap["session"] = earr.Session
156 }
157 if earr.User != nil {
158 objectMap["user"] = earr.User
159 }
160 if earr.Cloud != nil {
161 objectMap["cloud"] = earr.Cloud
162 }
163 if earr.Ai != nil {
164 objectMap["ai"] = earr.Ai
165 }
166 if earr.Application != nil {
167 objectMap["application"] = earr.Application
168 }
169 if earr.Client != nil {
170 objectMap["client"] = earr.Client
171 }
172 if earr.Type != "" {
173 objectMap["type"] = earr.Type
174 }
175 return json.Marshal(objectMap)
176 }
177
178
179 func (earr EventsAvailabilityResultResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
180 return nil, false
181 }
182
183
184 func (earr EventsAvailabilityResultResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
185 return nil, false
186 }
187
188
189 func (earr EventsAvailabilityResultResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
190 return nil, false
191 }
192
193
194 func (earr EventsAvailabilityResultResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
195 return nil, false
196 }
197
198
199 func (earr EventsAvailabilityResultResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
200 return nil, false
201 }
202
203
204 func (earr EventsAvailabilityResultResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
205 return nil, false
206 }
207
208
209 func (earr EventsAvailabilityResultResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
210 return nil, false
211 }
212
213
214 func (earr EventsAvailabilityResultResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
215 return &earr, true
216 }
217
218
219 func (earr EventsAvailabilityResultResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
220 return nil, false
221 }
222
223
224 func (earr EventsAvailabilityResultResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
225 return nil, false
226 }
227
228
229 func (earr EventsAvailabilityResultResult) AsEventsResultData() (*EventsResultData, bool) {
230 return nil, false
231 }
232
233
234 func (earr EventsAvailabilityResultResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
235 return &earr, true
236 }
237
238
239 type EventsBrowserTimingInfo struct {
240
241 URLPath *string `json:"urlPath,omitempty"`
242
243 URLHost *string `json:"urlHost,omitempty"`
244
245 Name *string `json:"name,omitempty"`
246
247 URL *string `json:"url,omitempty"`
248
249 TotalDuration *int64 `json:"totalDuration,omitempty"`
250
251 PerformanceBucket *string `json:"performanceBucket,omitempty"`
252
253 NetworkDuration *int64 `json:"networkDuration,omitempty"`
254
255 SendDuration *int64 `json:"sendDuration,omitempty"`
256
257 ReceiveDuration *int64 `json:"receiveDuration,omitempty"`
258
259 ProcessingDuration *int64 `json:"processingDuration,omitempty"`
260 }
261
262
263 type EventsBrowserTimingResult struct {
264 BrowserTiming *EventsBrowserTimingInfo `json:"browserTiming,omitempty"`
265 ClientPerformance *EventsClientPerformanceInfo `json:"clientPerformance,omitempty"`
266
267 ID *string `json:"id,omitempty"`
268
269 Count *int64 `json:"count,omitempty"`
270
271 Timestamp *date.Time `json:"timestamp,omitempty"`
272
273 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
274
275 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
276
277 Operation *EventsOperationInfo `json:"operation,omitempty"`
278
279 Session *EventsSessionInfo `json:"session,omitempty"`
280
281 User *EventsUserInfo `json:"user,omitempty"`
282
283 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
284
285 Ai *EventsAiInfo `json:"ai,omitempty"`
286
287 Application *EventsApplicationInfo `json:"application,omitempty"`
288
289 Client *EventsClientInfo `json:"client,omitempty"`
290
291 Type Type `json:"type,omitempty"`
292 }
293
294
295 func (ebtr EventsBrowserTimingResult) MarshalJSON() ([]byte, error) {
296 ebtr.Type = TypeBrowserTiming
297 objectMap := make(map[string]interface{})
298 if ebtr.BrowserTiming != nil {
299 objectMap["browserTiming"] = ebtr.BrowserTiming
300 }
301 if ebtr.ClientPerformance != nil {
302 objectMap["clientPerformance"] = ebtr.ClientPerformance
303 }
304 if ebtr.ID != nil {
305 objectMap["id"] = ebtr.ID
306 }
307 if ebtr.Count != nil {
308 objectMap["count"] = ebtr.Count
309 }
310 if ebtr.Timestamp != nil {
311 objectMap["timestamp"] = ebtr.Timestamp
312 }
313 if ebtr.CustomDimensions != nil {
314 objectMap["customDimensions"] = ebtr.CustomDimensions
315 }
316 if ebtr.CustomMeasurements != nil {
317 objectMap["customMeasurements"] = ebtr.CustomMeasurements
318 }
319 if ebtr.Operation != nil {
320 objectMap["operation"] = ebtr.Operation
321 }
322 if ebtr.Session != nil {
323 objectMap["session"] = ebtr.Session
324 }
325 if ebtr.User != nil {
326 objectMap["user"] = ebtr.User
327 }
328 if ebtr.Cloud != nil {
329 objectMap["cloud"] = ebtr.Cloud
330 }
331 if ebtr.Ai != nil {
332 objectMap["ai"] = ebtr.Ai
333 }
334 if ebtr.Application != nil {
335 objectMap["application"] = ebtr.Application
336 }
337 if ebtr.Client != nil {
338 objectMap["client"] = ebtr.Client
339 }
340 if ebtr.Type != "" {
341 objectMap["type"] = ebtr.Type
342 }
343 return json.Marshal(objectMap)
344 }
345
346
347 func (ebtr EventsBrowserTimingResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
348 return nil, false
349 }
350
351
352 func (ebtr EventsBrowserTimingResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
353 return nil, false
354 }
355
356
357 func (ebtr EventsBrowserTimingResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
358 return nil, false
359 }
360
361
362 func (ebtr EventsBrowserTimingResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
363 return &ebtr, true
364 }
365
366
367 func (ebtr EventsBrowserTimingResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
368 return nil, false
369 }
370
371
372 func (ebtr EventsBrowserTimingResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
373 return nil, false
374 }
375
376
377 func (ebtr EventsBrowserTimingResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
378 return nil, false
379 }
380
381
382 func (ebtr EventsBrowserTimingResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
383 return nil, false
384 }
385
386
387 func (ebtr EventsBrowserTimingResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
388 return nil, false
389 }
390
391
392 func (ebtr EventsBrowserTimingResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
393 return nil, false
394 }
395
396
397 func (ebtr EventsBrowserTimingResult) AsEventsResultData() (*EventsResultData, bool) {
398 return nil, false
399 }
400
401
402 func (ebtr EventsBrowserTimingResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
403 return &ebtr, true
404 }
405
406
407 type EventsClientInfo struct {
408
409 Model *string `json:"model,omitempty"`
410
411 Os *string `json:"os,omitempty"`
412
413 Type *string `json:"type,omitempty"`
414
415 Browser *string `json:"browser,omitempty"`
416
417 IP *string `json:"ip,omitempty"`
418
419 City *string `json:"city,omitempty"`
420
421 StateOrProvince *string `json:"stateOrProvince,omitempty"`
422
423 CountryOrRegion *string `json:"countryOrRegion,omitempty"`
424 }
425
426
427 type EventsClientPerformanceInfo struct {
428
429 Name *string `json:"name,omitempty"`
430 }
431
432
433 type EventsCloudInfo struct {
434
435 RoleName *string `json:"roleName,omitempty"`
436
437 RoleInstance *string `json:"roleInstance,omitempty"`
438 }
439
440
441 type EventsCustomEventInfo struct {
442
443 Name *string `json:"name,omitempty"`
444 }
445
446
447 type EventsCustomEventResult struct {
448 CustomEvent *EventsCustomEventInfo `json:"customEvent,omitempty"`
449
450 ID *string `json:"id,omitempty"`
451
452 Count *int64 `json:"count,omitempty"`
453
454 Timestamp *date.Time `json:"timestamp,omitempty"`
455
456 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
457
458 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
459
460 Operation *EventsOperationInfo `json:"operation,omitempty"`
461
462 Session *EventsSessionInfo `json:"session,omitempty"`
463
464 User *EventsUserInfo `json:"user,omitempty"`
465
466 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
467
468 Ai *EventsAiInfo `json:"ai,omitempty"`
469
470 Application *EventsApplicationInfo `json:"application,omitempty"`
471
472 Client *EventsClientInfo `json:"client,omitempty"`
473
474 Type Type `json:"type,omitempty"`
475 }
476
477
478 func (ecer EventsCustomEventResult) MarshalJSON() ([]byte, error) {
479 ecer.Type = TypeCustomEvent
480 objectMap := make(map[string]interface{})
481 if ecer.CustomEvent != nil {
482 objectMap["customEvent"] = ecer.CustomEvent
483 }
484 if ecer.ID != nil {
485 objectMap["id"] = ecer.ID
486 }
487 if ecer.Count != nil {
488 objectMap["count"] = ecer.Count
489 }
490 if ecer.Timestamp != nil {
491 objectMap["timestamp"] = ecer.Timestamp
492 }
493 if ecer.CustomDimensions != nil {
494 objectMap["customDimensions"] = ecer.CustomDimensions
495 }
496 if ecer.CustomMeasurements != nil {
497 objectMap["customMeasurements"] = ecer.CustomMeasurements
498 }
499 if ecer.Operation != nil {
500 objectMap["operation"] = ecer.Operation
501 }
502 if ecer.Session != nil {
503 objectMap["session"] = ecer.Session
504 }
505 if ecer.User != nil {
506 objectMap["user"] = ecer.User
507 }
508 if ecer.Cloud != nil {
509 objectMap["cloud"] = ecer.Cloud
510 }
511 if ecer.Ai != nil {
512 objectMap["ai"] = ecer.Ai
513 }
514 if ecer.Application != nil {
515 objectMap["application"] = ecer.Application
516 }
517 if ecer.Client != nil {
518 objectMap["client"] = ecer.Client
519 }
520 if ecer.Type != "" {
521 objectMap["type"] = ecer.Type
522 }
523 return json.Marshal(objectMap)
524 }
525
526
527 func (ecer EventsCustomEventResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
528 return nil, false
529 }
530
531
532 func (ecer EventsCustomEventResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
533 return &ecer, true
534 }
535
536
537 func (ecer EventsCustomEventResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
538 return nil, false
539 }
540
541
542 func (ecer EventsCustomEventResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
543 return nil, false
544 }
545
546
547 func (ecer EventsCustomEventResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
548 return nil, false
549 }
550
551
552 func (ecer EventsCustomEventResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
553 return nil, false
554 }
555
556
557 func (ecer EventsCustomEventResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
558 return nil, false
559 }
560
561
562 func (ecer EventsCustomEventResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
563 return nil, false
564 }
565
566
567 func (ecer EventsCustomEventResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
568 return nil, false
569 }
570
571
572 func (ecer EventsCustomEventResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
573 return nil, false
574 }
575
576
577 func (ecer EventsCustomEventResult) AsEventsResultData() (*EventsResultData, bool) {
578 return nil, false
579 }
580
581
582 func (ecer EventsCustomEventResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
583 return &ecer, true
584 }
585
586
587 type EventsCustomMetricInfo struct {
588
589 Name *string `json:"name,omitempty"`
590
591 Value *float64 `json:"value,omitempty"`
592
593 ValueSum *float64 `json:"valueSum,omitempty"`
594
595 ValueCount *int32 `json:"valueCount,omitempty"`
596
597 ValueMin *float64 `json:"valueMin,omitempty"`
598
599 ValueMax *float64 `json:"valueMax,omitempty"`
600
601 ValueStdDev *float64 `json:"valueStdDev,omitempty"`
602 }
603
604
605 type EventsCustomMetricResult struct {
606 CustomMetric *EventsCustomMetricInfo `json:"customMetric,omitempty"`
607
608 ID *string `json:"id,omitempty"`
609
610 Count *int64 `json:"count,omitempty"`
611
612 Timestamp *date.Time `json:"timestamp,omitempty"`
613
614 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
615
616 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
617
618 Operation *EventsOperationInfo `json:"operation,omitempty"`
619
620 Session *EventsSessionInfo `json:"session,omitempty"`
621
622 User *EventsUserInfo `json:"user,omitempty"`
623
624 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
625
626 Ai *EventsAiInfo `json:"ai,omitempty"`
627
628 Application *EventsApplicationInfo `json:"application,omitempty"`
629
630 Client *EventsClientInfo `json:"client,omitempty"`
631
632 Type Type `json:"type,omitempty"`
633 }
634
635
636 func (ecmr EventsCustomMetricResult) MarshalJSON() ([]byte, error) {
637 ecmr.Type = TypeCustomMetric
638 objectMap := make(map[string]interface{})
639 if ecmr.CustomMetric != nil {
640 objectMap["customMetric"] = ecmr.CustomMetric
641 }
642 if ecmr.ID != nil {
643 objectMap["id"] = ecmr.ID
644 }
645 if ecmr.Count != nil {
646 objectMap["count"] = ecmr.Count
647 }
648 if ecmr.Timestamp != nil {
649 objectMap["timestamp"] = ecmr.Timestamp
650 }
651 if ecmr.CustomDimensions != nil {
652 objectMap["customDimensions"] = ecmr.CustomDimensions
653 }
654 if ecmr.CustomMeasurements != nil {
655 objectMap["customMeasurements"] = ecmr.CustomMeasurements
656 }
657 if ecmr.Operation != nil {
658 objectMap["operation"] = ecmr.Operation
659 }
660 if ecmr.Session != nil {
661 objectMap["session"] = ecmr.Session
662 }
663 if ecmr.User != nil {
664 objectMap["user"] = ecmr.User
665 }
666 if ecmr.Cloud != nil {
667 objectMap["cloud"] = ecmr.Cloud
668 }
669 if ecmr.Ai != nil {
670 objectMap["ai"] = ecmr.Ai
671 }
672 if ecmr.Application != nil {
673 objectMap["application"] = ecmr.Application
674 }
675 if ecmr.Client != nil {
676 objectMap["client"] = ecmr.Client
677 }
678 if ecmr.Type != "" {
679 objectMap["type"] = ecmr.Type
680 }
681 return json.Marshal(objectMap)
682 }
683
684
685 func (ecmr EventsCustomMetricResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
686 return nil, false
687 }
688
689
690 func (ecmr EventsCustomMetricResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
691 return nil, false
692 }
693
694
695 func (ecmr EventsCustomMetricResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
696 return nil, false
697 }
698
699
700 func (ecmr EventsCustomMetricResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
701 return nil, false
702 }
703
704
705 func (ecmr EventsCustomMetricResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
706 return nil, false
707 }
708
709
710 func (ecmr EventsCustomMetricResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
711 return nil, false
712 }
713
714
715 func (ecmr EventsCustomMetricResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
716 return nil, false
717 }
718
719
720 func (ecmr EventsCustomMetricResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
721 return nil, false
722 }
723
724
725 func (ecmr EventsCustomMetricResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
726 return nil, false
727 }
728
729
730 func (ecmr EventsCustomMetricResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
731 return &ecmr, true
732 }
733
734
735 func (ecmr EventsCustomMetricResult) AsEventsResultData() (*EventsResultData, bool) {
736 return nil, false
737 }
738
739
740 func (ecmr EventsCustomMetricResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
741 return &ecmr, true
742 }
743
744
745 type EventsDependencyInfo struct {
746
747 Target *string `json:"target,omitempty"`
748
749 Data *string `json:"data,omitempty"`
750
751 Success *string `json:"success,omitempty"`
752
753 Duration *int64 `json:"duration,omitempty"`
754
755 PerformanceBucket *string `json:"performanceBucket,omitempty"`
756
757 ResultCode *string `json:"resultCode,omitempty"`
758
759 Type *string `json:"type,omitempty"`
760
761 Name *string `json:"name,omitempty"`
762
763 ID *string `json:"id,omitempty"`
764 }
765
766
767 type EventsDependencyResult struct {
768 Dependency *EventsDependencyInfo `json:"dependency,omitempty"`
769
770 ID *string `json:"id,omitempty"`
771
772 Count *int64 `json:"count,omitempty"`
773
774 Timestamp *date.Time `json:"timestamp,omitempty"`
775
776 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
777
778 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
779
780 Operation *EventsOperationInfo `json:"operation,omitempty"`
781
782 Session *EventsSessionInfo `json:"session,omitempty"`
783
784 User *EventsUserInfo `json:"user,omitempty"`
785
786 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
787
788 Ai *EventsAiInfo `json:"ai,omitempty"`
789
790 Application *EventsApplicationInfo `json:"application,omitempty"`
791
792 Client *EventsClientInfo `json:"client,omitempty"`
793
794 Type Type `json:"type,omitempty"`
795 }
796
797
798 func (edr EventsDependencyResult) MarshalJSON() ([]byte, error) {
799 edr.Type = TypeDependency
800 objectMap := make(map[string]interface{})
801 if edr.Dependency != nil {
802 objectMap["dependency"] = edr.Dependency
803 }
804 if edr.ID != nil {
805 objectMap["id"] = edr.ID
806 }
807 if edr.Count != nil {
808 objectMap["count"] = edr.Count
809 }
810 if edr.Timestamp != nil {
811 objectMap["timestamp"] = edr.Timestamp
812 }
813 if edr.CustomDimensions != nil {
814 objectMap["customDimensions"] = edr.CustomDimensions
815 }
816 if edr.CustomMeasurements != nil {
817 objectMap["customMeasurements"] = edr.CustomMeasurements
818 }
819 if edr.Operation != nil {
820 objectMap["operation"] = edr.Operation
821 }
822 if edr.Session != nil {
823 objectMap["session"] = edr.Session
824 }
825 if edr.User != nil {
826 objectMap["user"] = edr.User
827 }
828 if edr.Cloud != nil {
829 objectMap["cloud"] = edr.Cloud
830 }
831 if edr.Ai != nil {
832 objectMap["ai"] = edr.Ai
833 }
834 if edr.Application != nil {
835 objectMap["application"] = edr.Application
836 }
837 if edr.Client != nil {
838 objectMap["client"] = edr.Client
839 }
840 if edr.Type != "" {
841 objectMap["type"] = edr.Type
842 }
843 return json.Marshal(objectMap)
844 }
845
846
847 func (edr EventsDependencyResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
848 return nil, false
849 }
850
851
852 func (edr EventsDependencyResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
853 return nil, false
854 }
855
856
857 func (edr EventsDependencyResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
858 return nil, false
859 }
860
861
862 func (edr EventsDependencyResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
863 return nil, false
864 }
865
866
867 func (edr EventsDependencyResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
868 return nil, false
869 }
870
871
872 func (edr EventsDependencyResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
873 return &edr, true
874 }
875
876
877 func (edr EventsDependencyResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
878 return nil, false
879 }
880
881
882 func (edr EventsDependencyResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
883 return nil, false
884 }
885
886
887 func (edr EventsDependencyResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
888 return nil, false
889 }
890
891
892 func (edr EventsDependencyResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
893 return nil, false
894 }
895
896
897 func (edr EventsDependencyResult) AsEventsResultData() (*EventsResultData, bool) {
898 return nil, false
899 }
900
901
902 func (edr EventsDependencyResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
903 return &edr, true
904 }
905
906
907 type EventsExceptionDetail struct {
908
909 SeverityLevel *string `json:"severityLevel,omitempty"`
910
911 OuterID *string `json:"outerId,omitempty"`
912
913 Message *string `json:"message,omitempty"`
914
915 Type *string `json:"type,omitempty"`
916
917 ID *string `json:"id,omitempty"`
918
919 ParsedStack *[]EventsExceptionDetailsParsedStack `json:"parsedStack,omitempty"`
920 }
921
922
923 type EventsExceptionDetailsParsedStack struct {
924
925 Assembly *string `json:"assembly,omitempty"`
926
927 Method *string `json:"method,omitempty"`
928
929 Level *int64 `json:"level,omitempty"`
930
931 Line *int64 `json:"line,omitempty"`
932 }
933
934
935 type EventsExceptionInfo struct {
936
937 SeverityLevel *int32 `json:"severityLevel,omitempty"`
938
939 ProblemID *string `json:"problemId,omitempty"`
940
941 HandledAt *string `json:"handledAt,omitempty"`
942
943 Assembly *string `json:"assembly,omitempty"`
944
945 Method *string `json:"method,omitempty"`
946
947 Message *string `json:"message,omitempty"`
948
949 Type *string `json:"type,omitempty"`
950
951 OuterType *string `json:"outerType,omitempty"`
952
953 OuterMethod *string `json:"outerMethod,omitempty"`
954
955 OuterAssembly *string `json:"outerAssembly,omitempty"`
956
957 OuterMessage *string `json:"outerMessage,omitempty"`
958
959 InnermostType *string `json:"innermostType,omitempty"`
960
961 InnermostMessage *string `json:"innermostMessage,omitempty"`
962
963 InnermostMethod *string `json:"innermostMethod,omitempty"`
964
965 InnermostAssembly *string `json:"innermostAssembly,omitempty"`
966
967 Details *[]EventsExceptionDetail `json:"details,omitempty"`
968 }
969
970
971 type EventsExceptionResult struct {
972 Exception *EventsExceptionInfo `json:"exception,omitempty"`
973
974 ID *string `json:"id,omitempty"`
975
976 Count *int64 `json:"count,omitempty"`
977
978 Timestamp *date.Time `json:"timestamp,omitempty"`
979
980 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
981
982 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
983
984 Operation *EventsOperationInfo `json:"operation,omitempty"`
985
986 Session *EventsSessionInfo `json:"session,omitempty"`
987
988 User *EventsUserInfo `json:"user,omitempty"`
989
990 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
991
992 Ai *EventsAiInfo `json:"ai,omitempty"`
993
994 Application *EventsApplicationInfo `json:"application,omitempty"`
995
996 Client *EventsClientInfo `json:"client,omitempty"`
997
998 Type Type `json:"type,omitempty"`
999 }
1000
1001
1002 func (eer EventsExceptionResult) MarshalJSON() ([]byte, error) {
1003 eer.Type = TypeException
1004 objectMap := make(map[string]interface{})
1005 if eer.Exception != nil {
1006 objectMap["exception"] = eer.Exception
1007 }
1008 if eer.ID != nil {
1009 objectMap["id"] = eer.ID
1010 }
1011 if eer.Count != nil {
1012 objectMap["count"] = eer.Count
1013 }
1014 if eer.Timestamp != nil {
1015 objectMap["timestamp"] = eer.Timestamp
1016 }
1017 if eer.CustomDimensions != nil {
1018 objectMap["customDimensions"] = eer.CustomDimensions
1019 }
1020 if eer.CustomMeasurements != nil {
1021 objectMap["customMeasurements"] = eer.CustomMeasurements
1022 }
1023 if eer.Operation != nil {
1024 objectMap["operation"] = eer.Operation
1025 }
1026 if eer.Session != nil {
1027 objectMap["session"] = eer.Session
1028 }
1029 if eer.User != nil {
1030 objectMap["user"] = eer.User
1031 }
1032 if eer.Cloud != nil {
1033 objectMap["cloud"] = eer.Cloud
1034 }
1035 if eer.Ai != nil {
1036 objectMap["ai"] = eer.Ai
1037 }
1038 if eer.Application != nil {
1039 objectMap["application"] = eer.Application
1040 }
1041 if eer.Client != nil {
1042 objectMap["client"] = eer.Client
1043 }
1044 if eer.Type != "" {
1045 objectMap["type"] = eer.Type
1046 }
1047 return json.Marshal(objectMap)
1048 }
1049
1050
1051 func (eer EventsExceptionResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
1052 return nil, false
1053 }
1054
1055
1056 func (eer EventsExceptionResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
1057 return nil, false
1058 }
1059
1060
1061 func (eer EventsExceptionResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
1062 return nil, false
1063 }
1064
1065
1066 func (eer EventsExceptionResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
1067 return nil, false
1068 }
1069
1070
1071 func (eer EventsExceptionResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
1072 return nil, false
1073 }
1074
1075
1076 func (eer EventsExceptionResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
1077 return nil, false
1078 }
1079
1080
1081 func (eer EventsExceptionResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
1082 return &eer, true
1083 }
1084
1085
1086 func (eer EventsExceptionResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
1087 return nil, false
1088 }
1089
1090
1091 func (eer EventsExceptionResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
1092 return nil, false
1093 }
1094
1095
1096 func (eer EventsExceptionResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
1097 return nil, false
1098 }
1099
1100
1101 func (eer EventsExceptionResult) AsEventsResultData() (*EventsResultData, bool) {
1102 return nil, false
1103 }
1104
1105
1106 func (eer EventsExceptionResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
1107 return &eer, true
1108 }
1109
1110
1111 type EventsOperationInfo struct {
1112
1113 Name *string `json:"name,omitempty"`
1114
1115 ID *string `json:"id,omitempty"`
1116
1117 ParentID *string `json:"parentId,omitempty"`
1118
1119 SyntheticSource *string `json:"syntheticSource,omitempty"`
1120 }
1121
1122
1123 type EventsPageViewInfo struct {
1124
1125 Name *string `json:"name,omitempty"`
1126
1127 URL *string `json:"url,omitempty"`
1128
1129 Duration *string `json:"duration,omitempty"`
1130
1131 PerformanceBucket *string `json:"performanceBucket,omitempty"`
1132 }
1133
1134
1135 type EventsPageViewResult struct {
1136 PageView *EventsPageViewInfo `json:"pageView,omitempty"`
1137
1138 ID *string `json:"id,omitempty"`
1139
1140 Count *int64 `json:"count,omitempty"`
1141
1142 Timestamp *date.Time `json:"timestamp,omitempty"`
1143
1144 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
1145
1146 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
1147
1148 Operation *EventsOperationInfo `json:"operation,omitempty"`
1149
1150 Session *EventsSessionInfo `json:"session,omitempty"`
1151
1152 User *EventsUserInfo `json:"user,omitempty"`
1153
1154 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
1155
1156 Ai *EventsAiInfo `json:"ai,omitempty"`
1157
1158 Application *EventsApplicationInfo `json:"application,omitempty"`
1159
1160 Client *EventsClientInfo `json:"client,omitempty"`
1161
1162 Type Type `json:"type,omitempty"`
1163 }
1164
1165
1166 func (epvr EventsPageViewResult) MarshalJSON() ([]byte, error) {
1167 epvr.Type = TypePageView
1168 objectMap := make(map[string]interface{})
1169 if epvr.PageView != nil {
1170 objectMap["pageView"] = epvr.PageView
1171 }
1172 if epvr.ID != nil {
1173 objectMap["id"] = epvr.ID
1174 }
1175 if epvr.Count != nil {
1176 objectMap["count"] = epvr.Count
1177 }
1178 if epvr.Timestamp != nil {
1179 objectMap["timestamp"] = epvr.Timestamp
1180 }
1181 if epvr.CustomDimensions != nil {
1182 objectMap["customDimensions"] = epvr.CustomDimensions
1183 }
1184 if epvr.CustomMeasurements != nil {
1185 objectMap["customMeasurements"] = epvr.CustomMeasurements
1186 }
1187 if epvr.Operation != nil {
1188 objectMap["operation"] = epvr.Operation
1189 }
1190 if epvr.Session != nil {
1191 objectMap["session"] = epvr.Session
1192 }
1193 if epvr.User != nil {
1194 objectMap["user"] = epvr.User
1195 }
1196 if epvr.Cloud != nil {
1197 objectMap["cloud"] = epvr.Cloud
1198 }
1199 if epvr.Ai != nil {
1200 objectMap["ai"] = epvr.Ai
1201 }
1202 if epvr.Application != nil {
1203 objectMap["application"] = epvr.Application
1204 }
1205 if epvr.Client != nil {
1206 objectMap["client"] = epvr.Client
1207 }
1208 if epvr.Type != "" {
1209 objectMap["type"] = epvr.Type
1210 }
1211 return json.Marshal(objectMap)
1212 }
1213
1214
1215 func (epvr EventsPageViewResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
1216 return nil, false
1217 }
1218
1219
1220 func (epvr EventsPageViewResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
1221 return nil, false
1222 }
1223
1224
1225 func (epvr EventsPageViewResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
1226 return &epvr, true
1227 }
1228
1229
1230 func (epvr EventsPageViewResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
1231 return nil, false
1232 }
1233
1234
1235 func (epvr EventsPageViewResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
1236 return nil, false
1237 }
1238
1239
1240 func (epvr EventsPageViewResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
1241 return nil, false
1242 }
1243
1244
1245 func (epvr EventsPageViewResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
1246 return nil, false
1247 }
1248
1249
1250 func (epvr EventsPageViewResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
1251 return nil, false
1252 }
1253
1254
1255 func (epvr EventsPageViewResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
1256 return nil, false
1257 }
1258
1259
1260 func (epvr EventsPageViewResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
1261 return nil, false
1262 }
1263
1264
1265 func (epvr EventsPageViewResult) AsEventsResultData() (*EventsResultData, bool) {
1266 return nil, false
1267 }
1268
1269
1270 func (epvr EventsPageViewResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
1271 return &epvr, true
1272 }
1273
1274
1275 type EventsPerformanceCounterInfo struct {
1276
1277 Value *float64 `json:"value,omitempty"`
1278
1279 Name *string `json:"name,omitempty"`
1280
1281 Category *string `json:"category,omitempty"`
1282
1283 Counter *string `json:"counter,omitempty"`
1284
1285 InstanceName *string `json:"instanceName,omitempty"`
1286
1287 Instance *string `json:"instance,omitempty"`
1288 }
1289
1290
1291 type EventsPerformanceCounterResult struct {
1292 PerformanceCounter *EventsPerformanceCounterInfo `json:"performanceCounter,omitempty"`
1293
1294 ID *string `json:"id,omitempty"`
1295
1296 Count *int64 `json:"count,omitempty"`
1297
1298 Timestamp *date.Time `json:"timestamp,omitempty"`
1299
1300 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
1301
1302 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
1303
1304 Operation *EventsOperationInfo `json:"operation,omitempty"`
1305
1306 Session *EventsSessionInfo `json:"session,omitempty"`
1307
1308 User *EventsUserInfo `json:"user,omitempty"`
1309
1310 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
1311
1312 Ai *EventsAiInfo `json:"ai,omitempty"`
1313
1314 Application *EventsApplicationInfo `json:"application,omitempty"`
1315
1316 Client *EventsClientInfo `json:"client,omitempty"`
1317
1318 Type Type `json:"type,omitempty"`
1319 }
1320
1321
1322 func (epcr EventsPerformanceCounterResult) MarshalJSON() ([]byte, error) {
1323 epcr.Type = TypePerformanceCounter
1324 objectMap := make(map[string]interface{})
1325 if epcr.PerformanceCounter != nil {
1326 objectMap["performanceCounter"] = epcr.PerformanceCounter
1327 }
1328 if epcr.ID != nil {
1329 objectMap["id"] = epcr.ID
1330 }
1331 if epcr.Count != nil {
1332 objectMap["count"] = epcr.Count
1333 }
1334 if epcr.Timestamp != nil {
1335 objectMap["timestamp"] = epcr.Timestamp
1336 }
1337 if epcr.CustomDimensions != nil {
1338 objectMap["customDimensions"] = epcr.CustomDimensions
1339 }
1340 if epcr.CustomMeasurements != nil {
1341 objectMap["customMeasurements"] = epcr.CustomMeasurements
1342 }
1343 if epcr.Operation != nil {
1344 objectMap["operation"] = epcr.Operation
1345 }
1346 if epcr.Session != nil {
1347 objectMap["session"] = epcr.Session
1348 }
1349 if epcr.User != nil {
1350 objectMap["user"] = epcr.User
1351 }
1352 if epcr.Cloud != nil {
1353 objectMap["cloud"] = epcr.Cloud
1354 }
1355 if epcr.Ai != nil {
1356 objectMap["ai"] = epcr.Ai
1357 }
1358 if epcr.Application != nil {
1359 objectMap["application"] = epcr.Application
1360 }
1361 if epcr.Client != nil {
1362 objectMap["client"] = epcr.Client
1363 }
1364 if epcr.Type != "" {
1365 objectMap["type"] = epcr.Type
1366 }
1367 return json.Marshal(objectMap)
1368 }
1369
1370
1371 func (epcr EventsPerformanceCounterResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
1372 return nil, false
1373 }
1374
1375
1376 func (epcr EventsPerformanceCounterResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
1377 return nil, false
1378 }
1379
1380
1381 func (epcr EventsPerformanceCounterResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
1382 return nil, false
1383 }
1384
1385
1386 func (epcr EventsPerformanceCounterResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
1387 return nil, false
1388 }
1389
1390
1391 func (epcr EventsPerformanceCounterResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
1392 return nil, false
1393 }
1394
1395
1396 func (epcr EventsPerformanceCounterResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
1397 return nil, false
1398 }
1399
1400
1401 func (epcr EventsPerformanceCounterResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
1402 return nil, false
1403 }
1404
1405
1406 func (epcr EventsPerformanceCounterResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
1407 return nil, false
1408 }
1409
1410
1411 func (epcr EventsPerformanceCounterResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
1412 return &epcr, true
1413 }
1414
1415
1416 func (epcr EventsPerformanceCounterResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
1417 return nil, false
1418 }
1419
1420
1421 func (epcr EventsPerformanceCounterResult) AsEventsResultData() (*EventsResultData, bool) {
1422 return nil, false
1423 }
1424
1425
1426 func (epcr EventsPerformanceCounterResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
1427 return &epcr, true
1428 }
1429
1430
1431 type EventsRequestInfo struct {
1432
1433 Name *string `json:"name,omitempty"`
1434
1435 URL *string `json:"url,omitempty"`
1436
1437 Success *string `json:"success,omitempty"`
1438
1439 Duration *float64 `json:"duration,omitempty"`
1440
1441 PerformanceBucket *string `json:"performanceBucket,omitempty"`
1442
1443 ResultCode *string `json:"resultCode,omitempty"`
1444
1445 Source *string `json:"source,omitempty"`
1446
1447 ID *string `json:"id,omitempty"`
1448 }
1449
1450
1451 type EventsRequestResult struct {
1452 Request *EventsRequestInfo `json:"request,omitempty"`
1453
1454 ID *string `json:"id,omitempty"`
1455
1456 Count *int64 `json:"count,omitempty"`
1457
1458 Timestamp *date.Time `json:"timestamp,omitempty"`
1459
1460 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
1461
1462 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
1463
1464 Operation *EventsOperationInfo `json:"operation,omitempty"`
1465
1466 Session *EventsSessionInfo `json:"session,omitempty"`
1467
1468 User *EventsUserInfo `json:"user,omitempty"`
1469
1470 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
1471
1472 Ai *EventsAiInfo `json:"ai,omitempty"`
1473
1474 Application *EventsApplicationInfo `json:"application,omitempty"`
1475
1476 Client *EventsClientInfo `json:"client,omitempty"`
1477
1478 Type Type `json:"type,omitempty"`
1479 }
1480
1481
1482 func (errVar EventsRequestResult) MarshalJSON() ([]byte, error) {
1483 errVar.Type = TypeRequest
1484 objectMap := make(map[string]interface{})
1485 if errVar.Request != nil {
1486 objectMap["request"] = errVar.Request
1487 }
1488 if errVar.ID != nil {
1489 objectMap["id"] = errVar.ID
1490 }
1491 if errVar.Count != nil {
1492 objectMap["count"] = errVar.Count
1493 }
1494 if errVar.Timestamp != nil {
1495 objectMap["timestamp"] = errVar.Timestamp
1496 }
1497 if errVar.CustomDimensions != nil {
1498 objectMap["customDimensions"] = errVar.CustomDimensions
1499 }
1500 if errVar.CustomMeasurements != nil {
1501 objectMap["customMeasurements"] = errVar.CustomMeasurements
1502 }
1503 if errVar.Operation != nil {
1504 objectMap["operation"] = errVar.Operation
1505 }
1506 if errVar.Session != nil {
1507 objectMap["session"] = errVar.Session
1508 }
1509 if errVar.User != nil {
1510 objectMap["user"] = errVar.User
1511 }
1512 if errVar.Cloud != nil {
1513 objectMap["cloud"] = errVar.Cloud
1514 }
1515 if errVar.Ai != nil {
1516 objectMap["ai"] = errVar.Ai
1517 }
1518 if errVar.Application != nil {
1519 objectMap["application"] = errVar.Application
1520 }
1521 if errVar.Client != nil {
1522 objectMap["client"] = errVar.Client
1523 }
1524 if errVar.Type != "" {
1525 objectMap["type"] = errVar.Type
1526 }
1527 return json.Marshal(objectMap)
1528 }
1529
1530
1531 func (errVar EventsRequestResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
1532 return nil, false
1533 }
1534
1535
1536 func (errVar EventsRequestResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
1537 return nil, false
1538 }
1539
1540
1541 func (errVar EventsRequestResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
1542 return nil, false
1543 }
1544
1545
1546 func (errVar EventsRequestResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
1547 return nil, false
1548 }
1549
1550
1551 func (errVar EventsRequestResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
1552 return &errVar, true
1553 }
1554
1555
1556 func (errVar EventsRequestResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
1557 return nil, false
1558 }
1559
1560
1561 func (errVar EventsRequestResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
1562 return nil, false
1563 }
1564
1565
1566 func (errVar EventsRequestResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
1567 return nil, false
1568 }
1569
1570
1571 func (errVar EventsRequestResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
1572 return nil, false
1573 }
1574
1575
1576 func (errVar EventsRequestResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
1577 return nil, false
1578 }
1579
1580
1581 func (errVar EventsRequestResult) AsEventsResultData() (*EventsResultData, bool) {
1582 return nil, false
1583 }
1584
1585
1586 func (errVar EventsRequestResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
1587 return &errVar, true
1588 }
1589
1590
1591 type EventsResult struct {
1592
1593 AiMessages *[]ErrorInfo `json:"@ai.messages,omitempty"`
1594 Value BasicEventsResultData `json:"value,omitempty"`
1595 }
1596
1597
1598 func (er *EventsResult) UnmarshalJSON(body []byte) error {
1599 var m map[string]*json.RawMessage
1600 err := json.Unmarshal(body, &m)
1601 if err != nil {
1602 return err
1603 }
1604 for k, v := range m {
1605 switch k {
1606 case "@ai.messages":
1607 if v != nil {
1608 var aiMessages []ErrorInfo
1609 err = json.Unmarshal(*v, &aiMessages)
1610 if err != nil {
1611 return err
1612 }
1613 er.AiMessages = &aiMessages
1614 }
1615 case "value":
1616 if v != nil {
1617 value, err := unmarshalBasicEventsResultData(*v)
1618 if err != nil {
1619 return err
1620 }
1621 er.Value = value
1622 }
1623 }
1624 }
1625
1626 return nil
1627 }
1628
1629
1630 type BasicEventsResultData interface {
1631 AsEventsTraceResult() (*EventsTraceResult, bool)
1632 AsEventsCustomEventResult() (*EventsCustomEventResult, bool)
1633 AsEventsPageViewResult() (*EventsPageViewResult, bool)
1634 AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool)
1635 AsEventsRequestResult() (*EventsRequestResult, bool)
1636 AsEventsDependencyResult() (*EventsDependencyResult, bool)
1637 AsEventsExceptionResult() (*EventsExceptionResult, bool)
1638 AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool)
1639 AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool)
1640 AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool)
1641 AsEventsResultData() (*EventsResultData, bool)
1642 }
1643
1644
1645 type EventsResultData struct {
1646
1647 ID *string `json:"id,omitempty"`
1648
1649 Count *int64 `json:"count,omitempty"`
1650
1651 Timestamp *date.Time `json:"timestamp,omitempty"`
1652
1653 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
1654
1655 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
1656
1657 Operation *EventsOperationInfo `json:"operation,omitempty"`
1658
1659 Session *EventsSessionInfo `json:"session,omitempty"`
1660
1661 User *EventsUserInfo `json:"user,omitempty"`
1662
1663 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
1664
1665 Ai *EventsAiInfo `json:"ai,omitempty"`
1666
1667 Application *EventsApplicationInfo `json:"application,omitempty"`
1668
1669 Client *EventsClientInfo `json:"client,omitempty"`
1670
1671 Type Type `json:"type,omitempty"`
1672 }
1673
1674 func unmarshalBasicEventsResultData(body []byte) (BasicEventsResultData, error) {
1675 var m map[string]interface{}
1676 err := json.Unmarshal(body, &m)
1677 if err != nil {
1678 return nil, err
1679 }
1680
1681 switch m["type"] {
1682 case string(TypeTrace):
1683 var etr EventsTraceResult
1684 err := json.Unmarshal(body, &etr)
1685 return etr, err
1686 case string(TypeCustomEvent):
1687 var ecer EventsCustomEventResult
1688 err := json.Unmarshal(body, &ecer)
1689 return ecer, err
1690 case string(TypePageView):
1691 var epvr EventsPageViewResult
1692 err := json.Unmarshal(body, &epvr)
1693 return epvr, err
1694 case string(TypeBrowserTiming):
1695 var ebtr EventsBrowserTimingResult
1696 err := json.Unmarshal(body, &ebtr)
1697 return ebtr, err
1698 case string(TypeRequest):
1699 var errVar EventsRequestResult
1700 err := json.Unmarshal(body, &errVar)
1701 return errVar, err
1702 case string(TypeDependency):
1703 var edr EventsDependencyResult
1704 err := json.Unmarshal(body, &edr)
1705 return edr, err
1706 case string(TypeException):
1707 var eer EventsExceptionResult
1708 err := json.Unmarshal(body, &eer)
1709 return eer, err
1710 case string(TypeAvailabilityResult):
1711 var earr EventsAvailabilityResultResult
1712 err := json.Unmarshal(body, &earr)
1713 return earr, err
1714 case string(TypePerformanceCounter):
1715 var epcr EventsPerformanceCounterResult
1716 err := json.Unmarshal(body, &epcr)
1717 return epcr, err
1718 case string(TypeCustomMetric):
1719 var ecmr EventsCustomMetricResult
1720 err := json.Unmarshal(body, &ecmr)
1721 return ecmr, err
1722 default:
1723 var erd EventsResultData
1724 err := json.Unmarshal(body, &erd)
1725 return erd, err
1726 }
1727 }
1728 func unmarshalBasicEventsResultDataArray(body []byte) ([]BasicEventsResultData, error) {
1729 var rawMessages []*json.RawMessage
1730 err := json.Unmarshal(body, &rawMessages)
1731 if err != nil {
1732 return nil, err
1733 }
1734
1735 erdArray := make([]BasicEventsResultData, len(rawMessages))
1736
1737 for index, rawMessage := range rawMessages {
1738 erd, err := unmarshalBasicEventsResultData(*rawMessage)
1739 if err != nil {
1740 return nil, err
1741 }
1742 erdArray[index] = erd
1743 }
1744 return erdArray, nil
1745 }
1746
1747
1748 func (erd EventsResultData) MarshalJSON() ([]byte, error) {
1749 erd.Type = TypeEventsResultData
1750 objectMap := make(map[string]interface{})
1751 if erd.ID != nil {
1752 objectMap["id"] = erd.ID
1753 }
1754 if erd.Count != nil {
1755 objectMap["count"] = erd.Count
1756 }
1757 if erd.Timestamp != nil {
1758 objectMap["timestamp"] = erd.Timestamp
1759 }
1760 if erd.CustomDimensions != nil {
1761 objectMap["customDimensions"] = erd.CustomDimensions
1762 }
1763 if erd.CustomMeasurements != nil {
1764 objectMap["customMeasurements"] = erd.CustomMeasurements
1765 }
1766 if erd.Operation != nil {
1767 objectMap["operation"] = erd.Operation
1768 }
1769 if erd.Session != nil {
1770 objectMap["session"] = erd.Session
1771 }
1772 if erd.User != nil {
1773 objectMap["user"] = erd.User
1774 }
1775 if erd.Cloud != nil {
1776 objectMap["cloud"] = erd.Cloud
1777 }
1778 if erd.Ai != nil {
1779 objectMap["ai"] = erd.Ai
1780 }
1781 if erd.Application != nil {
1782 objectMap["application"] = erd.Application
1783 }
1784 if erd.Client != nil {
1785 objectMap["client"] = erd.Client
1786 }
1787 if erd.Type != "" {
1788 objectMap["type"] = erd.Type
1789 }
1790 return json.Marshal(objectMap)
1791 }
1792
1793
1794 func (erd EventsResultData) AsEventsTraceResult() (*EventsTraceResult, bool) {
1795 return nil, false
1796 }
1797
1798
1799 func (erd EventsResultData) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
1800 return nil, false
1801 }
1802
1803
1804 func (erd EventsResultData) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
1805 return nil, false
1806 }
1807
1808
1809 func (erd EventsResultData) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
1810 return nil, false
1811 }
1812
1813
1814 func (erd EventsResultData) AsEventsRequestResult() (*EventsRequestResult, bool) {
1815 return nil, false
1816 }
1817
1818
1819 func (erd EventsResultData) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
1820 return nil, false
1821 }
1822
1823
1824 func (erd EventsResultData) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
1825 return nil, false
1826 }
1827
1828
1829 func (erd EventsResultData) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
1830 return nil, false
1831 }
1832
1833
1834 func (erd EventsResultData) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
1835 return nil, false
1836 }
1837
1838
1839 func (erd EventsResultData) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
1840 return nil, false
1841 }
1842
1843
1844 func (erd EventsResultData) AsEventsResultData() (*EventsResultData, bool) {
1845 return &erd, true
1846 }
1847
1848
1849 func (erd EventsResultData) AsBasicEventsResultData() (BasicEventsResultData, bool) {
1850 return &erd, true
1851 }
1852
1853
1854 type EventsResultDataCustomDimensions struct {
1855
1856 AdditionalProperties map[string]interface{} `json:""`
1857 AdditionalProperties1 interface{} `json:"additionalProperties,omitempty"`
1858 }
1859
1860
1861 func (erdD EventsResultDataCustomDimensions) MarshalJSON() ([]byte, error) {
1862 objectMap := make(map[string]interface{})
1863 if erdD.AdditionalProperties1 != nil {
1864 objectMap["additionalProperties"] = erdD.AdditionalProperties1
1865 }
1866 for k, v := range erdD.AdditionalProperties {
1867 objectMap[k] = v
1868 }
1869 return json.Marshal(objectMap)
1870 }
1871
1872
1873 func (erdD *EventsResultDataCustomDimensions) UnmarshalJSON(body []byte) error {
1874 var m map[string]*json.RawMessage
1875 err := json.Unmarshal(body, &m)
1876 if err != nil {
1877 return err
1878 }
1879 for k, v := range m {
1880 switch k {
1881 default:
1882 if v != nil {
1883 var additionalProperties interface{}
1884 err = json.Unmarshal(*v, &additionalProperties)
1885 if err != nil {
1886 return err
1887 }
1888 if erdD.AdditionalProperties == nil {
1889 erdD.AdditionalProperties = make(map[string]interface{})
1890 }
1891 erdD.AdditionalProperties[k] = additionalProperties
1892 }
1893 case "additionalProperties":
1894 if v != nil {
1895 var additionalProperties1 interface{}
1896 err = json.Unmarshal(*v, &additionalProperties1)
1897 if err != nil {
1898 return err
1899 }
1900 erdD.AdditionalProperties1 = additionalProperties1
1901 }
1902 }
1903 }
1904
1905 return nil
1906 }
1907
1908
1909 type EventsResultDataCustomMeasurements struct {
1910
1911 AdditionalProperties map[string]interface{} `json:""`
1912 AdditionalProperties1 interface{} `json:"additionalProperties,omitempty"`
1913 }
1914
1915
1916 func (erdM EventsResultDataCustomMeasurements) MarshalJSON() ([]byte, error) {
1917 objectMap := make(map[string]interface{})
1918 if erdM.AdditionalProperties1 != nil {
1919 objectMap["additionalProperties"] = erdM.AdditionalProperties1
1920 }
1921 for k, v := range erdM.AdditionalProperties {
1922 objectMap[k] = v
1923 }
1924 return json.Marshal(objectMap)
1925 }
1926
1927
1928 func (erdM *EventsResultDataCustomMeasurements) UnmarshalJSON(body []byte) error {
1929 var m map[string]*json.RawMessage
1930 err := json.Unmarshal(body, &m)
1931 if err != nil {
1932 return err
1933 }
1934 for k, v := range m {
1935 switch k {
1936 default:
1937 if v != nil {
1938 var additionalProperties interface{}
1939 err = json.Unmarshal(*v, &additionalProperties)
1940 if err != nil {
1941 return err
1942 }
1943 if erdM.AdditionalProperties == nil {
1944 erdM.AdditionalProperties = make(map[string]interface{})
1945 }
1946 erdM.AdditionalProperties[k] = additionalProperties
1947 }
1948 case "additionalProperties":
1949 if v != nil {
1950 var additionalProperties1 interface{}
1951 err = json.Unmarshal(*v, &additionalProperties1)
1952 if err != nil {
1953 return err
1954 }
1955 erdM.AdditionalProperties1 = additionalProperties1
1956 }
1957 }
1958 }
1959
1960 return nil
1961 }
1962
1963
1964 type EventsResults struct {
1965 autorest.Response `json:"-"`
1966
1967 OdataContext *string `json:"@odata.context,omitempty"`
1968
1969 AiMessages *[]ErrorInfo `json:"@ai.messages,omitempty"`
1970
1971 Value *[]BasicEventsResultData `json:"value,omitempty"`
1972 }
1973
1974
1975 func (er *EventsResults) UnmarshalJSON(body []byte) error {
1976 var m map[string]*json.RawMessage
1977 err := json.Unmarshal(body, &m)
1978 if err != nil {
1979 return err
1980 }
1981 for k, v := range m {
1982 switch k {
1983 case "@odata.context":
1984 if v != nil {
1985 var odataContext string
1986 err = json.Unmarshal(*v, &odataContext)
1987 if err != nil {
1988 return err
1989 }
1990 er.OdataContext = &odataContext
1991 }
1992 case "@ai.messages":
1993 if v != nil {
1994 var aiMessages []ErrorInfo
1995 err = json.Unmarshal(*v, &aiMessages)
1996 if err != nil {
1997 return err
1998 }
1999 er.AiMessages = &aiMessages
2000 }
2001 case "value":
2002 if v != nil {
2003 value, err := unmarshalBasicEventsResultDataArray(*v)
2004 if err != nil {
2005 return err
2006 }
2007 er.Value = &value
2008 }
2009 }
2010 }
2011
2012 return nil
2013 }
2014
2015
2016 type EventsSessionInfo struct {
2017
2018 ID *string `json:"id,omitempty"`
2019 }
2020
2021
2022 type EventsTraceInfo struct {
2023
2024 Message *string `json:"message,omitempty"`
2025
2026 SeverityLevel *int32 `json:"severityLevel,omitempty"`
2027 }
2028
2029
2030 type EventsTraceResult struct {
2031 Trace *EventsTraceInfo `json:"trace,omitempty"`
2032
2033 ID *string `json:"id,omitempty"`
2034
2035 Count *int64 `json:"count,omitempty"`
2036
2037 Timestamp *date.Time `json:"timestamp,omitempty"`
2038
2039 CustomDimensions *EventsResultDataCustomDimensions `json:"customDimensions,omitempty"`
2040
2041 CustomMeasurements *EventsResultDataCustomMeasurements `json:"customMeasurements,omitempty"`
2042
2043 Operation *EventsOperationInfo `json:"operation,omitempty"`
2044
2045 Session *EventsSessionInfo `json:"session,omitempty"`
2046
2047 User *EventsUserInfo `json:"user,omitempty"`
2048
2049 Cloud *EventsCloudInfo `json:"cloud,omitempty"`
2050
2051 Ai *EventsAiInfo `json:"ai,omitempty"`
2052
2053 Application *EventsApplicationInfo `json:"application,omitempty"`
2054
2055 Client *EventsClientInfo `json:"client,omitempty"`
2056
2057 Type Type `json:"type,omitempty"`
2058 }
2059
2060
2061 func (etr EventsTraceResult) MarshalJSON() ([]byte, error) {
2062 etr.Type = TypeTrace
2063 objectMap := make(map[string]interface{})
2064 if etr.Trace != nil {
2065 objectMap["trace"] = etr.Trace
2066 }
2067 if etr.ID != nil {
2068 objectMap["id"] = etr.ID
2069 }
2070 if etr.Count != nil {
2071 objectMap["count"] = etr.Count
2072 }
2073 if etr.Timestamp != nil {
2074 objectMap["timestamp"] = etr.Timestamp
2075 }
2076 if etr.CustomDimensions != nil {
2077 objectMap["customDimensions"] = etr.CustomDimensions
2078 }
2079 if etr.CustomMeasurements != nil {
2080 objectMap["customMeasurements"] = etr.CustomMeasurements
2081 }
2082 if etr.Operation != nil {
2083 objectMap["operation"] = etr.Operation
2084 }
2085 if etr.Session != nil {
2086 objectMap["session"] = etr.Session
2087 }
2088 if etr.User != nil {
2089 objectMap["user"] = etr.User
2090 }
2091 if etr.Cloud != nil {
2092 objectMap["cloud"] = etr.Cloud
2093 }
2094 if etr.Ai != nil {
2095 objectMap["ai"] = etr.Ai
2096 }
2097 if etr.Application != nil {
2098 objectMap["application"] = etr.Application
2099 }
2100 if etr.Client != nil {
2101 objectMap["client"] = etr.Client
2102 }
2103 if etr.Type != "" {
2104 objectMap["type"] = etr.Type
2105 }
2106 return json.Marshal(objectMap)
2107 }
2108
2109
2110 func (etr EventsTraceResult) AsEventsTraceResult() (*EventsTraceResult, bool) {
2111 return &etr, true
2112 }
2113
2114
2115 func (etr EventsTraceResult) AsEventsCustomEventResult() (*EventsCustomEventResult, bool) {
2116 return nil, false
2117 }
2118
2119
2120 func (etr EventsTraceResult) AsEventsPageViewResult() (*EventsPageViewResult, bool) {
2121 return nil, false
2122 }
2123
2124
2125 func (etr EventsTraceResult) AsEventsBrowserTimingResult() (*EventsBrowserTimingResult, bool) {
2126 return nil, false
2127 }
2128
2129
2130 func (etr EventsTraceResult) AsEventsRequestResult() (*EventsRequestResult, bool) {
2131 return nil, false
2132 }
2133
2134
2135 func (etr EventsTraceResult) AsEventsDependencyResult() (*EventsDependencyResult, bool) {
2136 return nil, false
2137 }
2138
2139
2140 func (etr EventsTraceResult) AsEventsExceptionResult() (*EventsExceptionResult, bool) {
2141 return nil, false
2142 }
2143
2144
2145 func (etr EventsTraceResult) AsEventsAvailabilityResultResult() (*EventsAvailabilityResultResult, bool) {
2146 return nil, false
2147 }
2148
2149
2150 func (etr EventsTraceResult) AsEventsPerformanceCounterResult() (*EventsPerformanceCounterResult, bool) {
2151 return nil, false
2152 }
2153
2154
2155 func (etr EventsTraceResult) AsEventsCustomMetricResult() (*EventsCustomMetricResult, bool) {
2156 return nil, false
2157 }
2158
2159
2160 func (etr EventsTraceResult) AsEventsResultData() (*EventsResultData, bool) {
2161 return nil, false
2162 }
2163
2164
2165 func (etr EventsTraceResult) AsBasicEventsResultData() (BasicEventsResultData, bool) {
2166 return &etr, true
2167 }
2168
2169
2170 type EventsUserInfo struct {
2171
2172 ID *string `json:"id,omitempty"`
2173
2174 AccountID *string `json:"accountId,omitempty"`
2175
2176 AuthenticatedID *string `json:"authenticatedId,omitempty"`
2177 }
2178
2179
2180 type ListMetricsResultsItem struct {
2181 autorest.Response `json:"-"`
2182 Value *[]MetricsResultsItem `json:"value,omitempty"`
2183 }
2184
2185
2186
2187 type MetadataApplication struct {
2188
2189 ID *string `json:"id,omitempty"`
2190
2191 ResourceID *string `json:"resourceId,omitempty"`
2192
2193 Name *string `json:"name,omitempty"`
2194
2195 Region *string `json:"region,omitempty"`
2196
2197 Tables *[]string `json:"tables,omitempty"`
2198
2199 Functions *[]string `json:"functions,omitempty"`
2200
2201 TableGroups *[]string `json:"tableGroups,omitempty"`
2202 }
2203
2204
2205
2206 type MetadataFunction struct {
2207
2208 ID *string `json:"id,omitempty"`
2209
2210 Name *string `json:"name,omitempty"`
2211
2212 Parameters *string `json:"parameters,omitempty"`
2213
2214 DisplayName *string `json:"displayName,omitempty"`
2215
2216 Description *string `json:"description,omitempty"`
2217
2218 Body *string `json:"body,omitempty"`
2219 }
2220
2221
2222 type MetadataResults struct {
2223 autorest.Response `json:"-"`
2224
2225 TableGroups *[]MetadataTableGroup `json:"tableGroups,omitempty"`
2226
2227 Tables *[]MetadataTable `json:"tables,omitempty"`
2228
2229 Functions *[]MetadataFunction `json:"functions,omitempty"`
2230
2231 Applications *[]MetadataApplication `json:"applications,omitempty"`
2232 }
2233
2234
2235
2236 type MetadataTable struct {
2237
2238 ID *string `json:"id,omitempty"`
2239
2240 Name *string `json:"name,omitempty"`
2241
2242 Description *string `json:"description,omitempty"`
2243
2244 TimespanColumn *string `json:"timespanColumn,omitempty"`
2245
2246 Columns *[]MetadataTableColumnsItem `json:"columns,omitempty"`
2247 }
2248
2249
2250 type MetadataTableColumnsItem struct {
2251
2252 Name *string `json:"name,omitempty"`
2253
2254 Description *string `json:"description,omitempty"`
2255
2256 Type MetadataColumnDataType `json:"type,omitempty"`
2257
2258 IsPreferredFacet *bool `json:"isPreferredFacet,omitempty"`
2259
2260 Source interface{} `json:"source,omitempty"`
2261 }
2262
2263
2264
2265 type MetadataTableGroup struct {
2266
2267 ID *string `json:"id,omitempty"`
2268
2269 Name *string `json:"name,omitempty"`
2270
2271 Source *string `json:"source,omitempty"`
2272
2273 DisplayName *string `json:"displayName,omitempty"`
2274
2275 Description *string `json:"description,omitempty"`
2276
2277 Tables *[]string `json:"tables,omitempty"`
2278 }
2279
2280
2281 type MetricsPostBodySchema struct {
2282
2283 ID *string `json:"id,omitempty"`
2284
2285 Parameters *MetricsPostBodySchemaParameters `json:"parameters,omitempty"`
2286 }
2287
2288
2289 type MetricsPostBodySchemaParameters struct {
2290
2291 MetricID MetricID `json:"metricId,omitempty"`
2292 Timespan *string `json:"timespan,omitempty"`
2293 Aggregation *[]MetricsAggregation `json:"aggregation,omitempty"`
2294 Interval *string `json:"interval,omitempty"`
2295 Segment *[]MetricsSegment `json:"segment,omitempty"`
2296 Top *int32 `json:"top,omitempty"`
2297 Orderby *string `json:"orderby,omitempty"`
2298 Filter *string `json:"filter,omitempty"`
2299 }
2300
2301
2302 type MetricsResult struct {
2303 autorest.Response `json:"-"`
2304 Value *MetricsResultInfo `json:"value,omitempty"`
2305 }
2306
2307
2308 type MetricsResultInfo struct {
2309
2310 AdditionalProperties map[string]interface{} `json:""`
2311
2312 Start *date.Time `json:"start,omitempty"`
2313
2314 End *date.Time `json:"end,omitempty"`
2315
2316 Interval *string `json:"interval,omitempty"`
2317
2318 Segments *[]MetricsSegmentInfo `json:"segments,omitempty"`
2319 }
2320
2321
2322 func (mri MetricsResultInfo) MarshalJSON() ([]byte, error) {
2323 objectMap := make(map[string]interface{})
2324 if mri.Start != nil {
2325 objectMap["start"] = mri.Start
2326 }
2327 if mri.End != nil {
2328 objectMap["end"] = mri.End
2329 }
2330 if mri.Interval != nil {
2331 objectMap["interval"] = mri.Interval
2332 }
2333 if mri.Segments != nil {
2334 objectMap["segments"] = mri.Segments
2335 }
2336 for k, v := range mri.AdditionalProperties {
2337 objectMap[k] = v
2338 }
2339 return json.Marshal(objectMap)
2340 }
2341
2342
2343 func (mri *MetricsResultInfo) UnmarshalJSON(body []byte) error {
2344 var m map[string]*json.RawMessage
2345 err := json.Unmarshal(body, &m)
2346 if err != nil {
2347 return err
2348 }
2349 for k, v := range m {
2350 switch k {
2351 default:
2352 if v != nil {
2353 var additionalProperties interface{}
2354 err = json.Unmarshal(*v, &additionalProperties)
2355 if err != nil {
2356 return err
2357 }
2358 if mri.AdditionalProperties == nil {
2359 mri.AdditionalProperties = make(map[string]interface{})
2360 }
2361 mri.AdditionalProperties[k] = additionalProperties
2362 }
2363 case "start":
2364 if v != nil {
2365 var start date.Time
2366 err = json.Unmarshal(*v, &start)
2367 if err != nil {
2368 return err
2369 }
2370 mri.Start = &start
2371 }
2372 case "end":
2373 if v != nil {
2374 var end date.Time
2375 err = json.Unmarshal(*v, &end)
2376 if err != nil {
2377 return err
2378 }
2379 mri.End = &end
2380 }
2381 case "interval":
2382 if v != nil {
2383 var interval string
2384 err = json.Unmarshal(*v, &interval)
2385 if err != nil {
2386 return err
2387 }
2388 mri.Interval = &interval
2389 }
2390 case "segments":
2391 if v != nil {
2392 var segments []MetricsSegmentInfo
2393 err = json.Unmarshal(*v, &segments)
2394 if err != nil {
2395 return err
2396 }
2397 mri.Segments = &segments
2398 }
2399 }
2400 }
2401
2402 return nil
2403 }
2404
2405
2406 type MetricsResultsItem struct {
2407
2408 ID *string `json:"id,omitempty"`
2409
2410 Status *int32 `json:"status,omitempty"`
2411
2412 Body *MetricsResult `json:"body,omitempty"`
2413 }
2414
2415
2416 type MetricsSegmentInfo struct {
2417
2418 AdditionalProperties map[string]interface{} `json:""`
2419
2420 Start *date.Time `json:"start,omitempty"`
2421
2422 End *date.Time `json:"end,omitempty"`
2423
2424 Segments *[]MetricsSegmentInfo `json:"segments,omitempty"`
2425 }
2426
2427
2428 func (msi MetricsSegmentInfo) MarshalJSON() ([]byte, error) {
2429 objectMap := make(map[string]interface{})
2430 if msi.Start != nil {
2431 objectMap["start"] = msi.Start
2432 }
2433 if msi.End != nil {
2434 objectMap["end"] = msi.End
2435 }
2436 if msi.Segments != nil {
2437 objectMap["segments"] = msi.Segments
2438 }
2439 for k, v := range msi.AdditionalProperties {
2440 objectMap[k] = v
2441 }
2442 return json.Marshal(objectMap)
2443 }
2444
2445
2446 func (msi *MetricsSegmentInfo) UnmarshalJSON(body []byte) error {
2447 var m map[string]*json.RawMessage
2448 err := json.Unmarshal(body, &m)
2449 if err != nil {
2450 return err
2451 }
2452 for k, v := range m {
2453 switch k {
2454 default:
2455 if v != nil {
2456 var additionalProperties interface{}
2457 err = json.Unmarshal(*v, &additionalProperties)
2458 if err != nil {
2459 return err
2460 }
2461 if msi.AdditionalProperties == nil {
2462 msi.AdditionalProperties = make(map[string]interface{})
2463 }
2464 msi.AdditionalProperties[k] = additionalProperties
2465 }
2466 case "start":
2467 if v != nil {
2468 var start date.Time
2469 err = json.Unmarshal(*v, &start)
2470 if err != nil {
2471 return err
2472 }
2473 msi.Start = &start
2474 }
2475 case "end":
2476 if v != nil {
2477 var end date.Time
2478 err = json.Unmarshal(*v, &end)
2479 if err != nil {
2480 return err
2481 }
2482 msi.End = &end
2483 }
2484 case "segments":
2485 if v != nil {
2486 var segments []MetricsSegmentInfo
2487 err = json.Unmarshal(*v, &segments)
2488 if err != nil {
2489 return err
2490 }
2491 msi.Segments = &segments
2492 }
2493 }
2494 }
2495
2496 return nil
2497 }
2498
2499
2500
2501 type QueryBody struct {
2502
2503 Query *string `json:"query,omitempty"`
2504
2505 Timespan *string `json:"timespan,omitempty"`
2506
2507 Applications *[]string `json:"applications,omitempty"`
2508 }
2509
2510
2511 type QueryResults struct {
2512 autorest.Response `json:"-"`
2513
2514 Tables *[]Table `json:"tables,omitempty"`
2515 }
2516
2517
2518 type SetObject struct {
2519 autorest.Response `json:"-"`
2520 Value interface{} `json:"value,omitempty"`
2521 }
2522
2523
2524 type Table struct {
2525
2526 Name *string `json:"name,omitempty"`
2527
2528 Columns *[]Column `json:"columns,omitempty"`
2529
2530 Rows *[][]interface{} `json:"rows,omitempty"`
2531 }
2532
View as plain text