1 package insights
2
3
4
5
6
7
8
9 import (
10 "context"
11 "encoding/json"
12 "github.com/Azure/go-autorest/autorest"
13 "github.com/Azure/go-autorest/autorest/date"
14 "github.com/Azure/go-autorest/autorest/to"
15 "github.com/Azure/go-autorest/tracing"
16 "net/http"
17 )
18
19
20 const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2020-02-02-preview/insights"
21
22
23 type Annotation struct {
24
25 AnnotationName *string `json:"AnnotationName,omitempty"`
26
27 Category *string `json:"Category,omitempty"`
28
29 EventTime *date.Time `json:"EventTime,omitempty"`
30
31 ID *string `json:"Id,omitempty"`
32
33 Properties *string `json:"Properties,omitempty"`
34
35 RelatedAnnotation *string `json:"RelatedAnnotation,omitempty"`
36 }
37
38
39 type AnnotationError struct {
40
41 Code *string `json:"code,omitempty"`
42
43 Message *string `json:"message,omitempty"`
44 Innererror *InnerError `json:"innererror,omitempty"`
45 }
46
47
48 type AnnotationsListResult struct {
49 autorest.Response `json:"-"`
50
51 Value *[]Annotation `json:"value,omitempty"`
52 }
53
54
55 func (alr AnnotationsListResult) MarshalJSON() ([]byte, error) {
56 objectMap := make(map[string]interface{})
57 return json.Marshal(objectMap)
58 }
59
60
61 type APIKeyRequest struct {
62
63 Name *string `json:"name,omitempty"`
64
65 LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
66
67 LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
68 }
69
70
71 type ApplicationInsightsComponent struct {
72 autorest.Response `json:"-"`
73
74 Kind *string `json:"kind,omitempty"`
75
76 Etag *string `json:"etag,omitempty"`
77
78 *ApplicationInsightsComponentProperties `json:"properties,omitempty"`
79
80 ID *string `json:"id,omitempty"`
81
82 Name *string `json:"name,omitempty"`
83
84 Type *string `json:"type,omitempty"`
85
86 Location *string `json:"location,omitempty"`
87
88 Tags map[string]*string `json:"tags"`
89 }
90
91
92 func (aic ApplicationInsightsComponent) MarshalJSON() ([]byte, error) {
93 objectMap := make(map[string]interface{})
94 if aic.Kind != nil {
95 objectMap["kind"] = aic.Kind
96 }
97 if aic.Etag != nil {
98 objectMap["etag"] = aic.Etag
99 }
100 if aic.ApplicationInsightsComponentProperties != nil {
101 objectMap["properties"] = aic.ApplicationInsightsComponentProperties
102 }
103 if aic.Location != nil {
104 objectMap["location"] = aic.Location
105 }
106 if aic.Tags != nil {
107 objectMap["tags"] = aic.Tags
108 }
109 return json.Marshal(objectMap)
110 }
111
112
113 func (aic *ApplicationInsightsComponent) UnmarshalJSON(body []byte) error {
114 var m map[string]*json.RawMessage
115 err := json.Unmarshal(body, &m)
116 if err != nil {
117 return err
118 }
119 for k, v := range m {
120 switch k {
121 case "kind":
122 if v != nil {
123 var kind string
124 err = json.Unmarshal(*v, &kind)
125 if err != nil {
126 return err
127 }
128 aic.Kind = &kind
129 }
130 case "etag":
131 if v != nil {
132 var etag string
133 err = json.Unmarshal(*v, &etag)
134 if err != nil {
135 return err
136 }
137 aic.Etag = &etag
138 }
139 case "properties":
140 if v != nil {
141 var applicationInsightsComponentProperties ApplicationInsightsComponentProperties
142 err = json.Unmarshal(*v, &applicationInsightsComponentProperties)
143 if err != nil {
144 return err
145 }
146 aic.ApplicationInsightsComponentProperties = &applicationInsightsComponentProperties
147 }
148 case "id":
149 if v != nil {
150 var ID string
151 err = json.Unmarshal(*v, &ID)
152 if err != nil {
153 return err
154 }
155 aic.ID = &ID
156 }
157 case "name":
158 if v != nil {
159 var name string
160 err = json.Unmarshal(*v, &name)
161 if err != nil {
162 return err
163 }
164 aic.Name = &name
165 }
166 case "type":
167 if v != nil {
168 var typeVar string
169 err = json.Unmarshal(*v, &typeVar)
170 if err != nil {
171 return err
172 }
173 aic.Type = &typeVar
174 }
175 case "location":
176 if v != nil {
177 var location string
178 err = json.Unmarshal(*v, &location)
179 if err != nil {
180 return err
181 }
182 aic.Location = &location
183 }
184 case "tags":
185 if v != nil {
186 var tags map[string]*string
187 err = json.Unmarshal(*v, &tags)
188 if err != nil {
189 return err
190 }
191 aic.Tags = tags
192 }
193 }
194 }
195
196 return nil
197 }
198
199
200
201 type ApplicationInsightsComponentAnalyticsItem struct {
202 autorest.Response `json:"-"`
203
204 ID *string `json:"Id,omitempty"`
205
206 Name *string `json:"Name,omitempty"`
207
208 Content *string `json:"Content,omitempty"`
209
210 Version *string `json:"Version,omitempty"`
211
212 Scope ItemScope `json:"Scope,omitempty"`
213
214 Type ItemType `json:"Type,omitempty"`
215
216 TimeCreated *string `json:"TimeCreated,omitempty"`
217
218 TimeModified *string `json:"TimeModified,omitempty"`
219 Properties *ApplicationInsightsComponentAnalyticsItemProperties `json:"Properties,omitempty"`
220 }
221
222
223 func (aicai ApplicationInsightsComponentAnalyticsItem) MarshalJSON() ([]byte, error) {
224 objectMap := make(map[string]interface{})
225 if aicai.ID != nil {
226 objectMap["Id"] = aicai.ID
227 }
228 if aicai.Name != nil {
229 objectMap["Name"] = aicai.Name
230 }
231 if aicai.Content != nil {
232 objectMap["Content"] = aicai.Content
233 }
234 if aicai.Scope != "" {
235 objectMap["Scope"] = aicai.Scope
236 }
237 if aicai.Type != "" {
238 objectMap["Type"] = aicai.Type
239 }
240 if aicai.Properties != nil {
241 objectMap["Properties"] = aicai.Properties
242 }
243 return json.Marshal(objectMap)
244 }
245
246
247
248 type ApplicationInsightsComponentAnalyticsItemProperties struct {
249
250 FunctionAlias *string `json:"functionAlias,omitempty"`
251 }
252
253
254
255 type ApplicationInsightsComponentAPIKey struct {
256 autorest.Response `json:"-"`
257
258 ID *string `json:"id,omitempty"`
259
260 APIKey *string `json:"apiKey,omitempty"`
261
262 CreatedDate *string `json:"createdDate,omitempty"`
263
264 Name *string `json:"name,omitempty"`
265
266 LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
267
268 LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
269 }
270
271
272 func (aicak ApplicationInsightsComponentAPIKey) MarshalJSON() ([]byte, error) {
273 objectMap := make(map[string]interface{})
274 if aicak.CreatedDate != nil {
275 objectMap["createdDate"] = aicak.CreatedDate
276 }
277 if aicak.Name != nil {
278 objectMap["name"] = aicak.Name
279 }
280 if aicak.LinkedReadProperties != nil {
281 objectMap["linkedReadProperties"] = aicak.LinkedReadProperties
282 }
283 if aicak.LinkedWriteProperties != nil {
284 objectMap["linkedWriteProperties"] = aicak.LinkedWriteProperties
285 }
286 return json.Marshal(objectMap)
287 }
288
289
290
291 type ApplicationInsightsComponentAPIKeyListResult struct {
292 autorest.Response `json:"-"`
293
294 Value *[]ApplicationInsightsComponentAPIKey `json:"value,omitempty"`
295 }
296
297
298 type ApplicationInsightsComponentAvailableFeatures struct {
299 autorest.Response `json:"-"`
300
301 Result *[]ApplicationInsightsComponentFeature `json:"Result,omitempty"`
302 }
303
304
305 func (aicaf ApplicationInsightsComponentAvailableFeatures) MarshalJSON() ([]byte, error) {
306 objectMap := make(map[string]interface{})
307 return json.Marshal(objectMap)
308 }
309
310
311 type ApplicationInsightsComponentBillingFeatures struct {
312 autorest.Response `json:"-"`
313
314 DataVolumeCap *ApplicationInsightsComponentDataVolumeCap `json:"DataVolumeCap,omitempty"`
315
316 CurrentBillingFeatures *[]string `json:"CurrentBillingFeatures,omitempty"`
317 }
318
319
320 type ApplicationInsightsComponentDataVolumeCap struct {
321
322 Cap *float64 `json:"Cap,omitempty"`
323
324 ResetTime *int32 `json:"ResetTime,omitempty"`
325
326 WarningThreshold *int32 `json:"WarningThreshold,omitempty"`
327
328 StopSendNotificationWhenHitThreshold *bool `json:"StopSendNotificationWhenHitThreshold,omitempty"`
329
330 StopSendNotificationWhenHitCap *bool `json:"StopSendNotificationWhenHitCap,omitempty"`
331
332 MaxHistoryCap *float64 `json:"MaxHistoryCap,omitempty"`
333 }
334
335
336 func (aicdvc ApplicationInsightsComponentDataVolumeCap) MarshalJSON() ([]byte, error) {
337 objectMap := make(map[string]interface{})
338 if aicdvc.Cap != nil {
339 objectMap["Cap"] = aicdvc.Cap
340 }
341 if aicdvc.WarningThreshold != nil {
342 objectMap["WarningThreshold"] = aicdvc.WarningThreshold
343 }
344 if aicdvc.StopSendNotificationWhenHitThreshold != nil {
345 objectMap["StopSendNotificationWhenHitThreshold"] = aicdvc.StopSendNotificationWhenHitThreshold
346 }
347 if aicdvc.StopSendNotificationWhenHitCap != nil {
348 objectMap["StopSendNotificationWhenHitCap"] = aicdvc.StopSendNotificationWhenHitCap
349 }
350 return json.Marshal(objectMap)
351 }
352
353
354
355 type ApplicationInsightsComponentExportConfiguration struct {
356 autorest.Response `json:"-"`
357
358 ExportID *string `json:"ExportId,omitempty"`
359
360 InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
361
362 RecordTypes *string `json:"RecordTypes,omitempty"`
363
364 ApplicationName *string `json:"ApplicationName,omitempty"`
365
366 SubscriptionID *string `json:"SubscriptionId,omitempty"`
367
368 ResourceGroup *string `json:"ResourceGroup,omitempty"`
369
370 DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
371
372 DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
373
374 DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
375
376 DestinationType *string `json:"DestinationType,omitempty"`
377
378 IsUserEnabled *string `json:"IsUserEnabled,omitempty"`
379
380 LastUserUpdate *string `json:"LastUserUpdate,omitempty"`
381
382 NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
383
384 ExportStatus *string `json:"ExportStatus,omitempty"`
385
386 LastSuccessTime *string `json:"LastSuccessTime,omitempty"`
387
388 LastGapTime *string `json:"LastGapTime,omitempty"`
389
390 PermanentErrorReason *string `json:"PermanentErrorReason,omitempty"`
391
392 StorageName *string `json:"StorageName,omitempty"`
393
394 ContainerName *string `json:"ContainerName,omitempty"`
395 }
396
397
398 func (aicec ApplicationInsightsComponentExportConfiguration) MarshalJSON() ([]byte, error) {
399 objectMap := make(map[string]interface{})
400 if aicec.RecordTypes != nil {
401 objectMap["RecordTypes"] = aicec.RecordTypes
402 }
403 if aicec.NotificationQueueEnabled != nil {
404 objectMap["NotificationQueueEnabled"] = aicec.NotificationQueueEnabled
405 }
406 return json.Marshal(objectMap)
407 }
408
409
410
411 type ApplicationInsightsComponentExportRequest struct {
412
413 RecordTypes *string `json:"RecordTypes,omitempty"`
414
415 DestinationType *string `json:"DestinationType,omitempty"`
416
417 DestinationAddress *string `json:"DestinationAddress,omitempty"`
418
419 IsEnabled *string `json:"IsEnabled,omitempty"`
420
421 NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
422
423 NotificationQueueURI *string `json:"NotificationQueueUri,omitempty"`
424
425 DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
426
427 DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
428
429 DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
430 }
431
432
433
434 type ApplicationInsightsComponentFavorite struct {
435 autorest.Response `json:"-"`
436
437 Name *string `json:"Name,omitempty"`
438
439 Config *string `json:"Config,omitempty"`
440
441 Version *string `json:"Version,omitempty"`
442
443 FavoriteID *string `json:"FavoriteId,omitempty"`
444
445 FavoriteType FavoriteType `json:"FavoriteType,omitempty"`
446
447 SourceType *string `json:"SourceType,omitempty"`
448
449 TimeModified *string `json:"TimeModified,omitempty"`
450
451 Tags *[]string `json:"Tags,omitempty"`
452
453 Category *string `json:"Category,omitempty"`
454
455 IsGeneratedFromTemplate *bool `json:"IsGeneratedFromTemplate,omitempty"`
456
457 UserID *string `json:"UserId,omitempty"`
458 }
459
460
461 func (aicf ApplicationInsightsComponentFavorite) MarshalJSON() ([]byte, error) {
462 objectMap := make(map[string]interface{})
463 if aicf.Name != nil {
464 objectMap["Name"] = aicf.Name
465 }
466 if aicf.Config != nil {
467 objectMap["Config"] = aicf.Config
468 }
469 if aicf.Version != nil {
470 objectMap["Version"] = aicf.Version
471 }
472 if aicf.FavoriteType != "" {
473 objectMap["FavoriteType"] = aicf.FavoriteType
474 }
475 if aicf.SourceType != nil {
476 objectMap["SourceType"] = aicf.SourceType
477 }
478 if aicf.Tags != nil {
479 objectMap["Tags"] = aicf.Tags
480 }
481 if aicf.Category != nil {
482 objectMap["Category"] = aicf.Category
483 }
484 if aicf.IsGeneratedFromTemplate != nil {
485 objectMap["IsGeneratedFromTemplate"] = aicf.IsGeneratedFromTemplate
486 }
487 return json.Marshal(objectMap)
488 }
489
490
491 type ApplicationInsightsComponentFeature struct {
492
493 FeatureName *string `json:"FeatureName,omitempty"`
494
495 MeterID *string `json:"MeterId,omitempty"`
496
497 MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
498
499 ResouceID *string `json:"ResouceId,omitempty"`
500
501 IsHidden *bool `json:"IsHidden,omitempty"`
502
503 Capabilities *[]ApplicationInsightsComponentFeatureCapability `json:"Capabilities,omitempty"`
504
505 Title *string `json:"Title,omitempty"`
506
507 IsMainFeature *bool `json:"IsMainFeature,omitempty"`
508
509 SupportedAddonFeatures *string `json:"SupportedAddonFeatures,omitempty"`
510 }
511
512
513 func (aicf ApplicationInsightsComponentFeature) MarshalJSON() ([]byte, error) {
514 objectMap := make(map[string]interface{})
515 return json.Marshal(objectMap)
516 }
517
518
519 type ApplicationInsightsComponentFeatureCapabilities struct {
520 autorest.Response `json:"-"`
521
522 SupportExportData *bool `json:"SupportExportData,omitempty"`
523
524 BurstThrottlePolicy *string `json:"BurstThrottlePolicy,omitempty"`
525
526 MetadataClass *string `json:"MetadataClass,omitempty"`
527
528 LiveStreamMetrics *bool `json:"LiveStreamMetrics,omitempty"`
529
530 ApplicationMap *bool `json:"ApplicationMap,omitempty"`
531
532 WorkItemIntegration *bool `json:"WorkItemIntegration,omitempty"`
533
534 PowerBIIntegration *bool `json:"PowerBIIntegration,omitempty"`
535
536 OpenSchema *bool `json:"OpenSchema,omitempty"`
537
538 ProactiveDetection *bool `json:"ProactiveDetection,omitempty"`
539
540 AnalyticsIntegration *bool `json:"AnalyticsIntegration,omitempty"`
541
542 MultipleStepWebTest *bool `json:"MultipleStepWebTest,omitempty"`
543
544 APIAccessLevel *string `json:"ApiAccessLevel,omitempty"`
545
546 TrackingType *string `json:"TrackingType,omitempty"`
547
548 DailyCap *float64 `json:"DailyCap,omitempty"`
549
550 DailyCapResetTime *float64 `json:"DailyCapResetTime,omitempty"`
551
552 ThrottleRate *float64 `json:"ThrottleRate,omitempty"`
553 }
554
555
556 func (aicfc ApplicationInsightsComponentFeatureCapabilities) MarshalJSON() ([]byte, error) {
557 objectMap := make(map[string]interface{})
558 return json.Marshal(objectMap)
559 }
560
561
562 type ApplicationInsightsComponentFeatureCapability struct {
563
564 Name *string `json:"Name,omitempty"`
565
566 Description *string `json:"Description,omitempty"`
567
568 Value *string `json:"Value,omitempty"`
569
570 Unit *string `json:"Unit,omitempty"`
571
572 MeterID *string `json:"MeterId,omitempty"`
573
574 MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
575 }
576
577
578 func (aicfc ApplicationInsightsComponentFeatureCapability) MarshalJSON() ([]byte, error) {
579 objectMap := make(map[string]interface{})
580 return json.Marshal(objectMap)
581 }
582
583
584 type ApplicationInsightsComponentListResult struct {
585 autorest.Response `json:"-"`
586
587 Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
588
589 NextLink *string `json:"nextLink,omitempty"`
590 }
591
592
593
594 type ApplicationInsightsComponentListResultIterator struct {
595 i int
596 page ApplicationInsightsComponentListResultPage
597 }
598
599
600
601 func (iter *ApplicationInsightsComponentListResultIterator) NextWithContext(ctx context.Context) (err error) {
602 if tracing.IsEnabled() {
603 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultIterator.NextWithContext")
604 defer func() {
605 sc := -1
606 if iter.Response().Response.Response != nil {
607 sc = iter.Response().Response.Response.StatusCode
608 }
609 tracing.EndSpan(ctx, sc, err)
610 }()
611 }
612 iter.i++
613 if iter.i < len(iter.page.Values()) {
614 return nil
615 }
616 err = iter.page.NextWithContext(ctx)
617 if err != nil {
618 iter.i--
619 return err
620 }
621 iter.i = 0
622 return nil
623 }
624
625
626
627
628 func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
629 return iter.NextWithContext(context.Background())
630 }
631
632
633 func (iter ApplicationInsightsComponentListResultIterator) NotDone() bool {
634 return iter.page.NotDone() && iter.i < len(iter.page.Values())
635 }
636
637
638 func (iter ApplicationInsightsComponentListResultIterator) Response() ApplicationInsightsComponentListResult {
639 return iter.page.Response()
640 }
641
642
643
644 func (iter ApplicationInsightsComponentListResultIterator) Value() ApplicationInsightsComponent {
645 if !iter.page.NotDone() {
646 return ApplicationInsightsComponent{}
647 }
648 return iter.page.Values()[iter.i]
649 }
650
651
652 func NewApplicationInsightsComponentListResultIterator(page ApplicationInsightsComponentListResultPage) ApplicationInsightsComponentListResultIterator {
653 return ApplicationInsightsComponentListResultIterator{page: page}
654 }
655
656
657 func (aiclr ApplicationInsightsComponentListResult) IsEmpty() bool {
658 return aiclr.Value == nil || len(*aiclr.Value) == 0
659 }
660
661
662 func (aiclr ApplicationInsightsComponentListResult) hasNextLink() bool {
663 return aiclr.NextLink != nil && len(*aiclr.NextLink) != 0
664 }
665
666
667
668 func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponentListResultPreparer(ctx context.Context) (*http.Request, error) {
669 if !aiclr.hasNextLink() {
670 return nil, nil
671 }
672 return autorest.Prepare((&http.Request{}).WithContext(ctx),
673 autorest.AsJSON(),
674 autorest.AsGet(),
675 autorest.WithBaseURL(to.String(aiclr.NextLink)))
676 }
677
678
679 type ApplicationInsightsComponentListResultPage struct {
680 fn func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)
681 aiclr ApplicationInsightsComponentListResult
682 }
683
684
685
686 func (page *ApplicationInsightsComponentListResultPage) NextWithContext(ctx context.Context) (err error) {
687 if tracing.IsEnabled() {
688 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultPage.NextWithContext")
689 defer func() {
690 sc := -1
691 if page.Response().Response.Response != nil {
692 sc = page.Response().Response.Response.StatusCode
693 }
694 tracing.EndSpan(ctx, sc, err)
695 }()
696 }
697 for {
698 next, err := page.fn(ctx, page.aiclr)
699 if err != nil {
700 return err
701 }
702 page.aiclr = next
703 if !next.hasNextLink() || !next.IsEmpty() {
704 break
705 }
706 }
707 return nil
708 }
709
710
711
712
713 func (page *ApplicationInsightsComponentListResultPage) Next() error {
714 return page.NextWithContext(context.Background())
715 }
716
717
718 func (page ApplicationInsightsComponentListResultPage) NotDone() bool {
719 return !page.aiclr.IsEmpty()
720 }
721
722
723 func (page ApplicationInsightsComponentListResultPage) Response() ApplicationInsightsComponentListResult {
724 return page.aiclr
725 }
726
727
728 func (page ApplicationInsightsComponentListResultPage) Values() []ApplicationInsightsComponent {
729 if page.aiclr.IsEmpty() {
730 return nil
731 }
732 return *page.aiclr.Value
733 }
734
735
736 func NewApplicationInsightsComponentListResultPage(cur ApplicationInsightsComponentListResult, getNextPage func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)) ApplicationInsightsComponentListResultPage {
737 return ApplicationInsightsComponentListResultPage{
738 fn: getNextPage,
739 aiclr: cur,
740 }
741 }
742
743
744
745 type ApplicationInsightsComponentProactiveDetectionConfiguration struct {
746 autorest.Response `json:"-"`
747
748 Name *string `json:"Name,omitempty"`
749
750 Enabled *bool `json:"Enabled,omitempty"`
751
752 SendEmailsToSubscriptionOwners *bool `json:"SendEmailsToSubscriptionOwners,omitempty"`
753
754 CustomEmails *[]string `json:"CustomEmails,omitempty"`
755
756 LastUpdatedTime *string `json:"LastUpdatedTime,omitempty"`
757
758 RuleDefinitions *ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions `json:"RuleDefinitions,omitempty"`
759 }
760
761
762
763 type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions struct {
764
765 Name *string `json:"Name,omitempty"`
766
767 DisplayName *string `json:"DisplayName,omitempty"`
768
769 Description *string `json:"Description,omitempty"`
770
771 HelpURL *string `json:"HelpUrl,omitempty"`
772
773 IsHidden *bool `json:"IsHidden,omitempty"`
774
775 IsEnabledByDefault *bool `json:"IsEnabledByDefault,omitempty"`
776
777 IsInPreview *bool `json:"IsInPreview,omitempty"`
778
779 SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
780 }
781
782
783
784 type ApplicationInsightsComponentProperties struct {
785
786 ApplicationID *string `json:"ApplicationId,omitempty"`
787
788 AppID *string `json:"AppId,omitempty"`
789
790 Name *string `json:"Name,omitempty"`
791
792 ApplicationType ApplicationType `json:"Application_Type,omitempty"`
793
794 FlowType FlowType `json:"Flow_Type,omitempty"`
795
796 RequestSource RequestSource `json:"Request_Source,omitempty"`
797
798 InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
799
800 CreationDate *date.Time `json:"CreationDate,omitempty"`
801
802 TenantID *string `json:"TenantId,omitempty"`
803
804 HockeyAppID *string `json:"HockeyAppId,omitempty"`
805
806 HockeyAppToken *string `json:"HockeyAppToken,omitempty"`
807
808 ProvisioningState *string `json:"provisioningState,omitempty"`
809
810 SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`
811
812 ConnectionString *string `json:"ConnectionString,omitempty"`
813
814 RetentionInDays *int32 `json:"RetentionInDays,omitempty"`
815
816 DisableIPMasking *bool `json:"DisableIpMasking,omitempty"`
817
818 ImmediatePurgeDataOn30Days *bool `json:"ImmediatePurgeDataOn30Days,omitempty"`
819
820 WorkspaceResourceID *string `json:"WorkspaceResourceId,omitempty"`
821
822 LaMigrationDate *date.Time `json:"LaMigrationDate,omitempty"`
823
824 PrivateLinkScopedResources *[]PrivateLinkScopedResource `json:"PrivateLinkScopedResources,omitempty"`
825
826 PublicNetworkAccessForIngestion PublicNetworkAccessType `json:"publicNetworkAccessForIngestion,omitempty"`
827
828 PublicNetworkAccessForQuery PublicNetworkAccessType `json:"publicNetworkAccessForQuery,omitempty"`
829
830 IngestionMode IngestionMode `json:"IngestionMode,omitempty"`
831
832 DisableLocalAuth *bool `json:"DisableLocalAuth,omitempty"`
833
834 ForceCustomerStorageForProfiler *bool `json:"ForceCustomerStorageForProfiler,omitempty"`
835 }
836
837
838 func (aicp ApplicationInsightsComponentProperties) MarshalJSON() ([]byte, error) {
839 objectMap := make(map[string]interface{})
840 if aicp.ApplicationType != "" {
841 objectMap["Application_Type"] = aicp.ApplicationType
842 }
843 if aicp.FlowType != "" {
844 objectMap["Flow_Type"] = aicp.FlowType
845 }
846 if aicp.RequestSource != "" {
847 objectMap["Request_Source"] = aicp.RequestSource
848 }
849 if aicp.HockeyAppID != nil {
850 objectMap["HockeyAppId"] = aicp.HockeyAppID
851 }
852 if aicp.SamplingPercentage != nil {
853 objectMap["SamplingPercentage"] = aicp.SamplingPercentage
854 }
855 if aicp.DisableIPMasking != nil {
856 objectMap["DisableIpMasking"] = aicp.DisableIPMasking
857 }
858 if aicp.ImmediatePurgeDataOn30Days != nil {
859 objectMap["ImmediatePurgeDataOn30Days"] = aicp.ImmediatePurgeDataOn30Days
860 }
861 if aicp.WorkspaceResourceID != nil {
862 objectMap["WorkspaceResourceId"] = aicp.WorkspaceResourceID
863 }
864 if aicp.PublicNetworkAccessForIngestion != "" {
865 objectMap["publicNetworkAccessForIngestion"] = aicp.PublicNetworkAccessForIngestion
866 }
867 if aicp.PublicNetworkAccessForQuery != "" {
868 objectMap["publicNetworkAccessForQuery"] = aicp.PublicNetworkAccessForQuery
869 }
870 if aicp.IngestionMode != "" {
871 objectMap["IngestionMode"] = aicp.IngestionMode
872 }
873 if aicp.DisableLocalAuth != nil {
874 objectMap["DisableLocalAuth"] = aicp.DisableLocalAuth
875 }
876 if aicp.ForceCustomerStorageForProfiler != nil {
877 objectMap["ForceCustomerStorageForProfiler"] = aicp.ForceCustomerStorageForProfiler
878 }
879 return json.Marshal(objectMap)
880 }
881
882
883 type ApplicationInsightsComponentQuotaStatus struct {
884 autorest.Response `json:"-"`
885
886 AppID *string `json:"AppId,omitempty"`
887
888 ShouldBeThrottled *bool `json:"ShouldBeThrottled,omitempty"`
889
890 ExpirationTime *string `json:"ExpirationTime,omitempty"`
891 }
892
893
894 func (aicqs ApplicationInsightsComponentQuotaStatus) MarshalJSON() ([]byte, error) {
895 objectMap := make(map[string]interface{})
896 return json.Marshal(objectMap)
897 }
898
899
900
901 type ApplicationInsightsComponentWebTestLocation struct {
902
903 DisplayName *string `json:"DisplayName,omitempty"`
904
905 Tag *string `json:"Tag,omitempty"`
906 }
907
908
909 func (aicwtl ApplicationInsightsComponentWebTestLocation) MarshalJSON() ([]byte, error) {
910 objectMap := make(map[string]interface{})
911 return json.Marshal(objectMap)
912 }
913
914
915
916 type ApplicationInsightsWebTestLocationsListResult struct {
917 autorest.Response `json:"-"`
918
919 Value *[]ApplicationInsightsComponentWebTestLocation `json:"value,omitempty"`
920 }
921
922
923 type AzureEntityResource struct {
924
925 Etag *string `json:"etag,omitempty"`
926
927 ID *string `json:"id,omitempty"`
928
929 Name *string `json:"name,omitempty"`
930
931 Type *string `json:"type,omitempty"`
932 }
933
934
935 func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
936 objectMap := make(map[string]interface{})
937 return json.Marshal(objectMap)
938 }
939
940
941 type ComponentLinkedStorageAccounts struct {
942 autorest.Response `json:"-"`
943
944 *LinkedStorageAccountsProperties `json:"properties,omitempty"`
945
946 ID *string `json:"id,omitempty"`
947
948 Name *string `json:"name,omitempty"`
949
950 Type *string `json:"type,omitempty"`
951 }
952
953
954 func (clsa ComponentLinkedStorageAccounts) MarshalJSON() ([]byte, error) {
955 objectMap := make(map[string]interface{})
956 if clsa.LinkedStorageAccountsProperties != nil {
957 objectMap["properties"] = clsa.LinkedStorageAccountsProperties
958 }
959 return json.Marshal(objectMap)
960 }
961
962
963 func (clsa *ComponentLinkedStorageAccounts) UnmarshalJSON(body []byte) error {
964 var m map[string]*json.RawMessage
965 err := json.Unmarshal(body, &m)
966 if err != nil {
967 return err
968 }
969 for k, v := range m {
970 switch k {
971 case "properties":
972 if v != nil {
973 var linkedStorageAccountsProperties LinkedStorageAccountsProperties
974 err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
975 if err != nil {
976 return err
977 }
978 clsa.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
979 }
980 case "id":
981 if v != nil {
982 var ID string
983 err = json.Unmarshal(*v, &ID)
984 if err != nil {
985 return err
986 }
987 clsa.ID = &ID
988 }
989 case "name":
990 if v != nil {
991 var name string
992 err = json.Unmarshal(*v, &name)
993 if err != nil {
994 return err
995 }
996 clsa.Name = &name
997 }
998 case "type":
999 if v != nil {
1000 var typeVar string
1001 err = json.Unmarshal(*v, &typeVar)
1002 if err != nil {
1003 return err
1004 }
1005 clsa.Type = &typeVar
1006 }
1007 }
1008 }
1009
1010 return nil
1011 }
1012
1013
1014 type ComponentLinkedStorageAccountsPatch struct {
1015
1016 *LinkedStorageAccountsProperties `json:"properties,omitempty"`
1017 }
1018
1019
1020 func (clsap ComponentLinkedStorageAccountsPatch) MarshalJSON() ([]byte, error) {
1021 objectMap := make(map[string]interface{})
1022 if clsap.LinkedStorageAccountsProperties != nil {
1023 objectMap["properties"] = clsap.LinkedStorageAccountsProperties
1024 }
1025 return json.Marshal(objectMap)
1026 }
1027
1028
1029 func (clsap *ComponentLinkedStorageAccountsPatch) UnmarshalJSON(body []byte) error {
1030 var m map[string]*json.RawMessage
1031 err := json.Unmarshal(body, &m)
1032 if err != nil {
1033 return err
1034 }
1035 for k, v := range m {
1036 switch k {
1037 case "properties":
1038 if v != nil {
1039 var linkedStorageAccountsProperties LinkedStorageAccountsProperties
1040 err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
1041 if err != nil {
1042 return err
1043 }
1044 clsap.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
1045 }
1046 }
1047 }
1048
1049 return nil
1050 }
1051
1052
1053 type ComponentPurgeBody struct {
1054
1055 Table *string `json:"table,omitempty"`
1056
1057 Filters *[]ComponentPurgeBodyFilters `json:"filters,omitempty"`
1058 }
1059
1060
1061 type ComponentPurgeBodyFilters struct {
1062
1063 Column *string `json:"column,omitempty"`
1064
1065 Operator *string `json:"operator,omitempty"`
1066
1067 Value interface{} `json:"value,omitempty"`
1068
1069 Key *string `json:"key,omitempty"`
1070 }
1071
1072
1073 type ComponentPurgeResponse struct {
1074 autorest.Response `json:"-"`
1075
1076 OperationID *string `json:"operationId,omitempty"`
1077 }
1078
1079
1080 type ComponentPurgeStatusResponse struct {
1081 autorest.Response `json:"-"`
1082
1083 Status PurgeState `json:"status,omitempty"`
1084 }
1085
1086
1087 type ComponentsResource struct {
1088
1089 ID *string `json:"id,omitempty"`
1090
1091 Name *string `json:"name,omitempty"`
1092
1093 Type *string `json:"type,omitempty"`
1094
1095 Location *string `json:"location,omitempty"`
1096
1097 Tags map[string]*string `json:"tags"`
1098 }
1099
1100
1101 func (cr ComponentsResource) MarshalJSON() ([]byte, error) {
1102 objectMap := make(map[string]interface{})
1103 if cr.Location != nil {
1104 objectMap["location"] = cr.Location
1105 }
1106 if cr.Tags != nil {
1107 objectMap["tags"] = cr.Tags
1108 }
1109 return json.Marshal(objectMap)
1110 }
1111
1112
1113 type ErrorFieldContract struct {
1114
1115 Code *string `json:"code,omitempty"`
1116
1117 Message *string `json:"message,omitempty"`
1118
1119 Target *string `json:"target,omitempty"`
1120 }
1121
1122
1123
1124 type ErrorResponse struct {
1125
1126 Code *string `json:"code,omitempty"`
1127
1128 Message *string `json:"message,omitempty"`
1129 }
1130
1131
1132 type ErrorResponseComponents struct {
1133
1134 Error *ErrorResponseComponentsError `json:"error,omitempty"`
1135 }
1136
1137
1138
1139 type ErrorResponseComponentsError struct {
1140
1141 Code *string `json:"code,omitempty"`
1142
1143 Message *string `json:"message,omitempty"`
1144 }
1145
1146
1147 func (erc ErrorResponseComponentsError) MarshalJSON() ([]byte, error) {
1148 objectMap := make(map[string]interface{})
1149 return json.Marshal(objectMap)
1150 }
1151
1152
1153 type ErrorResponseLinkedStorage struct {
1154
1155 Error *ErrorResponseLinkedStorageError `json:"error,omitempty"`
1156 }
1157
1158
1159
1160 type ErrorResponseLinkedStorageError struct {
1161
1162 Code *string `json:"code,omitempty"`
1163
1164 Message *string `json:"message,omitempty"`
1165 }
1166
1167
1168 func (erls ErrorResponseLinkedStorageError) MarshalJSON() ([]byte, error) {
1169 objectMap := make(map[string]interface{})
1170 return json.Marshal(objectMap)
1171 }
1172
1173
1174 type InnerError struct {
1175
1176 Diagnosticcontext *string `json:"diagnosticcontext,omitempty"`
1177
1178 Time *date.Time `json:"time,omitempty"`
1179 }
1180
1181
1182 type LinkedStorageAccountsProperties struct {
1183
1184 LinkedStorageAccount *string `json:"linkedStorageAccount,omitempty"`
1185 }
1186
1187
1188 type LinkProperties struct {
1189
1190 SourceID *string `json:"sourceId,omitempty"`
1191
1192 TargetID *string `json:"targetId,omitempty"`
1193
1194 Category *string `json:"category,omitempty"`
1195 }
1196
1197
1198 type ListAnnotation struct {
1199 autorest.Response `json:"-"`
1200 Value *[]Annotation `json:"value,omitempty"`
1201 }
1202
1203
1204 type ListApplicationInsightsComponentAnalyticsItem struct {
1205 autorest.Response `json:"-"`
1206 Value *[]ApplicationInsightsComponentAnalyticsItem `json:"value,omitempty"`
1207 }
1208
1209
1210 type ListApplicationInsightsComponentExportConfiguration struct {
1211 autorest.Response `json:"-"`
1212 Value *[]ApplicationInsightsComponentExportConfiguration `json:"value,omitempty"`
1213 }
1214
1215
1216 type ListApplicationInsightsComponentFavorite struct {
1217 autorest.Response `json:"-"`
1218 Value *[]ApplicationInsightsComponentFavorite `json:"value,omitempty"`
1219 }
1220
1221
1222 type ListApplicationInsightsComponentProactiveDetectionConfiguration struct {
1223 autorest.Response `json:"-"`
1224 Value *[]ApplicationInsightsComponentProactiveDetectionConfiguration `json:"value,omitempty"`
1225 }
1226
1227
1228 type MyWorkbook struct {
1229 autorest.Response `json:"-"`
1230
1231 Kind SharedTypeKind `json:"kind,omitempty"`
1232
1233 *MyWorkbookProperties `json:"properties,omitempty"`
1234
1235 ID *string `json:"id,omitempty"`
1236
1237 Name *string `json:"name,omitempty"`
1238
1239 Type *string `json:"type,omitempty"`
1240
1241 Location *string `json:"location,omitempty"`
1242
1243 Tags map[string]*string `json:"tags"`
1244 }
1245
1246
1247 func (mw MyWorkbook) MarshalJSON() ([]byte, error) {
1248 objectMap := make(map[string]interface{})
1249 if mw.Kind != "" {
1250 objectMap["kind"] = mw.Kind
1251 }
1252 if mw.MyWorkbookProperties != nil {
1253 objectMap["properties"] = mw.MyWorkbookProperties
1254 }
1255 if mw.ID != nil {
1256 objectMap["id"] = mw.ID
1257 }
1258 if mw.Name != nil {
1259 objectMap["name"] = mw.Name
1260 }
1261 if mw.Type != nil {
1262 objectMap["type"] = mw.Type
1263 }
1264 if mw.Location != nil {
1265 objectMap["location"] = mw.Location
1266 }
1267 if mw.Tags != nil {
1268 objectMap["tags"] = mw.Tags
1269 }
1270 return json.Marshal(objectMap)
1271 }
1272
1273
1274 func (mw *MyWorkbook) UnmarshalJSON(body []byte) error {
1275 var m map[string]*json.RawMessage
1276 err := json.Unmarshal(body, &m)
1277 if err != nil {
1278 return err
1279 }
1280 for k, v := range m {
1281 switch k {
1282 case "kind":
1283 if v != nil {
1284 var kind SharedTypeKind
1285 err = json.Unmarshal(*v, &kind)
1286 if err != nil {
1287 return err
1288 }
1289 mw.Kind = kind
1290 }
1291 case "properties":
1292 if v != nil {
1293 var myWorkbookProperties MyWorkbookProperties
1294 err = json.Unmarshal(*v, &myWorkbookProperties)
1295 if err != nil {
1296 return err
1297 }
1298 mw.MyWorkbookProperties = &myWorkbookProperties
1299 }
1300 case "id":
1301 if v != nil {
1302 var ID string
1303 err = json.Unmarshal(*v, &ID)
1304 if err != nil {
1305 return err
1306 }
1307 mw.ID = &ID
1308 }
1309 case "name":
1310 if v != nil {
1311 var name string
1312 err = json.Unmarshal(*v, &name)
1313 if err != nil {
1314 return err
1315 }
1316 mw.Name = &name
1317 }
1318 case "type":
1319 if v != nil {
1320 var typeVar string
1321 err = json.Unmarshal(*v, &typeVar)
1322 if err != nil {
1323 return err
1324 }
1325 mw.Type = &typeVar
1326 }
1327 case "location":
1328 if v != nil {
1329 var location string
1330 err = json.Unmarshal(*v, &location)
1331 if err != nil {
1332 return err
1333 }
1334 mw.Location = &location
1335 }
1336 case "tags":
1337 if v != nil {
1338 var tags map[string]*string
1339 err = json.Unmarshal(*v, &tags)
1340 if err != nil {
1341 return err
1342 }
1343 mw.Tags = tags
1344 }
1345 }
1346 }
1347
1348 return nil
1349 }
1350
1351
1352 type MyWorkbookError struct {
1353
1354 Code *string `json:"code,omitempty"`
1355
1356 Message *string `json:"message,omitempty"`
1357
1358 Details *[]ErrorFieldContract `json:"details,omitempty"`
1359 }
1360
1361
1362 type MyWorkbookProperties struct {
1363
1364 DisplayName *string `json:"displayName,omitempty"`
1365
1366 SerializedData *string `json:"serializedData,omitempty"`
1367
1368 Version *string `json:"version,omitempty"`
1369
1370 TimeModified *string `json:"timeModified,omitempty"`
1371
1372 Category *string `json:"category,omitempty"`
1373
1374 Tags *[]string `json:"tags,omitempty"`
1375
1376 UserID *string `json:"userId,omitempty"`
1377
1378 SourceID *string `json:"sourceId,omitempty"`
1379 }
1380
1381
1382 func (mwp MyWorkbookProperties) MarshalJSON() ([]byte, error) {
1383 objectMap := make(map[string]interface{})
1384 if mwp.DisplayName != nil {
1385 objectMap["displayName"] = mwp.DisplayName
1386 }
1387 if mwp.SerializedData != nil {
1388 objectMap["serializedData"] = mwp.SerializedData
1389 }
1390 if mwp.Version != nil {
1391 objectMap["version"] = mwp.Version
1392 }
1393 if mwp.Category != nil {
1394 objectMap["category"] = mwp.Category
1395 }
1396 if mwp.Tags != nil {
1397 objectMap["tags"] = mwp.Tags
1398 }
1399 if mwp.SourceID != nil {
1400 objectMap["sourceId"] = mwp.SourceID
1401 }
1402 return json.Marshal(objectMap)
1403 }
1404
1405
1406 type MyWorkbookResource struct {
1407
1408 ID *string `json:"id,omitempty"`
1409
1410 Name *string `json:"name,omitempty"`
1411
1412 Type *string `json:"type,omitempty"`
1413
1414 Location *string `json:"location,omitempty"`
1415
1416 Tags map[string]*string `json:"tags"`
1417 }
1418
1419
1420 func (mwr MyWorkbookResource) MarshalJSON() ([]byte, error) {
1421 objectMap := make(map[string]interface{})
1422 if mwr.ID != nil {
1423 objectMap["id"] = mwr.ID
1424 }
1425 if mwr.Name != nil {
1426 objectMap["name"] = mwr.Name
1427 }
1428 if mwr.Type != nil {
1429 objectMap["type"] = mwr.Type
1430 }
1431 if mwr.Location != nil {
1432 objectMap["location"] = mwr.Location
1433 }
1434 if mwr.Tags != nil {
1435 objectMap["tags"] = mwr.Tags
1436 }
1437 return json.Marshal(objectMap)
1438 }
1439
1440
1441 type MyWorkbooksListResult struct {
1442 autorest.Response `json:"-"`
1443
1444 Value *[]MyWorkbook `json:"value,omitempty"`
1445 }
1446
1447
1448 func (mwlr MyWorkbooksListResult) MarshalJSON() ([]byte, error) {
1449 objectMap := make(map[string]interface{})
1450 return json.Marshal(objectMap)
1451 }
1452
1453
1454 type Operation struct {
1455
1456 Name *string `json:"name,omitempty"`
1457
1458 Display *OperationDisplay `json:"display,omitempty"`
1459 }
1460
1461
1462 type OperationDisplay struct {
1463
1464 Provider *string `json:"provider,omitempty"`
1465
1466 Resource *string `json:"resource,omitempty"`
1467
1468 Operation *string `json:"operation,omitempty"`
1469 }
1470
1471
1472
1473 type OperationListResult struct {
1474 autorest.Response `json:"-"`
1475
1476 Value *[]Operation `json:"value,omitempty"`
1477
1478 NextLink *string `json:"nextLink,omitempty"`
1479 }
1480
1481
1482 type OperationListResultIterator struct {
1483 i int
1484 page OperationListResultPage
1485 }
1486
1487
1488
1489 func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
1490 if tracing.IsEnabled() {
1491 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
1492 defer func() {
1493 sc := -1
1494 if iter.Response().Response.Response != nil {
1495 sc = iter.Response().Response.Response.StatusCode
1496 }
1497 tracing.EndSpan(ctx, sc, err)
1498 }()
1499 }
1500 iter.i++
1501 if iter.i < len(iter.page.Values()) {
1502 return nil
1503 }
1504 err = iter.page.NextWithContext(ctx)
1505 if err != nil {
1506 iter.i--
1507 return err
1508 }
1509 iter.i = 0
1510 return nil
1511 }
1512
1513
1514
1515
1516 func (iter *OperationListResultIterator) Next() error {
1517 return iter.NextWithContext(context.Background())
1518 }
1519
1520
1521 func (iter OperationListResultIterator) NotDone() bool {
1522 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1523 }
1524
1525
1526 func (iter OperationListResultIterator) Response() OperationListResult {
1527 return iter.page.Response()
1528 }
1529
1530
1531
1532 func (iter OperationListResultIterator) Value() Operation {
1533 if !iter.page.NotDone() {
1534 return Operation{}
1535 }
1536 return iter.page.Values()[iter.i]
1537 }
1538
1539
1540 func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
1541 return OperationListResultIterator{page: page}
1542 }
1543
1544
1545 func (olr OperationListResult) IsEmpty() bool {
1546 return olr.Value == nil || len(*olr.Value) == 0
1547 }
1548
1549
1550 func (olr OperationListResult) hasNextLink() bool {
1551 return olr.NextLink != nil && len(*olr.NextLink) != 0
1552 }
1553
1554
1555
1556 func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
1557 if !olr.hasNextLink() {
1558 return nil, nil
1559 }
1560 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1561 autorest.AsJSON(),
1562 autorest.AsGet(),
1563 autorest.WithBaseURL(to.String(olr.NextLink)))
1564 }
1565
1566
1567 type OperationListResultPage struct {
1568 fn func(context.Context, OperationListResult) (OperationListResult, error)
1569 olr OperationListResult
1570 }
1571
1572
1573
1574 func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
1575 if tracing.IsEnabled() {
1576 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
1577 defer func() {
1578 sc := -1
1579 if page.Response().Response.Response != nil {
1580 sc = page.Response().Response.Response.StatusCode
1581 }
1582 tracing.EndSpan(ctx, sc, err)
1583 }()
1584 }
1585 for {
1586 next, err := page.fn(ctx, page.olr)
1587 if err != nil {
1588 return err
1589 }
1590 page.olr = next
1591 if !next.hasNextLink() || !next.IsEmpty() {
1592 break
1593 }
1594 }
1595 return nil
1596 }
1597
1598
1599
1600
1601 func (page *OperationListResultPage) Next() error {
1602 return page.NextWithContext(context.Background())
1603 }
1604
1605
1606 func (page OperationListResultPage) NotDone() bool {
1607 return !page.olr.IsEmpty()
1608 }
1609
1610
1611 func (page OperationListResultPage) Response() OperationListResult {
1612 return page.olr
1613 }
1614
1615
1616 func (page OperationListResultPage) Values() []Operation {
1617 if page.olr.IsEmpty() {
1618 return nil
1619 }
1620 return *page.olr.Value
1621 }
1622
1623
1624 func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
1625 return OperationListResultPage{
1626 fn: getNextPage,
1627 olr: cur,
1628 }
1629 }
1630
1631
1632 type PrivateLinkScopedResource struct {
1633
1634 ResourceID *string `json:"ResourceId,omitempty"`
1635
1636 ScopeID *string `json:"ScopeId,omitempty"`
1637 }
1638
1639
1640
1641 type ProxyResource struct {
1642
1643 ID *string `json:"id,omitempty"`
1644
1645 Name *string `json:"name,omitempty"`
1646
1647 Type *string `json:"type,omitempty"`
1648 }
1649
1650
1651 func (pr ProxyResource) MarshalJSON() ([]byte, error) {
1652 objectMap := make(map[string]interface{})
1653 return json.Marshal(objectMap)
1654 }
1655
1656
1657 type Resource struct {
1658
1659 ID *string `json:"id,omitempty"`
1660
1661 Name *string `json:"name,omitempty"`
1662
1663 Type *string `json:"type,omitempty"`
1664 }
1665
1666
1667 func (r Resource) MarshalJSON() ([]byte, error) {
1668 objectMap := make(map[string]interface{})
1669 return json.Marshal(objectMap)
1670 }
1671
1672
1673
1674 type TagsResource struct {
1675
1676 Tags map[string]*string `json:"tags"`
1677 }
1678
1679
1680 func (tr TagsResource) MarshalJSON() ([]byte, error) {
1681 objectMap := make(map[string]interface{})
1682 if tr.Tags != nil {
1683 objectMap["tags"] = tr.Tags
1684 }
1685 return json.Marshal(objectMap)
1686 }
1687
1688
1689
1690 type TrackedResource struct {
1691
1692 Tags map[string]*string `json:"tags"`
1693
1694 Location *string `json:"location,omitempty"`
1695
1696 ID *string `json:"id,omitempty"`
1697
1698 Name *string `json:"name,omitempty"`
1699
1700 Type *string `json:"type,omitempty"`
1701 }
1702
1703
1704 func (tr TrackedResource) MarshalJSON() ([]byte, error) {
1705 objectMap := make(map[string]interface{})
1706 if tr.Tags != nil {
1707 objectMap["tags"] = tr.Tags
1708 }
1709 if tr.Location != nil {
1710 objectMap["location"] = tr.Location
1711 }
1712 return json.Marshal(objectMap)
1713 }
1714
1715
1716 type WebTest struct {
1717 autorest.Response `json:"-"`
1718
1719 Kind WebTestKind `json:"kind,omitempty"`
1720
1721 *WebTestProperties `json:"properties,omitempty"`
1722
1723 ID *string `json:"id,omitempty"`
1724
1725 Name *string `json:"name,omitempty"`
1726
1727 Type *string `json:"type,omitempty"`
1728
1729 Location *string `json:"location,omitempty"`
1730
1731 Tags map[string]*string `json:"tags"`
1732 }
1733
1734
1735 func (wt WebTest) MarshalJSON() ([]byte, error) {
1736 objectMap := make(map[string]interface{})
1737 if wt.Kind != "" {
1738 objectMap["kind"] = wt.Kind
1739 }
1740 if wt.WebTestProperties != nil {
1741 objectMap["properties"] = wt.WebTestProperties
1742 }
1743 if wt.Location != nil {
1744 objectMap["location"] = wt.Location
1745 }
1746 if wt.Tags != nil {
1747 objectMap["tags"] = wt.Tags
1748 }
1749 return json.Marshal(objectMap)
1750 }
1751
1752
1753 func (wt *WebTest) UnmarshalJSON(body []byte) error {
1754 var m map[string]*json.RawMessage
1755 err := json.Unmarshal(body, &m)
1756 if err != nil {
1757 return err
1758 }
1759 for k, v := range m {
1760 switch k {
1761 case "kind":
1762 if v != nil {
1763 var kind WebTestKind
1764 err = json.Unmarshal(*v, &kind)
1765 if err != nil {
1766 return err
1767 }
1768 wt.Kind = kind
1769 }
1770 case "properties":
1771 if v != nil {
1772 var webTestProperties WebTestProperties
1773 err = json.Unmarshal(*v, &webTestProperties)
1774 if err != nil {
1775 return err
1776 }
1777 wt.WebTestProperties = &webTestProperties
1778 }
1779 case "id":
1780 if v != nil {
1781 var ID string
1782 err = json.Unmarshal(*v, &ID)
1783 if err != nil {
1784 return err
1785 }
1786 wt.ID = &ID
1787 }
1788 case "name":
1789 if v != nil {
1790 var name string
1791 err = json.Unmarshal(*v, &name)
1792 if err != nil {
1793 return err
1794 }
1795 wt.Name = &name
1796 }
1797 case "type":
1798 if v != nil {
1799 var typeVar string
1800 err = json.Unmarshal(*v, &typeVar)
1801 if err != nil {
1802 return err
1803 }
1804 wt.Type = &typeVar
1805 }
1806 case "location":
1807 if v != nil {
1808 var location string
1809 err = json.Unmarshal(*v, &location)
1810 if err != nil {
1811 return err
1812 }
1813 wt.Location = &location
1814 }
1815 case "tags":
1816 if v != nil {
1817 var tags map[string]*string
1818 err = json.Unmarshal(*v, &tags)
1819 if err != nil {
1820 return err
1821 }
1822 wt.Tags = tags
1823 }
1824 }
1825 }
1826
1827 return nil
1828 }
1829
1830
1831
1832 type WebTestGeolocation struct {
1833
1834 Location *string `json:"Id,omitempty"`
1835 }
1836
1837
1838 type WebTestListResult struct {
1839 autorest.Response `json:"-"`
1840
1841 Value *[]WebTest `json:"value,omitempty"`
1842
1843 NextLink *string `json:"nextLink,omitempty"`
1844 }
1845
1846
1847 type WebTestListResultIterator struct {
1848 i int
1849 page WebTestListResultPage
1850 }
1851
1852
1853
1854 func (iter *WebTestListResultIterator) NextWithContext(ctx context.Context) (err error) {
1855 if tracing.IsEnabled() {
1856 ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultIterator.NextWithContext")
1857 defer func() {
1858 sc := -1
1859 if iter.Response().Response.Response != nil {
1860 sc = iter.Response().Response.Response.StatusCode
1861 }
1862 tracing.EndSpan(ctx, sc, err)
1863 }()
1864 }
1865 iter.i++
1866 if iter.i < len(iter.page.Values()) {
1867 return nil
1868 }
1869 err = iter.page.NextWithContext(ctx)
1870 if err != nil {
1871 iter.i--
1872 return err
1873 }
1874 iter.i = 0
1875 return nil
1876 }
1877
1878
1879
1880
1881 func (iter *WebTestListResultIterator) Next() error {
1882 return iter.NextWithContext(context.Background())
1883 }
1884
1885
1886 func (iter WebTestListResultIterator) NotDone() bool {
1887 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1888 }
1889
1890
1891 func (iter WebTestListResultIterator) Response() WebTestListResult {
1892 return iter.page.Response()
1893 }
1894
1895
1896
1897 func (iter WebTestListResultIterator) Value() WebTest {
1898 if !iter.page.NotDone() {
1899 return WebTest{}
1900 }
1901 return iter.page.Values()[iter.i]
1902 }
1903
1904
1905 func NewWebTestListResultIterator(page WebTestListResultPage) WebTestListResultIterator {
1906 return WebTestListResultIterator{page: page}
1907 }
1908
1909
1910 func (wtlr WebTestListResult) IsEmpty() bool {
1911 return wtlr.Value == nil || len(*wtlr.Value) == 0
1912 }
1913
1914
1915 func (wtlr WebTestListResult) hasNextLink() bool {
1916 return wtlr.NextLink != nil && len(*wtlr.NextLink) != 0
1917 }
1918
1919
1920
1921 func (wtlr WebTestListResult) webTestListResultPreparer(ctx context.Context) (*http.Request, error) {
1922 if !wtlr.hasNextLink() {
1923 return nil, nil
1924 }
1925 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1926 autorest.AsJSON(),
1927 autorest.AsGet(),
1928 autorest.WithBaseURL(to.String(wtlr.NextLink)))
1929 }
1930
1931
1932 type WebTestListResultPage struct {
1933 fn func(context.Context, WebTestListResult) (WebTestListResult, error)
1934 wtlr WebTestListResult
1935 }
1936
1937
1938
1939 func (page *WebTestListResultPage) NextWithContext(ctx context.Context) (err error) {
1940 if tracing.IsEnabled() {
1941 ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultPage.NextWithContext")
1942 defer func() {
1943 sc := -1
1944 if page.Response().Response.Response != nil {
1945 sc = page.Response().Response.Response.StatusCode
1946 }
1947 tracing.EndSpan(ctx, sc, err)
1948 }()
1949 }
1950 for {
1951 next, err := page.fn(ctx, page.wtlr)
1952 if err != nil {
1953 return err
1954 }
1955 page.wtlr = next
1956 if !next.hasNextLink() || !next.IsEmpty() {
1957 break
1958 }
1959 }
1960 return nil
1961 }
1962
1963
1964
1965
1966 func (page *WebTestListResultPage) Next() error {
1967 return page.NextWithContext(context.Background())
1968 }
1969
1970
1971 func (page WebTestListResultPage) NotDone() bool {
1972 return !page.wtlr.IsEmpty()
1973 }
1974
1975
1976 func (page WebTestListResultPage) Response() WebTestListResult {
1977 return page.wtlr
1978 }
1979
1980
1981 func (page WebTestListResultPage) Values() []WebTest {
1982 if page.wtlr.IsEmpty() {
1983 return nil
1984 }
1985 return *page.wtlr.Value
1986 }
1987
1988
1989 func NewWebTestListResultPage(cur WebTestListResult, getNextPage func(context.Context, WebTestListResult) (WebTestListResult, error)) WebTestListResultPage {
1990 return WebTestListResultPage{
1991 fn: getNextPage,
1992 wtlr: cur,
1993 }
1994 }
1995
1996
1997 type WebTestProperties struct {
1998
1999 SyntheticMonitorID *string `json:"SyntheticMonitorId,omitempty"`
2000
2001 WebTestName *string `json:"Name,omitempty"`
2002
2003 Description *string `json:"Description,omitempty"`
2004
2005 Enabled *bool `json:"Enabled,omitempty"`
2006
2007 Frequency *int32 `json:"Frequency,omitempty"`
2008
2009 Timeout *int32 `json:"Timeout,omitempty"`
2010
2011 WebTestKind WebTestKind `json:"Kind,omitempty"`
2012
2013 RetryEnabled *bool `json:"RetryEnabled,omitempty"`
2014
2015 Locations *[]WebTestGeolocation `json:"Locations,omitempty"`
2016
2017 Configuration *WebTestPropertiesConfiguration `json:"Configuration,omitempty"`
2018
2019 ProvisioningState *string `json:"provisioningState,omitempty"`
2020 }
2021
2022
2023 func (wtp WebTestProperties) MarshalJSON() ([]byte, error) {
2024 objectMap := make(map[string]interface{})
2025 if wtp.SyntheticMonitorID != nil {
2026 objectMap["SyntheticMonitorId"] = wtp.SyntheticMonitorID
2027 }
2028 if wtp.WebTestName != nil {
2029 objectMap["Name"] = wtp.WebTestName
2030 }
2031 if wtp.Description != nil {
2032 objectMap["Description"] = wtp.Description
2033 }
2034 if wtp.Enabled != nil {
2035 objectMap["Enabled"] = wtp.Enabled
2036 }
2037 if wtp.Frequency != nil {
2038 objectMap["Frequency"] = wtp.Frequency
2039 }
2040 if wtp.Timeout != nil {
2041 objectMap["Timeout"] = wtp.Timeout
2042 }
2043 if wtp.WebTestKind != "" {
2044 objectMap["Kind"] = wtp.WebTestKind
2045 }
2046 if wtp.RetryEnabled != nil {
2047 objectMap["RetryEnabled"] = wtp.RetryEnabled
2048 }
2049 if wtp.Locations != nil {
2050 objectMap["Locations"] = wtp.Locations
2051 }
2052 if wtp.Configuration != nil {
2053 objectMap["Configuration"] = wtp.Configuration
2054 }
2055 return json.Marshal(objectMap)
2056 }
2057
2058
2059 type WebTestPropertiesConfiguration struct {
2060
2061 WebTest *string `json:"WebTest,omitempty"`
2062 }
2063
2064
2065 type WebtestsResource struct {
2066
2067 ID *string `json:"id,omitempty"`
2068
2069 Name *string `json:"name,omitempty"`
2070
2071 Type *string `json:"type,omitempty"`
2072
2073 Location *string `json:"location,omitempty"`
2074
2075 Tags map[string]*string `json:"tags"`
2076 }
2077
2078
2079 func (wr WebtestsResource) MarshalJSON() ([]byte, error) {
2080 objectMap := make(map[string]interface{})
2081 if wr.Location != nil {
2082 objectMap["location"] = wr.Location
2083 }
2084 if wr.Tags != nil {
2085 objectMap["tags"] = wr.Tags
2086 }
2087 return json.Marshal(objectMap)
2088 }
2089
2090
2091 type Workbook struct {
2092 autorest.Response `json:"-"`
2093
2094 Kind SharedTypeKind `json:"kind,omitempty"`
2095
2096 *WorkbookProperties `json:"properties,omitempty"`
2097
2098 ID *string `json:"id,omitempty"`
2099
2100 Name *string `json:"name,omitempty"`
2101
2102 Type *string `json:"type,omitempty"`
2103
2104 Location *string `json:"location,omitempty"`
2105
2106 Tags map[string]*string `json:"tags"`
2107 }
2108
2109
2110 func (w Workbook) MarshalJSON() ([]byte, error) {
2111 objectMap := make(map[string]interface{})
2112 if w.Kind != "" {
2113 objectMap["kind"] = w.Kind
2114 }
2115 if w.WorkbookProperties != nil {
2116 objectMap["properties"] = w.WorkbookProperties
2117 }
2118 if w.Location != nil {
2119 objectMap["location"] = w.Location
2120 }
2121 if w.Tags != nil {
2122 objectMap["tags"] = w.Tags
2123 }
2124 return json.Marshal(objectMap)
2125 }
2126
2127
2128 func (w *Workbook) UnmarshalJSON(body []byte) error {
2129 var m map[string]*json.RawMessage
2130 err := json.Unmarshal(body, &m)
2131 if err != nil {
2132 return err
2133 }
2134 for k, v := range m {
2135 switch k {
2136 case "kind":
2137 if v != nil {
2138 var kind SharedTypeKind
2139 err = json.Unmarshal(*v, &kind)
2140 if err != nil {
2141 return err
2142 }
2143 w.Kind = kind
2144 }
2145 case "properties":
2146 if v != nil {
2147 var workbookProperties WorkbookProperties
2148 err = json.Unmarshal(*v, &workbookProperties)
2149 if err != nil {
2150 return err
2151 }
2152 w.WorkbookProperties = &workbookProperties
2153 }
2154 case "id":
2155 if v != nil {
2156 var ID string
2157 err = json.Unmarshal(*v, &ID)
2158 if err != nil {
2159 return err
2160 }
2161 w.ID = &ID
2162 }
2163 case "name":
2164 if v != nil {
2165 var name string
2166 err = json.Unmarshal(*v, &name)
2167 if err != nil {
2168 return err
2169 }
2170 w.Name = &name
2171 }
2172 case "type":
2173 if v != nil {
2174 var typeVar string
2175 err = json.Unmarshal(*v, &typeVar)
2176 if err != nil {
2177 return err
2178 }
2179 w.Type = &typeVar
2180 }
2181 case "location":
2182 if v != nil {
2183 var location string
2184 err = json.Unmarshal(*v, &location)
2185 if err != nil {
2186 return err
2187 }
2188 w.Location = &location
2189 }
2190 case "tags":
2191 if v != nil {
2192 var tags map[string]*string
2193 err = json.Unmarshal(*v, &tags)
2194 if err != nil {
2195 return err
2196 }
2197 w.Tags = tags
2198 }
2199 }
2200 }
2201
2202 return nil
2203 }
2204
2205
2206 type WorkbookError struct {
2207
2208 Code *string `json:"code,omitempty"`
2209
2210 Message *string `json:"message,omitempty"`
2211
2212 Details *[]ErrorFieldContract `json:"details,omitempty"`
2213 }
2214
2215
2216 type WorkbookProperties struct {
2217
2218 Name *string `json:"name,omitempty"`
2219
2220 SerializedData *string `json:"serializedData,omitempty"`
2221
2222 Version *string `json:"version,omitempty"`
2223
2224 WorkbookID *string `json:"workbookId,omitempty"`
2225
2226 SharedTypeKind SharedTypeKind `json:"kind,omitempty"`
2227
2228 TimeModified *string `json:"timeModified,omitempty"`
2229
2230 Category *string `json:"category,omitempty"`
2231
2232 Tags *[]string `json:"tags,omitempty"`
2233
2234 UserID *string `json:"userId,omitempty"`
2235
2236 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2237 }
2238
2239
2240 func (wp WorkbookProperties) MarshalJSON() ([]byte, error) {
2241 objectMap := make(map[string]interface{})
2242 if wp.Name != nil {
2243 objectMap["name"] = wp.Name
2244 }
2245 if wp.SerializedData != nil {
2246 objectMap["serializedData"] = wp.SerializedData
2247 }
2248 if wp.Version != nil {
2249 objectMap["version"] = wp.Version
2250 }
2251 if wp.WorkbookID != nil {
2252 objectMap["workbookId"] = wp.WorkbookID
2253 }
2254 if wp.SharedTypeKind != "" {
2255 objectMap["kind"] = wp.SharedTypeKind
2256 }
2257 if wp.Category != nil {
2258 objectMap["category"] = wp.Category
2259 }
2260 if wp.Tags != nil {
2261 objectMap["tags"] = wp.Tags
2262 }
2263 if wp.UserID != nil {
2264 objectMap["userId"] = wp.UserID
2265 }
2266 if wp.SourceResourceID != nil {
2267 objectMap["sourceResourceId"] = wp.SourceResourceID
2268 }
2269 return json.Marshal(objectMap)
2270 }
2271
2272
2273 type WorkbookResource struct {
2274
2275 ID *string `json:"id,omitempty"`
2276
2277 Name *string `json:"name,omitempty"`
2278
2279 Type *string `json:"type,omitempty"`
2280
2281 Location *string `json:"location,omitempty"`
2282
2283 Tags map[string]*string `json:"tags"`
2284 }
2285
2286
2287 func (wr WorkbookResource) MarshalJSON() ([]byte, error) {
2288 objectMap := make(map[string]interface{})
2289 if wr.Location != nil {
2290 objectMap["location"] = wr.Location
2291 }
2292 if wr.Tags != nil {
2293 objectMap["tags"] = wr.Tags
2294 }
2295 return json.Marshal(objectMap)
2296 }
2297
2298
2299 type WorkbooksListResult struct {
2300 autorest.Response `json:"-"`
2301
2302 Value *[]Workbook `json:"value,omitempty"`
2303 }
2304
2305
2306 func (wlr WorkbooksListResult) MarshalJSON() ([]byte, error) {
2307 objectMap := make(map[string]interface{})
2308 return json.Marshal(objectMap)
2309 }
2310
2311
2312 type WorkItemConfiguration struct {
2313 autorest.Response `json:"-"`
2314
2315 ConnectorID *string `json:"ConnectorId,omitempty"`
2316
2317 ConfigDisplayName *string `json:"ConfigDisplayName,omitempty"`
2318
2319 IsDefault *bool `json:"IsDefault,omitempty"`
2320
2321 ID *string `json:"Id,omitempty"`
2322
2323 ConfigProperties *string `json:"ConfigProperties,omitempty"`
2324 }
2325
2326
2327 type WorkItemConfigurationError struct {
2328
2329 Code *string `json:"code,omitempty"`
2330
2331 Message *string `json:"message,omitempty"`
2332 Innererror *InnerError `json:"innererror,omitempty"`
2333 }
2334
2335
2336 type WorkItemConfigurationsListResult struct {
2337 autorest.Response `json:"-"`
2338
2339 Value *[]WorkItemConfiguration `json:"value,omitempty"`
2340 }
2341
2342
2343 func (wiclr WorkItemConfigurationsListResult) MarshalJSON() ([]byte, error) {
2344 objectMap := make(map[string]interface{})
2345 return json.Marshal(objectMap)
2346 }
2347
2348
2349 type WorkItemCreateConfiguration struct {
2350
2351 ConnectorID *string `json:"ConnectorId,omitempty"`
2352
2353 ConnectorDataConfiguration *string `json:"ConnectorDataConfiguration,omitempty"`
2354
2355 ValidateOnly *bool `json:"ValidateOnly,omitempty"`
2356
2357 WorkItemProperties map[string]*string `json:"WorkItemProperties"`
2358 }
2359
2360
2361 func (wicc WorkItemCreateConfiguration) MarshalJSON() ([]byte, error) {
2362 objectMap := make(map[string]interface{})
2363 if wicc.ConnectorID != nil {
2364 objectMap["ConnectorId"] = wicc.ConnectorID
2365 }
2366 if wicc.ConnectorDataConfiguration != nil {
2367 objectMap["ConnectorDataConfiguration"] = wicc.ConnectorDataConfiguration
2368 }
2369 if wicc.ValidateOnly != nil {
2370 objectMap["ValidateOnly"] = wicc.ValidateOnly
2371 }
2372 if wicc.WorkItemProperties != nil {
2373 objectMap["WorkItemProperties"] = wicc.WorkItemProperties
2374 }
2375 return json.Marshal(objectMap)
2376 }
2377
View as plain text