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 "github.com/gofrs/uuid"
17 "net/http"
18 )
19
20
21 const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appinsights/mgmt/2022-02-01-preview/insights"
22
23
24 type Annotation struct {
25
26 AnnotationName *string `json:"AnnotationName,omitempty"`
27
28 Category *string `json:"Category,omitempty"`
29
30 EventTime *date.Time `json:"EventTime,omitempty"`
31
32 ID *string `json:"Id,omitempty"`
33
34 Properties *string `json:"Properties,omitempty"`
35
36 RelatedAnnotation *string `json:"RelatedAnnotation,omitempty"`
37 }
38
39
40 type AnnotationError struct {
41
42 Code *string `json:"code,omitempty"`
43
44 Message *string `json:"message,omitempty"`
45 Innererror *InnerError `json:"innererror,omitempty"`
46 }
47
48
49 type AnnotationsListResult struct {
50 autorest.Response `json:"-"`
51
52 Value *[]Annotation `json:"value,omitempty"`
53 }
54
55
56 func (alr AnnotationsListResult) MarshalJSON() ([]byte, error) {
57 objectMap := make(map[string]interface{})
58 return json.Marshal(objectMap)
59 }
60
61
62 type APIKeyRequest struct {
63
64 Name *string `json:"name,omitempty"`
65
66 LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
67
68 LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
69 }
70
71
72 type ApplicationInsightsComponent struct {
73 autorest.Response `json:"-"`
74
75 Kind *string `json:"kind,omitempty"`
76
77 Etag *string `json:"etag,omitempty"`
78
79 *ApplicationInsightsComponentProperties `json:"properties,omitempty"`
80
81 ID *string `json:"id,omitempty"`
82
83 Name *string `json:"name,omitempty"`
84
85 Type *string `json:"type,omitempty"`
86
87 Location *string `json:"location,omitempty"`
88
89 Tags map[string]*string `json:"tags"`
90 }
91
92
93 func (aic ApplicationInsightsComponent) MarshalJSON() ([]byte, error) {
94 objectMap := make(map[string]interface{})
95 if aic.Kind != nil {
96 objectMap["kind"] = aic.Kind
97 }
98 if aic.Etag != nil {
99 objectMap["etag"] = aic.Etag
100 }
101 if aic.ApplicationInsightsComponentProperties != nil {
102 objectMap["properties"] = aic.ApplicationInsightsComponentProperties
103 }
104 if aic.Location != nil {
105 objectMap["location"] = aic.Location
106 }
107 if aic.Tags != nil {
108 objectMap["tags"] = aic.Tags
109 }
110 return json.Marshal(objectMap)
111 }
112
113
114 func (aic *ApplicationInsightsComponent) UnmarshalJSON(body []byte) error {
115 var m map[string]*json.RawMessage
116 err := json.Unmarshal(body, &m)
117 if err != nil {
118 return err
119 }
120 for k, v := range m {
121 switch k {
122 case "kind":
123 if v != nil {
124 var kind string
125 err = json.Unmarshal(*v, &kind)
126 if err != nil {
127 return err
128 }
129 aic.Kind = &kind
130 }
131 case "etag":
132 if v != nil {
133 var etag string
134 err = json.Unmarshal(*v, &etag)
135 if err != nil {
136 return err
137 }
138 aic.Etag = &etag
139 }
140 case "properties":
141 if v != nil {
142 var applicationInsightsComponentProperties ApplicationInsightsComponentProperties
143 err = json.Unmarshal(*v, &applicationInsightsComponentProperties)
144 if err != nil {
145 return err
146 }
147 aic.ApplicationInsightsComponentProperties = &applicationInsightsComponentProperties
148 }
149 case "id":
150 if v != nil {
151 var ID string
152 err = json.Unmarshal(*v, &ID)
153 if err != nil {
154 return err
155 }
156 aic.ID = &ID
157 }
158 case "name":
159 if v != nil {
160 var name string
161 err = json.Unmarshal(*v, &name)
162 if err != nil {
163 return err
164 }
165 aic.Name = &name
166 }
167 case "type":
168 if v != nil {
169 var typeVar string
170 err = json.Unmarshal(*v, &typeVar)
171 if err != nil {
172 return err
173 }
174 aic.Type = &typeVar
175 }
176 case "location":
177 if v != nil {
178 var location string
179 err = json.Unmarshal(*v, &location)
180 if err != nil {
181 return err
182 }
183 aic.Location = &location
184 }
185 case "tags":
186 if v != nil {
187 var tags map[string]*string
188 err = json.Unmarshal(*v, &tags)
189 if err != nil {
190 return err
191 }
192 aic.Tags = tags
193 }
194 }
195 }
196
197 return nil
198 }
199
200
201
202 type ApplicationInsightsComponentAnalyticsItem struct {
203 autorest.Response `json:"-"`
204
205 ID *string `json:"Id,omitempty"`
206
207 Name *string `json:"Name,omitempty"`
208
209 Content *string `json:"Content,omitempty"`
210
211 Version *string `json:"Version,omitempty"`
212
213 Scope ItemScope `json:"Scope,omitempty"`
214
215 Type ItemType `json:"Type,omitempty"`
216
217 TimeCreated *string `json:"TimeCreated,omitempty"`
218
219 TimeModified *string `json:"TimeModified,omitempty"`
220 Properties *ApplicationInsightsComponentAnalyticsItemProperties `json:"Properties,omitempty"`
221 }
222
223
224 func (aicai ApplicationInsightsComponentAnalyticsItem) MarshalJSON() ([]byte, error) {
225 objectMap := make(map[string]interface{})
226 if aicai.ID != nil {
227 objectMap["Id"] = aicai.ID
228 }
229 if aicai.Name != nil {
230 objectMap["Name"] = aicai.Name
231 }
232 if aicai.Content != nil {
233 objectMap["Content"] = aicai.Content
234 }
235 if aicai.Scope != "" {
236 objectMap["Scope"] = aicai.Scope
237 }
238 if aicai.Type != "" {
239 objectMap["Type"] = aicai.Type
240 }
241 if aicai.Properties != nil {
242 objectMap["Properties"] = aicai.Properties
243 }
244 return json.Marshal(objectMap)
245 }
246
247
248
249 type ApplicationInsightsComponentAnalyticsItemProperties struct {
250
251 FunctionAlias *string `json:"functionAlias,omitempty"`
252 }
253
254
255
256 type ApplicationInsightsComponentAPIKey struct {
257 autorest.Response `json:"-"`
258
259 ID *string `json:"id,omitempty"`
260
261 APIKey *string `json:"apiKey,omitempty"`
262
263 CreatedDate *string `json:"createdDate,omitempty"`
264
265 Name *string `json:"name,omitempty"`
266
267 LinkedReadProperties *[]string `json:"linkedReadProperties,omitempty"`
268
269 LinkedWriteProperties *[]string `json:"linkedWriteProperties,omitempty"`
270 }
271
272
273 func (aicak ApplicationInsightsComponentAPIKey) MarshalJSON() ([]byte, error) {
274 objectMap := make(map[string]interface{})
275 if aicak.CreatedDate != nil {
276 objectMap["createdDate"] = aicak.CreatedDate
277 }
278 if aicak.Name != nil {
279 objectMap["name"] = aicak.Name
280 }
281 if aicak.LinkedReadProperties != nil {
282 objectMap["linkedReadProperties"] = aicak.LinkedReadProperties
283 }
284 if aicak.LinkedWriteProperties != nil {
285 objectMap["linkedWriteProperties"] = aicak.LinkedWriteProperties
286 }
287 return json.Marshal(objectMap)
288 }
289
290
291
292 type ApplicationInsightsComponentAPIKeyListResult struct {
293 autorest.Response `json:"-"`
294
295 Value *[]ApplicationInsightsComponentAPIKey `json:"value,omitempty"`
296 }
297
298
299 type ApplicationInsightsComponentAvailableFeatures struct {
300 autorest.Response `json:"-"`
301
302 Result *[]ApplicationInsightsComponentFeature `json:"Result,omitempty"`
303 }
304
305
306 func (aicaf ApplicationInsightsComponentAvailableFeatures) MarshalJSON() ([]byte, error) {
307 objectMap := make(map[string]interface{})
308 return json.Marshal(objectMap)
309 }
310
311
312 type ApplicationInsightsComponentBillingFeatures struct {
313 autorest.Response `json:"-"`
314
315 DataVolumeCap *ApplicationInsightsComponentDataVolumeCap `json:"DataVolumeCap,omitempty"`
316
317 CurrentBillingFeatures *[]string `json:"CurrentBillingFeatures,omitempty"`
318 }
319
320
321 type ApplicationInsightsComponentDataVolumeCap struct {
322
323 Cap *float64 `json:"Cap,omitempty"`
324
325 ResetTime *int32 `json:"ResetTime,omitempty"`
326
327 WarningThreshold *int32 `json:"WarningThreshold,omitempty"`
328
329 StopSendNotificationWhenHitThreshold *bool `json:"StopSendNotificationWhenHitThreshold,omitempty"`
330
331 StopSendNotificationWhenHitCap *bool `json:"StopSendNotificationWhenHitCap,omitempty"`
332
333 MaxHistoryCap *float64 `json:"MaxHistoryCap,omitempty"`
334 }
335
336
337 func (aicdvc ApplicationInsightsComponentDataVolumeCap) MarshalJSON() ([]byte, error) {
338 objectMap := make(map[string]interface{})
339 if aicdvc.Cap != nil {
340 objectMap["Cap"] = aicdvc.Cap
341 }
342 if aicdvc.WarningThreshold != nil {
343 objectMap["WarningThreshold"] = aicdvc.WarningThreshold
344 }
345 if aicdvc.StopSendNotificationWhenHitThreshold != nil {
346 objectMap["StopSendNotificationWhenHitThreshold"] = aicdvc.StopSendNotificationWhenHitThreshold
347 }
348 if aicdvc.StopSendNotificationWhenHitCap != nil {
349 objectMap["StopSendNotificationWhenHitCap"] = aicdvc.StopSendNotificationWhenHitCap
350 }
351 return json.Marshal(objectMap)
352 }
353
354
355
356 type ApplicationInsightsComponentExportConfiguration struct {
357 autorest.Response `json:"-"`
358
359 ExportID *string `json:"ExportId,omitempty"`
360
361 InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
362
363 RecordTypes *string `json:"RecordTypes,omitempty"`
364
365 ApplicationName *string `json:"ApplicationName,omitempty"`
366
367 SubscriptionID *string `json:"SubscriptionId,omitempty"`
368
369 ResourceGroup *string `json:"ResourceGroup,omitempty"`
370
371 DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
372
373 DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
374
375 DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
376
377 DestinationType *string `json:"DestinationType,omitempty"`
378
379 IsUserEnabled *string `json:"IsUserEnabled,omitempty"`
380
381 LastUserUpdate *string `json:"LastUserUpdate,omitempty"`
382
383 NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
384
385 ExportStatus *string `json:"ExportStatus,omitempty"`
386
387 LastSuccessTime *string `json:"LastSuccessTime,omitempty"`
388
389 LastGapTime *string `json:"LastGapTime,omitempty"`
390
391 PermanentErrorReason *string `json:"PermanentErrorReason,omitempty"`
392
393 StorageName *string `json:"StorageName,omitempty"`
394
395 ContainerName *string `json:"ContainerName,omitempty"`
396 }
397
398
399 func (aicec ApplicationInsightsComponentExportConfiguration) MarshalJSON() ([]byte, error) {
400 objectMap := make(map[string]interface{})
401 if aicec.RecordTypes != nil {
402 objectMap["RecordTypes"] = aicec.RecordTypes
403 }
404 if aicec.NotificationQueueEnabled != nil {
405 objectMap["NotificationQueueEnabled"] = aicec.NotificationQueueEnabled
406 }
407 return json.Marshal(objectMap)
408 }
409
410
411
412 type ApplicationInsightsComponentExportRequest struct {
413
414 RecordTypes *string `json:"RecordTypes,omitempty"`
415
416 DestinationType *string `json:"DestinationType,omitempty"`
417
418 DestinationAddress *string `json:"DestinationAddress,omitempty"`
419
420 IsEnabled *string `json:"IsEnabled,omitempty"`
421
422 NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`
423
424 NotificationQueueURI *string `json:"NotificationQueueUri,omitempty"`
425
426 DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`
427
428 DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`
429
430 DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
431 }
432
433
434
435 type ApplicationInsightsComponentFavorite struct {
436 autorest.Response `json:"-"`
437
438 Name *string `json:"Name,omitempty"`
439
440 Config *string `json:"Config,omitempty"`
441
442 Version *string `json:"Version,omitempty"`
443
444 FavoriteID *string `json:"FavoriteId,omitempty"`
445
446 FavoriteType FavoriteType `json:"FavoriteType,omitempty"`
447
448 SourceType *string `json:"SourceType,omitempty"`
449
450 TimeModified *string `json:"TimeModified,omitempty"`
451
452 Tags *[]string `json:"Tags,omitempty"`
453
454 Category *string `json:"Category,omitempty"`
455
456 IsGeneratedFromTemplate *bool `json:"IsGeneratedFromTemplate,omitempty"`
457
458 UserID *string `json:"UserId,omitempty"`
459 }
460
461
462 func (aicf ApplicationInsightsComponentFavorite) MarshalJSON() ([]byte, error) {
463 objectMap := make(map[string]interface{})
464 if aicf.Name != nil {
465 objectMap["Name"] = aicf.Name
466 }
467 if aicf.Config != nil {
468 objectMap["Config"] = aicf.Config
469 }
470 if aicf.Version != nil {
471 objectMap["Version"] = aicf.Version
472 }
473 if aicf.FavoriteType != "" {
474 objectMap["FavoriteType"] = aicf.FavoriteType
475 }
476 if aicf.SourceType != nil {
477 objectMap["SourceType"] = aicf.SourceType
478 }
479 if aicf.Tags != nil {
480 objectMap["Tags"] = aicf.Tags
481 }
482 if aicf.Category != nil {
483 objectMap["Category"] = aicf.Category
484 }
485 if aicf.IsGeneratedFromTemplate != nil {
486 objectMap["IsGeneratedFromTemplate"] = aicf.IsGeneratedFromTemplate
487 }
488 return json.Marshal(objectMap)
489 }
490
491
492 type ApplicationInsightsComponentFeature struct {
493
494 FeatureName *string `json:"FeatureName,omitempty"`
495
496 MeterID *string `json:"MeterId,omitempty"`
497
498 MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
499
500 ResouceID *string `json:"ResouceId,omitempty"`
501
502 IsHidden *bool `json:"IsHidden,omitempty"`
503
504 Capabilities *[]ApplicationInsightsComponentFeatureCapability `json:"Capabilities,omitempty"`
505
506 Title *string `json:"Title,omitempty"`
507
508 IsMainFeature *bool `json:"IsMainFeature,omitempty"`
509
510 SupportedAddonFeatures *string `json:"SupportedAddonFeatures,omitempty"`
511 }
512
513
514 func (aicf ApplicationInsightsComponentFeature) MarshalJSON() ([]byte, error) {
515 objectMap := make(map[string]interface{})
516 return json.Marshal(objectMap)
517 }
518
519
520 type ApplicationInsightsComponentFeatureCapabilities struct {
521 autorest.Response `json:"-"`
522
523 SupportExportData *bool `json:"SupportExportData,omitempty"`
524
525 BurstThrottlePolicy *string `json:"BurstThrottlePolicy,omitempty"`
526
527 MetadataClass *string `json:"MetadataClass,omitempty"`
528
529 LiveStreamMetrics *bool `json:"LiveStreamMetrics,omitempty"`
530
531 ApplicationMap *bool `json:"ApplicationMap,omitempty"`
532
533 WorkItemIntegration *bool `json:"WorkItemIntegration,omitempty"`
534
535 PowerBIIntegration *bool `json:"PowerBIIntegration,omitempty"`
536
537 OpenSchema *bool `json:"OpenSchema,omitempty"`
538
539 ProactiveDetection *bool `json:"ProactiveDetection,omitempty"`
540
541 AnalyticsIntegration *bool `json:"AnalyticsIntegration,omitempty"`
542
543 MultipleStepWebTest *bool `json:"MultipleStepWebTest,omitempty"`
544
545 APIAccessLevel *string `json:"ApiAccessLevel,omitempty"`
546
547 TrackingType *string `json:"TrackingType,omitempty"`
548
549 DailyCap *float64 `json:"DailyCap,omitempty"`
550
551 DailyCapResetTime *float64 `json:"DailyCapResetTime,omitempty"`
552
553 ThrottleRate *float64 `json:"ThrottleRate,omitempty"`
554 }
555
556
557 func (aicfc ApplicationInsightsComponentFeatureCapabilities) MarshalJSON() ([]byte, error) {
558 objectMap := make(map[string]interface{})
559 return json.Marshal(objectMap)
560 }
561
562
563 type ApplicationInsightsComponentFeatureCapability struct {
564
565 Name *string `json:"Name,omitempty"`
566
567 Description *string `json:"Description,omitempty"`
568
569 Value *string `json:"Value,omitempty"`
570
571 Unit *string `json:"Unit,omitempty"`
572
573 MeterID *string `json:"MeterId,omitempty"`
574
575 MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
576 }
577
578
579 func (aicfc ApplicationInsightsComponentFeatureCapability) MarshalJSON() ([]byte, error) {
580 objectMap := make(map[string]interface{})
581 return json.Marshal(objectMap)
582 }
583
584
585 type ApplicationInsightsComponentListResult struct {
586 autorest.Response `json:"-"`
587
588 Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
589
590 NextLink *string `json:"nextLink,omitempty"`
591 }
592
593
594
595 type ApplicationInsightsComponentListResultIterator struct {
596 i int
597 page ApplicationInsightsComponentListResultPage
598 }
599
600
601
602 func (iter *ApplicationInsightsComponentListResultIterator) NextWithContext(ctx context.Context) (err error) {
603 if tracing.IsEnabled() {
604 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultIterator.NextWithContext")
605 defer func() {
606 sc := -1
607 if iter.Response().Response.Response != nil {
608 sc = iter.Response().Response.Response.StatusCode
609 }
610 tracing.EndSpan(ctx, sc, err)
611 }()
612 }
613 iter.i++
614 if iter.i < len(iter.page.Values()) {
615 return nil
616 }
617 err = iter.page.NextWithContext(ctx)
618 if err != nil {
619 iter.i--
620 return err
621 }
622 iter.i = 0
623 return nil
624 }
625
626
627
628
629 func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
630 return iter.NextWithContext(context.Background())
631 }
632
633
634 func (iter ApplicationInsightsComponentListResultIterator) NotDone() bool {
635 return iter.page.NotDone() && iter.i < len(iter.page.Values())
636 }
637
638
639 func (iter ApplicationInsightsComponentListResultIterator) Response() ApplicationInsightsComponentListResult {
640 return iter.page.Response()
641 }
642
643
644
645 func (iter ApplicationInsightsComponentListResultIterator) Value() ApplicationInsightsComponent {
646 if !iter.page.NotDone() {
647 return ApplicationInsightsComponent{}
648 }
649 return iter.page.Values()[iter.i]
650 }
651
652
653 func NewApplicationInsightsComponentListResultIterator(page ApplicationInsightsComponentListResultPage) ApplicationInsightsComponentListResultIterator {
654 return ApplicationInsightsComponentListResultIterator{page: page}
655 }
656
657
658 func (aiclr ApplicationInsightsComponentListResult) IsEmpty() bool {
659 return aiclr.Value == nil || len(*aiclr.Value) == 0
660 }
661
662
663 func (aiclr ApplicationInsightsComponentListResult) hasNextLink() bool {
664 return aiclr.NextLink != nil && len(*aiclr.NextLink) != 0
665 }
666
667
668
669 func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponentListResultPreparer(ctx context.Context) (*http.Request, error) {
670 if !aiclr.hasNextLink() {
671 return nil, nil
672 }
673 return autorest.Prepare((&http.Request{}).WithContext(ctx),
674 autorest.AsJSON(),
675 autorest.AsGet(),
676 autorest.WithBaseURL(to.String(aiclr.NextLink)))
677 }
678
679
680 type ApplicationInsightsComponentListResultPage struct {
681 fn func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)
682 aiclr ApplicationInsightsComponentListResult
683 }
684
685
686
687 func (page *ApplicationInsightsComponentListResultPage) NextWithContext(ctx context.Context) (err error) {
688 if tracing.IsEnabled() {
689 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultPage.NextWithContext")
690 defer func() {
691 sc := -1
692 if page.Response().Response.Response != nil {
693 sc = page.Response().Response.Response.StatusCode
694 }
695 tracing.EndSpan(ctx, sc, err)
696 }()
697 }
698 for {
699 next, err := page.fn(ctx, page.aiclr)
700 if err != nil {
701 return err
702 }
703 page.aiclr = next
704 if !next.hasNextLink() || !next.IsEmpty() {
705 break
706 }
707 }
708 return nil
709 }
710
711
712
713
714 func (page *ApplicationInsightsComponentListResultPage) Next() error {
715 return page.NextWithContext(context.Background())
716 }
717
718
719 func (page ApplicationInsightsComponentListResultPage) NotDone() bool {
720 return !page.aiclr.IsEmpty()
721 }
722
723
724 func (page ApplicationInsightsComponentListResultPage) Response() ApplicationInsightsComponentListResult {
725 return page.aiclr
726 }
727
728
729 func (page ApplicationInsightsComponentListResultPage) Values() []ApplicationInsightsComponent {
730 if page.aiclr.IsEmpty() {
731 return nil
732 }
733 return *page.aiclr.Value
734 }
735
736
737 func NewApplicationInsightsComponentListResultPage(cur ApplicationInsightsComponentListResult, getNextPage func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)) ApplicationInsightsComponentListResultPage {
738 return ApplicationInsightsComponentListResultPage{
739 fn: getNextPage,
740 aiclr: cur,
741 }
742 }
743
744
745
746 type ApplicationInsightsComponentProactiveDetectionConfiguration struct {
747 autorest.Response `json:"-"`
748
749 Name *string `json:"Name,omitempty"`
750
751 Enabled *bool `json:"Enabled,omitempty"`
752
753 SendEmailsToSubscriptionOwners *bool `json:"SendEmailsToSubscriptionOwners,omitempty"`
754
755 CustomEmails *[]string `json:"CustomEmails,omitempty"`
756
757 LastUpdatedTime *string `json:"LastUpdatedTime,omitempty"`
758
759 RuleDefinitions *ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions `json:"RuleDefinitions,omitempty"`
760 }
761
762
763
764 type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions struct {
765
766 Name *string `json:"Name,omitempty"`
767
768 DisplayName *string `json:"DisplayName,omitempty"`
769
770 Description *string `json:"Description,omitempty"`
771
772 HelpURL *string `json:"HelpUrl,omitempty"`
773
774 IsHidden *bool `json:"IsHidden,omitempty"`
775
776 IsEnabledByDefault *bool `json:"IsEnabledByDefault,omitempty"`
777
778 IsInPreview *bool `json:"IsInPreview,omitempty"`
779
780 SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
781 }
782
783
784
785 type ApplicationInsightsComponentProperties struct {
786
787 ApplicationID *string `json:"ApplicationId,omitempty"`
788
789 AppID *string `json:"AppId,omitempty"`
790
791 Name *string `json:"Name,omitempty"`
792
793 ApplicationType ApplicationType `json:"Application_Type,omitempty"`
794
795 FlowType FlowType `json:"Flow_Type,omitempty"`
796
797 RequestSource RequestSource `json:"Request_Source,omitempty"`
798
799 InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
800
801 CreationDate *date.Time `json:"CreationDate,omitempty"`
802
803 TenantID *string `json:"TenantId,omitempty"`
804
805 HockeyAppID *string `json:"HockeyAppId,omitempty"`
806
807 HockeyAppToken *string `json:"HockeyAppToken,omitempty"`
808
809 ProvisioningState *string `json:"provisioningState,omitempty"`
810
811 SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`
812
813 ConnectionString *string `json:"ConnectionString,omitempty"`
814
815 RetentionInDays *int32 `json:"RetentionInDays,omitempty"`
816
817 DisableIPMasking *bool `json:"DisableIpMasking,omitempty"`
818
819 ImmediatePurgeDataOn30Days *bool `json:"ImmediatePurgeDataOn30Days,omitempty"`
820
821 WorkspaceResourceID *string `json:"WorkspaceResourceId,omitempty"`
822
823 LaMigrationDate *date.Time `json:"LaMigrationDate,omitempty"`
824
825 PrivateLinkScopedResources *[]PrivateLinkScopedResource `json:"PrivateLinkScopedResources,omitempty"`
826
827 PublicNetworkAccessForIngestion PublicNetworkAccessType `json:"publicNetworkAccessForIngestion,omitempty"`
828
829 PublicNetworkAccessForQuery PublicNetworkAccessType `json:"publicNetworkAccessForQuery,omitempty"`
830
831 IngestionMode IngestionMode `json:"IngestionMode,omitempty"`
832
833 DisableLocalAuth *bool `json:"DisableLocalAuth,omitempty"`
834
835 ForceCustomerStorageForProfiler *bool `json:"ForceCustomerStorageForProfiler,omitempty"`
836 }
837
838
839 func (aicp ApplicationInsightsComponentProperties) MarshalJSON() ([]byte, error) {
840 objectMap := make(map[string]interface{})
841 if aicp.ApplicationType != "" {
842 objectMap["Application_Type"] = aicp.ApplicationType
843 }
844 if aicp.FlowType != "" {
845 objectMap["Flow_Type"] = aicp.FlowType
846 }
847 if aicp.RequestSource != "" {
848 objectMap["Request_Source"] = aicp.RequestSource
849 }
850 if aicp.HockeyAppID != nil {
851 objectMap["HockeyAppId"] = aicp.HockeyAppID
852 }
853 if aicp.SamplingPercentage != nil {
854 objectMap["SamplingPercentage"] = aicp.SamplingPercentage
855 }
856 if aicp.RetentionInDays != nil {
857 objectMap["RetentionInDays"] = aicp.RetentionInDays
858 }
859 if aicp.DisableIPMasking != nil {
860 objectMap["DisableIpMasking"] = aicp.DisableIPMasking
861 }
862 if aicp.ImmediatePurgeDataOn30Days != nil {
863 objectMap["ImmediatePurgeDataOn30Days"] = aicp.ImmediatePurgeDataOn30Days
864 }
865 if aicp.WorkspaceResourceID != nil {
866 objectMap["WorkspaceResourceId"] = aicp.WorkspaceResourceID
867 }
868 if aicp.PublicNetworkAccessForIngestion != "" {
869 objectMap["publicNetworkAccessForIngestion"] = aicp.PublicNetworkAccessForIngestion
870 }
871 if aicp.PublicNetworkAccessForQuery != "" {
872 objectMap["publicNetworkAccessForQuery"] = aicp.PublicNetworkAccessForQuery
873 }
874 if aicp.IngestionMode != "" {
875 objectMap["IngestionMode"] = aicp.IngestionMode
876 }
877 if aicp.DisableLocalAuth != nil {
878 objectMap["DisableLocalAuth"] = aicp.DisableLocalAuth
879 }
880 if aicp.ForceCustomerStorageForProfiler != nil {
881 objectMap["ForceCustomerStorageForProfiler"] = aicp.ForceCustomerStorageForProfiler
882 }
883 return json.Marshal(objectMap)
884 }
885
886
887 type ApplicationInsightsComponentQuotaStatus struct {
888 autorest.Response `json:"-"`
889
890 AppID *string `json:"AppId,omitempty"`
891
892 ShouldBeThrottled *bool `json:"ShouldBeThrottled,omitempty"`
893
894 ExpirationTime *string `json:"ExpirationTime,omitempty"`
895 }
896
897
898 func (aicqs ApplicationInsightsComponentQuotaStatus) MarshalJSON() ([]byte, error) {
899 objectMap := make(map[string]interface{})
900 return json.Marshal(objectMap)
901 }
902
903
904
905 type ApplicationInsightsComponentWebTestLocation struct {
906
907 DisplayName *string `json:"DisplayName,omitempty"`
908
909 Tag *string `json:"Tag,omitempty"`
910 }
911
912
913 func (aicwtl ApplicationInsightsComponentWebTestLocation) MarshalJSON() ([]byte, error) {
914 objectMap := make(map[string]interface{})
915 return json.Marshal(objectMap)
916 }
917
918
919
920 type ApplicationInsightsWebTestLocationsListResult struct {
921 autorest.Response `json:"-"`
922
923 Value *[]ApplicationInsightsComponentWebTestLocation `json:"value,omitempty"`
924 }
925
926
927 type AzureEntityResource struct {
928
929 Etag *string `json:"etag,omitempty"`
930
931 ID *string `json:"id,omitempty"`
932
933 Name *string `json:"name,omitempty"`
934
935 Type *string `json:"type,omitempty"`
936 }
937
938
939 func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
940 objectMap := make(map[string]interface{})
941 return json.Marshal(objectMap)
942 }
943
944
945 type ComponentLinkedStorageAccounts struct {
946 autorest.Response `json:"-"`
947
948 *LinkedStorageAccountsProperties `json:"properties,omitempty"`
949
950 ID *string `json:"id,omitempty"`
951
952 Name *string `json:"name,omitempty"`
953
954 Type *string `json:"type,omitempty"`
955 }
956
957
958 func (clsa ComponentLinkedStorageAccounts) MarshalJSON() ([]byte, error) {
959 objectMap := make(map[string]interface{})
960 if clsa.LinkedStorageAccountsProperties != nil {
961 objectMap["properties"] = clsa.LinkedStorageAccountsProperties
962 }
963 return json.Marshal(objectMap)
964 }
965
966
967 func (clsa *ComponentLinkedStorageAccounts) UnmarshalJSON(body []byte) error {
968 var m map[string]*json.RawMessage
969 err := json.Unmarshal(body, &m)
970 if err != nil {
971 return err
972 }
973 for k, v := range m {
974 switch k {
975 case "properties":
976 if v != nil {
977 var linkedStorageAccountsProperties LinkedStorageAccountsProperties
978 err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
979 if err != nil {
980 return err
981 }
982 clsa.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
983 }
984 case "id":
985 if v != nil {
986 var ID string
987 err = json.Unmarshal(*v, &ID)
988 if err != nil {
989 return err
990 }
991 clsa.ID = &ID
992 }
993 case "name":
994 if v != nil {
995 var name string
996 err = json.Unmarshal(*v, &name)
997 if err != nil {
998 return err
999 }
1000 clsa.Name = &name
1001 }
1002 case "type":
1003 if v != nil {
1004 var typeVar string
1005 err = json.Unmarshal(*v, &typeVar)
1006 if err != nil {
1007 return err
1008 }
1009 clsa.Type = &typeVar
1010 }
1011 }
1012 }
1013
1014 return nil
1015 }
1016
1017
1018 type ComponentLinkedStorageAccountsPatch struct {
1019
1020 *LinkedStorageAccountsProperties `json:"properties,omitempty"`
1021 }
1022
1023
1024 func (clsap ComponentLinkedStorageAccountsPatch) MarshalJSON() ([]byte, error) {
1025 objectMap := make(map[string]interface{})
1026 if clsap.LinkedStorageAccountsProperties != nil {
1027 objectMap["properties"] = clsap.LinkedStorageAccountsProperties
1028 }
1029 return json.Marshal(objectMap)
1030 }
1031
1032
1033 func (clsap *ComponentLinkedStorageAccountsPatch) UnmarshalJSON(body []byte) error {
1034 var m map[string]*json.RawMessage
1035 err := json.Unmarshal(body, &m)
1036 if err != nil {
1037 return err
1038 }
1039 for k, v := range m {
1040 switch k {
1041 case "properties":
1042 if v != nil {
1043 var linkedStorageAccountsProperties LinkedStorageAccountsProperties
1044 err = json.Unmarshal(*v, &linkedStorageAccountsProperties)
1045 if err != nil {
1046 return err
1047 }
1048 clsap.LinkedStorageAccountsProperties = &linkedStorageAccountsProperties
1049 }
1050 }
1051 }
1052
1053 return nil
1054 }
1055
1056
1057 type ComponentPurgeBody struct {
1058
1059 Table *string `json:"table,omitempty"`
1060
1061 Filters *[]ComponentPurgeBodyFilters `json:"filters,omitempty"`
1062 }
1063
1064
1065 type ComponentPurgeBodyFilters struct {
1066
1067 Column *string `json:"column,omitempty"`
1068
1069 Operator *string `json:"operator,omitempty"`
1070
1071 Value interface{} `json:"value,omitempty"`
1072
1073 Key *string `json:"key,omitempty"`
1074 }
1075
1076
1077 type ComponentPurgeResponse struct {
1078 autorest.Response `json:"-"`
1079
1080 OperationID *string `json:"operationId,omitempty"`
1081 }
1082
1083
1084 type ComponentPurgeStatusResponse struct {
1085 autorest.Response `json:"-"`
1086
1087 Status PurgeState `json:"status,omitempty"`
1088 }
1089
1090
1091 type ComponentsResource struct {
1092
1093 ID *string `json:"id,omitempty"`
1094
1095 Name *string `json:"name,omitempty"`
1096
1097 Type *string `json:"type,omitempty"`
1098
1099 Location *string `json:"location,omitempty"`
1100
1101 Tags map[string]*string `json:"tags"`
1102 }
1103
1104
1105 func (cr ComponentsResource) MarshalJSON() ([]byte, error) {
1106 objectMap := make(map[string]interface{})
1107 if cr.Location != nil {
1108 objectMap["location"] = cr.Location
1109 }
1110 if cr.Tags != nil {
1111 objectMap["tags"] = cr.Tags
1112 }
1113 return json.Marshal(objectMap)
1114 }
1115
1116
1117 type ErrorDefinition struct {
1118
1119 Code *string `json:"code,omitempty"`
1120
1121 Message *string `json:"message,omitempty"`
1122
1123 Innererror interface{} `json:"innererror,omitempty"`
1124 }
1125
1126
1127 func (ed ErrorDefinition) MarshalJSON() ([]byte, error) {
1128 objectMap := make(map[string]interface{})
1129 return json.Marshal(objectMap)
1130 }
1131
1132
1133
1134 type ErrorResponse struct {
1135
1136 Code *string `json:"code,omitempty"`
1137
1138 Message *string `json:"message,omitempty"`
1139 }
1140
1141
1142 type ErrorResponseComponents struct {
1143
1144 Error *ErrorResponseComponentsError `json:"error,omitempty"`
1145 }
1146
1147
1148
1149 type ErrorResponseComponentsError struct {
1150
1151 Code *string `json:"code,omitempty"`
1152
1153 Message *string `json:"message,omitempty"`
1154 }
1155
1156
1157 func (erc ErrorResponseComponentsError) MarshalJSON() ([]byte, error) {
1158 objectMap := make(map[string]interface{})
1159 return json.Marshal(objectMap)
1160 }
1161
1162
1163 type ErrorResponseLinkedStorage struct {
1164
1165 Error *ErrorResponseLinkedStorageError `json:"error,omitempty"`
1166 }
1167
1168
1169
1170 type ErrorResponseLinkedStorageError struct {
1171
1172 Code *string `json:"code,omitempty"`
1173
1174 Message *string `json:"message,omitempty"`
1175 }
1176
1177
1178 func (erls ErrorResponseLinkedStorageError) MarshalJSON() ([]byte, error) {
1179 objectMap := make(map[string]interface{})
1180 return json.Marshal(objectMap)
1181 }
1182
1183
1184 type InnerError struct {
1185
1186 Diagnosticcontext *string `json:"diagnosticcontext,omitempty"`
1187
1188 Time *date.Time `json:"time,omitempty"`
1189 }
1190
1191
1192 type InnerErrorTrace struct {
1193
1194 Trace *[]string `json:"trace,omitempty"`
1195 }
1196
1197
1198 func (iet InnerErrorTrace) MarshalJSON() ([]byte, error) {
1199 objectMap := make(map[string]interface{})
1200 return json.Marshal(objectMap)
1201 }
1202
1203
1204 type LinkedStorageAccountsProperties struct {
1205
1206 LinkedStorageAccount *string `json:"linkedStorageAccount,omitempty"`
1207 }
1208
1209
1210 type ListAnnotation struct {
1211 autorest.Response `json:"-"`
1212 Value *[]Annotation `json:"value,omitempty"`
1213 }
1214
1215
1216 type ListApplicationInsightsComponentAnalyticsItem struct {
1217 autorest.Response `json:"-"`
1218 Value *[]ApplicationInsightsComponentAnalyticsItem `json:"value,omitempty"`
1219 }
1220
1221
1222 type ListApplicationInsightsComponentExportConfiguration struct {
1223 autorest.Response `json:"-"`
1224 Value *[]ApplicationInsightsComponentExportConfiguration `json:"value,omitempty"`
1225 }
1226
1227
1228 type ListApplicationInsightsComponentFavorite struct {
1229 autorest.Response `json:"-"`
1230 Value *[]ApplicationInsightsComponentFavorite `json:"value,omitempty"`
1231 }
1232
1233
1234 type ListApplicationInsightsComponentProactiveDetectionConfiguration struct {
1235 autorest.Response `json:"-"`
1236 Value *[]ApplicationInsightsComponentProactiveDetectionConfiguration `json:"value,omitempty"`
1237 }
1238
1239
1240 type LiveTokenResponse struct {
1241 autorest.Response `json:"-"`
1242
1243 LiveToken *string `json:"liveToken,omitempty"`
1244 }
1245
1246
1247 func (ltr LiveTokenResponse) MarshalJSON() ([]byte, error) {
1248 objectMap := make(map[string]interface{})
1249 return json.Marshal(objectMap)
1250 }
1251
1252
1253 type ManagedServiceIdentity struct {
1254
1255 PrincipalID *uuid.UUID `json:"principalId,omitempty"`
1256
1257 TenantID *uuid.UUID `json:"tenantId,omitempty"`
1258
1259 Type ManagedServiceIdentityType `json:"type,omitempty"`
1260 UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"`
1261 }
1262
1263
1264 func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
1265 objectMap := make(map[string]interface{})
1266 if msi.Type != "" {
1267 objectMap["type"] = msi.Type
1268 }
1269 if msi.UserAssignedIdentities != nil {
1270 objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
1271 }
1272 return json.Marshal(objectMap)
1273 }
1274
1275
1276 type MyWorkbook struct {
1277 autorest.Response `json:"-"`
1278
1279 Kind Kind `json:"kind,omitempty"`
1280
1281 *MyWorkbookProperties `json:"properties,omitempty"`
1282
1283 SystemData *SystemData `json:"systemData,omitempty"`
1284
1285 Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"`
1286
1287 ID *string `json:"id,omitempty"`
1288
1289 Name *string `json:"name,omitempty"`
1290
1291 Type *string `json:"type,omitempty"`
1292
1293 Location *string `json:"location,omitempty"`
1294
1295 Tags map[string]*string `json:"tags"`
1296
1297 Etag map[string]*string `json:"etag"`
1298 }
1299
1300
1301 func (mw MyWorkbook) MarshalJSON() ([]byte, error) {
1302 objectMap := make(map[string]interface{})
1303 if mw.Kind != "" {
1304 objectMap["kind"] = mw.Kind
1305 }
1306 if mw.MyWorkbookProperties != nil {
1307 objectMap["properties"] = mw.MyWorkbookProperties
1308 }
1309 if mw.Identity != nil {
1310 objectMap["identity"] = mw.Identity
1311 }
1312 if mw.ID != nil {
1313 objectMap["id"] = mw.ID
1314 }
1315 if mw.Name != nil {
1316 objectMap["name"] = mw.Name
1317 }
1318 if mw.Type != nil {
1319 objectMap["type"] = mw.Type
1320 }
1321 if mw.Location != nil {
1322 objectMap["location"] = mw.Location
1323 }
1324 if mw.Tags != nil {
1325 objectMap["tags"] = mw.Tags
1326 }
1327 if mw.Etag != nil {
1328 objectMap["etag"] = mw.Etag
1329 }
1330 return json.Marshal(objectMap)
1331 }
1332
1333
1334 func (mw *MyWorkbook) UnmarshalJSON(body []byte) error {
1335 var m map[string]*json.RawMessage
1336 err := json.Unmarshal(body, &m)
1337 if err != nil {
1338 return err
1339 }
1340 for k, v := range m {
1341 switch k {
1342 case "kind":
1343 if v != nil {
1344 var kind Kind
1345 err = json.Unmarshal(*v, &kind)
1346 if err != nil {
1347 return err
1348 }
1349 mw.Kind = kind
1350 }
1351 case "properties":
1352 if v != nil {
1353 var myWorkbookProperties MyWorkbookProperties
1354 err = json.Unmarshal(*v, &myWorkbookProperties)
1355 if err != nil {
1356 return err
1357 }
1358 mw.MyWorkbookProperties = &myWorkbookProperties
1359 }
1360 case "systemData":
1361 if v != nil {
1362 var systemData SystemData
1363 err = json.Unmarshal(*v, &systemData)
1364 if err != nil {
1365 return err
1366 }
1367 mw.SystemData = &systemData
1368 }
1369 case "identity":
1370 if v != nil {
1371 var identity MyWorkbookManagedIdentity
1372 err = json.Unmarshal(*v, &identity)
1373 if err != nil {
1374 return err
1375 }
1376 mw.Identity = &identity
1377 }
1378 case "id":
1379 if v != nil {
1380 var ID string
1381 err = json.Unmarshal(*v, &ID)
1382 if err != nil {
1383 return err
1384 }
1385 mw.ID = &ID
1386 }
1387 case "name":
1388 if v != nil {
1389 var name string
1390 err = json.Unmarshal(*v, &name)
1391 if err != nil {
1392 return err
1393 }
1394 mw.Name = &name
1395 }
1396 case "type":
1397 if v != nil {
1398 var typeVar string
1399 err = json.Unmarshal(*v, &typeVar)
1400 if err != nil {
1401 return err
1402 }
1403 mw.Type = &typeVar
1404 }
1405 case "location":
1406 if v != nil {
1407 var location string
1408 err = json.Unmarshal(*v, &location)
1409 if err != nil {
1410 return err
1411 }
1412 mw.Location = &location
1413 }
1414 case "tags":
1415 if v != nil {
1416 var tags map[string]*string
1417 err = json.Unmarshal(*v, &tags)
1418 if err != nil {
1419 return err
1420 }
1421 mw.Tags = tags
1422 }
1423 case "etag":
1424 if v != nil {
1425 var etag map[string]*string
1426 err = json.Unmarshal(*v, &etag)
1427 if err != nil {
1428 return err
1429 }
1430 mw.Etag = etag
1431 }
1432 }
1433 }
1434
1435 return nil
1436 }
1437
1438
1439 type MyWorkbookError struct {
1440
1441 Error *ErrorDefinition `json:"error,omitempty"`
1442 }
1443
1444
1445 type MyWorkbookManagedIdentity struct {
1446 UserAssignedIdentities *MyWorkbookUserAssignedIdentities `json:"userAssignedIdentities,omitempty"`
1447
1448 Type Type `json:"type,omitempty"`
1449 }
1450
1451
1452 type MyWorkbookProperties struct {
1453
1454 DisplayName *string `json:"displayName,omitempty"`
1455
1456 SerializedData *string `json:"serializedData,omitempty"`
1457
1458 Version *string `json:"version,omitempty"`
1459
1460 TimeModified *string `json:"timeModified,omitempty"`
1461
1462 Category *string `json:"category,omitempty"`
1463
1464 Tags *[]string `json:"tags,omitempty"`
1465
1466 UserID *string `json:"userId,omitempty"`
1467
1468 SourceID *string `json:"sourceId,omitempty"`
1469
1470 StorageURI *string `json:"storageUri,omitempty"`
1471 }
1472
1473
1474 func (mwp MyWorkbookProperties) MarshalJSON() ([]byte, error) {
1475 objectMap := make(map[string]interface{})
1476 if mwp.DisplayName != nil {
1477 objectMap["displayName"] = mwp.DisplayName
1478 }
1479 if mwp.SerializedData != nil {
1480 objectMap["serializedData"] = mwp.SerializedData
1481 }
1482 if mwp.Version != nil {
1483 objectMap["version"] = mwp.Version
1484 }
1485 if mwp.Category != nil {
1486 objectMap["category"] = mwp.Category
1487 }
1488 if mwp.Tags != nil {
1489 objectMap["tags"] = mwp.Tags
1490 }
1491 if mwp.SourceID != nil {
1492 objectMap["sourceId"] = mwp.SourceID
1493 }
1494 if mwp.StorageURI != nil {
1495 objectMap["storageUri"] = mwp.StorageURI
1496 }
1497 return json.Marshal(objectMap)
1498 }
1499
1500
1501 type MyWorkbookResource struct {
1502
1503 Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"`
1504
1505 ID *string `json:"id,omitempty"`
1506
1507 Name *string `json:"name,omitempty"`
1508
1509 Type *string `json:"type,omitempty"`
1510
1511 Location *string `json:"location,omitempty"`
1512
1513 Tags map[string]*string `json:"tags"`
1514
1515 Etag map[string]*string `json:"etag"`
1516 }
1517
1518
1519 func (mwr MyWorkbookResource) MarshalJSON() ([]byte, error) {
1520 objectMap := make(map[string]interface{})
1521 if mwr.Identity != nil {
1522 objectMap["identity"] = mwr.Identity
1523 }
1524 if mwr.ID != nil {
1525 objectMap["id"] = mwr.ID
1526 }
1527 if mwr.Name != nil {
1528 objectMap["name"] = mwr.Name
1529 }
1530 if mwr.Type != nil {
1531 objectMap["type"] = mwr.Type
1532 }
1533 if mwr.Location != nil {
1534 objectMap["location"] = mwr.Location
1535 }
1536 if mwr.Tags != nil {
1537 objectMap["tags"] = mwr.Tags
1538 }
1539 if mwr.Etag != nil {
1540 objectMap["etag"] = mwr.Etag
1541 }
1542 return json.Marshal(objectMap)
1543 }
1544
1545
1546 type MyWorkbooksListResult struct {
1547 autorest.Response `json:"-"`
1548
1549 Value *[]MyWorkbook `json:"value,omitempty"`
1550 NextLink *string `json:"nextLink,omitempty"`
1551 }
1552
1553
1554 func (mwlr MyWorkbooksListResult) MarshalJSON() ([]byte, error) {
1555 objectMap := make(map[string]interface{})
1556 if mwlr.NextLink != nil {
1557 objectMap["nextLink"] = mwlr.NextLink
1558 }
1559 return json.Marshal(objectMap)
1560 }
1561
1562
1563 type MyWorkbooksListResultIterator struct {
1564 i int
1565 page MyWorkbooksListResultPage
1566 }
1567
1568
1569
1570 func (iter *MyWorkbooksListResultIterator) NextWithContext(ctx context.Context) (err error) {
1571 if tracing.IsEnabled() {
1572 ctx = tracing.StartSpan(ctx, fqdn+"/MyWorkbooksListResultIterator.NextWithContext")
1573 defer func() {
1574 sc := -1
1575 if iter.Response().Response.Response != nil {
1576 sc = iter.Response().Response.Response.StatusCode
1577 }
1578 tracing.EndSpan(ctx, sc, err)
1579 }()
1580 }
1581 iter.i++
1582 if iter.i < len(iter.page.Values()) {
1583 return nil
1584 }
1585 err = iter.page.NextWithContext(ctx)
1586 if err != nil {
1587 iter.i--
1588 return err
1589 }
1590 iter.i = 0
1591 return nil
1592 }
1593
1594
1595
1596
1597 func (iter *MyWorkbooksListResultIterator) Next() error {
1598 return iter.NextWithContext(context.Background())
1599 }
1600
1601
1602 func (iter MyWorkbooksListResultIterator) NotDone() bool {
1603 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1604 }
1605
1606
1607 func (iter MyWorkbooksListResultIterator) Response() MyWorkbooksListResult {
1608 return iter.page.Response()
1609 }
1610
1611
1612
1613 func (iter MyWorkbooksListResultIterator) Value() MyWorkbook {
1614 if !iter.page.NotDone() {
1615 return MyWorkbook{}
1616 }
1617 return iter.page.Values()[iter.i]
1618 }
1619
1620
1621 func NewMyWorkbooksListResultIterator(page MyWorkbooksListResultPage) MyWorkbooksListResultIterator {
1622 return MyWorkbooksListResultIterator{page: page}
1623 }
1624
1625
1626 func (mwlr MyWorkbooksListResult) IsEmpty() bool {
1627 return mwlr.Value == nil || len(*mwlr.Value) == 0
1628 }
1629
1630
1631 func (mwlr MyWorkbooksListResult) hasNextLink() bool {
1632 return mwlr.NextLink != nil && len(*mwlr.NextLink) != 0
1633 }
1634
1635
1636
1637 func (mwlr MyWorkbooksListResult) myWorkbooksListResultPreparer(ctx context.Context) (*http.Request, error) {
1638 if !mwlr.hasNextLink() {
1639 return nil, nil
1640 }
1641 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1642 autorest.AsJSON(),
1643 autorest.AsGet(),
1644 autorest.WithBaseURL(to.String(mwlr.NextLink)))
1645 }
1646
1647
1648 type MyWorkbooksListResultPage struct {
1649 fn func(context.Context, MyWorkbooksListResult) (MyWorkbooksListResult, error)
1650 mwlr MyWorkbooksListResult
1651 }
1652
1653
1654
1655 func (page *MyWorkbooksListResultPage) NextWithContext(ctx context.Context) (err error) {
1656 if tracing.IsEnabled() {
1657 ctx = tracing.StartSpan(ctx, fqdn+"/MyWorkbooksListResultPage.NextWithContext")
1658 defer func() {
1659 sc := -1
1660 if page.Response().Response.Response != nil {
1661 sc = page.Response().Response.Response.StatusCode
1662 }
1663 tracing.EndSpan(ctx, sc, err)
1664 }()
1665 }
1666 for {
1667 next, err := page.fn(ctx, page.mwlr)
1668 if err != nil {
1669 return err
1670 }
1671 page.mwlr = next
1672 if !next.hasNextLink() || !next.IsEmpty() {
1673 break
1674 }
1675 }
1676 return nil
1677 }
1678
1679
1680
1681
1682 func (page *MyWorkbooksListResultPage) Next() error {
1683 return page.NextWithContext(context.Background())
1684 }
1685
1686
1687 func (page MyWorkbooksListResultPage) NotDone() bool {
1688 return !page.mwlr.IsEmpty()
1689 }
1690
1691
1692 func (page MyWorkbooksListResultPage) Response() MyWorkbooksListResult {
1693 return page.mwlr
1694 }
1695
1696
1697 func (page MyWorkbooksListResultPage) Values() []MyWorkbook {
1698 if page.mwlr.IsEmpty() {
1699 return nil
1700 }
1701 return *page.mwlr.Value
1702 }
1703
1704
1705 func NewMyWorkbooksListResultPage(cur MyWorkbooksListResult, getNextPage func(context.Context, MyWorkbooksListResult) (MyWorkbooksListResult, error)) MyWorkbooksListResultPage {
1706 return MyWorkbooksListResultPage{
1707 fn: getNextPage,
1708 mwlr: cur,
1709 }
1710 }
1711
1712
1713 type MyWorkbookUserAssignedIdentities struct {
1714
1715 PrincipalID *string `json:"principalId,omitempty"`
1716
1717 TenantID *string `json:"tenantId,omitempty"`
1718 }
1719
1720
1721 func (mwuai MyWorkbookUserAssignedIdentities) MarshalJSON() ([]byte, error) {
1722 objectMap := make(map[string]interface{})
1723 return json.Marshal(objectMap)
1724 }
1725
1726
1727 type Operation struct {
1728
1729 Name *string `json:"name,omitempty"`
1730
1731 Display *OperationDisplay `json:"display,omitempty"`
1732 }
1733
1734
1735 type OperationDisplay struct {
1736
1737 Provider *string `json:"provider,omitempty"`
1738
1739 Resource *string `json:"resource,omitempty"`
1740
1741 Operation *string `json:"operation,omitempty"`
1742 }
1743
1744
1745 type OperationInfo struct {
1746
1747 Provider *string `json:"provider,omitempty"`
1748
1749 Resource *string `json:"resource,omitempty"`
1750
1751 Operation *string `json:"operation,omitempty"`
1752
1753 Description *string `json:"description,omitempty"`
1754 }
1755
1756
1757
1758 type OperationListResult struct {
1759 autorest.Response `json:"-"`
1760
1761 Value *[]Operation `json:"value,omitempty"`
1762
1763 NextLink *string `json:"nextLink,omitempty"`
1764 }
1765
1766
1767 type OperationListResultIterator struct {
1768 i int
1769 page OperationListResultPage
1770 }
1771
1772
1773
1774 func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
1775 if tracing.IsEnabled() {
1776 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
1777 defer func() {
1778 sc := -1
1779 if iter.Response().Response.Response != nil {
1780 sc = iter.Response().Response.Response.StatusCode
1781 }
1782 tracing.EndSpan(ctx, sc, err)
1783 }()
1784 }
1785 iter.i++
1786 if iter.i < len(iter.page.Values()) {
1787 return nil
1788 }
1789 err = iter.page.NextWithContext(ctx)
1790 if err != nil {
1791 iter.i--
1792 return err
1793 }
1794 iter.i = 0
1795 return nil
1796 }
1797
1798
1799
1800
1801 func (iter *OperationListResultIterator) Next() error {
1802 return iter.NextWithContext(context.Background())
1803 }
1804
1805
1806 func (iter OperationListResultIterator) NotDone() bool {
1807 return iter.page.NotDone() && iter.i < len(iter.page.Values())
1808 }
1809
1810
1811 func (iter OperationListResultIterator) Response() OperationListResult {
1812 return iter.page.Response()
1813 }
1814
1815
1816
1817 func (iter OperationListResultIterator) Value() Operation {
1818 if !iter.page.NotDone() {
1819 return Operation{}
1820 }
1821 return iter.page.Values()[iter.i]
1822 }
1823
1824
1825 func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
1826 return OperationListResultIterator{page: page}
1827 }
1828
1829
1830 func (olr OperationListResult) IsEmpty() bool {
1831 return olr.Value == nil || len(*olr.Value) == 0
1832 }
1833
1834
1835 func (olr OperationListResult) hasNextLink() bool {
1836 return olr.NextLink != nil && len(*olr.NextLink) != 0
1837 }
1838
1839
1840
1841 func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
1842 if !olr.hasNextLink() {
1843 return nil, nil
1844 }
1845 return autorest.Prepare((&http.Request{}).WithContext(ctx),
1846 autorest.AsJSON(),
1847 autorest.AsGet(),
1848 autorest.WithBaseURL(to.String(olr.NextLink)))
1849 }
1850
1851
1852 type OperationListResultPage struct {
1853 fn func(context.Context, OperationListResult) (OperationListResult, error)
1854 olr OperationListResult
1855 }
1856
1857
1858
1859 func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
1860 if tracing.IsEnabled() {
1861 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
1862 defer func() {
1863 sc := -1
1864 if page.Response().Response.Response != nil {
1865 sc = page.Response().Response.Response.StatusCode
1866 }
1867 tracing.EndSpan(ctx, sc, err)
1868 }()
1869 }
1870 for {
1871 next, err := page.fn(ctx, page.olr)
1872 if err != nil {
1873 return err
1874 }
1875 page.olr = next
1876 if !next.hasNextLink() || !next.IsEmpty() {
1877 break
1878 }
1879 }
1880 return nil
1881 }
1882
1883
1884
1885
1886 func (page *OperationListResultPage) Next() error {
1887 return page.NextWithContext(context.Background())
1888 }
1889
1890
1891 func (page OperationListResultPage) NotDone() bool {
1892 return !page.olr.IsEmpty()
1893 }
1894
1895
1896 func (page OperationListResultPage) Response() OperationListResult {
1897 return page.olr
1898 }
1899
1900
1901 func (page OperationListResultPage) Values() []Operation {
1902 if page.olr.IsEmpty() {
1903 return nil
1904 }
1905 return *page.olr.Value
1906 }
1907
1908
1909 func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
1910 return OperationListResultPage{
1911 fn: getNextPage,
1912 olr: cur,
1913 }
1914 }
1915
1916
1917 type OperationLive struct {
1918
1919 Name *string `json:"name,omitempty"`
1920
1921 IsDataAction *bool `json:"isDataAction,omitempty"`
1922
1923 Display *OperationInfo `json:"display,omitempty"`
1924
1925 Origin *string `json:"origin,omitempty"`
1926
1927 Properties interface{} `json:"properties,omitempty"`
1928 }
1929
1930
1931 type OperationsListResult struct {
1932
1933 Value *[]OperationLive `json:"value,omitempty"`
1934
1935 NextLink *string `json:"nextLink,omitempty"`
1936 }
1937
1938
1939 type PrivateLinkScopedResource struct {
1940
1941 ResourceID *string `json:"ResourceId,omitempty"`
1942
1943 ScopeID *string `json:"ScopeId,omitempty"`
1944 }
1945
1946
1947
1948 type ProxyResource struct {
1949
1950 ID *string `json:"id,omitempty"`
1951
1952 Name *string `json:"name,omitempty"`
1953
1954 Type *string `json:"type,omitempty"`
1955 }
1956
1957
1958 func (pr ProxyResource) MarshalJSON() ([]byte, error) {
1959 objectMap := make(map[string]interface{})
1960 return json.Marshal(objectMap)
1961 }
1962
1963
1964 type Resource struct {
1965
1966 ID *string `json:"id,omitempty"`
1967
1968 Name *string `json:"name,omitempty"`
1969
1970 Type *string `json:"type,omitempty"`
1971 }
1972
1973
1974 func (r Resource) MarshalJSON() ([]byte, error) {
1975 objectMap := make(map[string]interface{})
1976 return json.Marshal(objectMap)
1977 }
1978
1979
1980 type SystemData struct {
1981
1982 CreatedBy *string `json:"createdBy,omitempty"`
1983
1984 CreatedByType CreatedByType `json:"createdByType,omitempty"`
1985
1986 CreatedAt *date.Time `json:"createdAt,omitempty"`
1987
1988 LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
1989
1990 LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
1991
1992 LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
1993 }
1994
1995
1996
1997 type TagsResource struct {
1998
1999 Tags map[string]*string `json:"tags"`
2000 }
2001
2002
2003 func (tr TagsResource) MarshalJSON() ([]byte, error) {
2004 objectMap := make(map[string]interface{})
2005 if tr.Tags != nil {
2006 objectMap["tags"] = tr.Tags
2007 }
2008 return json.Marshal(objectMap)
2009 }
2010
2011
2012
2013 type TrackedResource struct {
2014
2015 Tags map[string]*string `json:"tags"`
2016
2017 Location *string `json:"location,omitempty"`
2018
2019 ID *string `json:"id,omitempty"`
2020
2021 Name *string `json:"name,omitempty"`
2022
2023 Type *string `json:"type,omitempty"`
2024 }
2025
2026
2027 func (tr TrackedResource) MarshalJSON() ([]byte, error) {
2028 objectMap := make(map[string]interface{})
2029 if tr.Tags != nil {
2030 objectMap["tags"] = tr.Tags
2031 }
2032 if tr.Location != nil {
2033 objectMap["location"] = tr.Location
2034 }
2035 return json.Marshal(objectMap)
2036 }
2037
2038
2039 type UserAssignedIdentity struct {
2040
2041 PrincipalID *uuid.UUID `json:"principalId,omitempty"`
2042
2043 ClientID *uuid.UUID `json:"clientId,omitempty"`
2044 }
2045
2046
2047 func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) {
2048 objectMap := make(map[string]interface{})
2049 return json.Marshal(objectMap)
2050 }
2051
2052
2053 type WebTest struct {
2054 autorest.Response `json:"-"`
2055
2056 Kind WebTestKind `json:"kind,omitempty"`
2057
2058 *WebTestProperties `json:"properties,omitempty"`
2059
2060 ID *string `json:"id,omitempty"`
2061
2062 Name *string `json:"name,omitempty"`
2063
2064 Type *string `json:"type,omitempty"`
2065
2066 Location *string `json:"location,omitempty"`
2067
2068 Tags map[string]*string `json:"tags"`
2069 }
2070
2071
2072 func (wt WebTest) MarshalJSON() ([]byte, error) {
2073 objectMap := make(map[string]interface{})
2074 if wt.Kind != "" {
2075 objectMap["kind"] = wt.Kind
2076 }
2077 if wt.WebTestProperties != nil {
2078 objectMap["properties"] = wt.WebTestProperties
2079 }
2080 if wt.Location != nil {
2081 objectMap["location"] = wt.Location
2082 }
2083 if wt.Tags != nil {
2084 objectMap["tags"] = wt.Tags
2085 }
2086 return json.Marshal(objectMap)
2087 }
2088
2089
2090 func (wt *WebTest) UnmarshalJSON(body []byte) error {
2091 var m map[string]*json.RawMessage
2092 err := json.Unmarshal(body, &m)
2093 if err != nil {
2094 return err
2095 }
2096 for k, v := range m {
2097 switch k {
2098 case "kind":
2099 if v != nil {
2100 var kind WebTestKind
2101 err = json.Unmarshal(*v, &kind)
2102 if err != nil {
2103 return err
2104 }
2105 wt.Kind = kind
2106 }
2107 case "properties":
2108 if v != nil {
2109 var webTestProperties WebTestProperties
2110 err = json.Unmarshal(*v, &webTestProperties)
2111 if err != nil {
2112 return err
2113 }
2114 wt.WebTestProperties = &webTestProperties
2115 }
2116 case "id":
2117 if v != nil {
2118 var ID string
2119 err = json.Unmarshal(*v, &ID)
2120 if err != nil {
2121 return err
2122 }
2123 wt.ID = &ID
2124 }
2125 case "name":
2126 if v != nil {
2127 var name string
2128 err = json.Unmarshal(*v, &name)
2129 if err != nil {
2130 return err
2131 }
2132 wt.Name = &name
2133 }
2134 case "type":
2135 if v != nil {
2136 var typeVar string
2137 err = json.Unmarshal(*v, &typeVar)
2138 if err != nil {
2139 return err
2140 }
2141 wt.Type = &typeVar
2142 }
2143 case "location":
2144 if v != nil {
2145 var location string
2146 err = json.Unmarshal(*v, &location)
2147 if err != nil {
2148 return err
2149 }
2150 wt.Location = &location
2151 }
2152 case "tags":
2153 if v != nil {
2154 var tags map[string]*string
2155 err = json.Unmarshal(*v, &tags)
2156 if err != nil {
2157 return err
2158 }
2159 wt.Tags = tags
2160 }
2161 }
2162 }
2163
2164 return nil
2165 }
2166
2167
2168
2169 type WebTestGeolocation struct {
2170
2171 Location *string `json:"Id,omitempty"`
2172 }
2173
2174
2175 type WebTestListResult struct {
2176 autorest.Response `json:"-"`
2177
2178 Value *[]WebTest `json:"value,omitempty"`
2179
2180 NextLink *string `json:"nextLink,omitempty"`
2181 }
2182
2183
2184 type WebTestListResultIterator struct {
2185 i int
2186 page WebTestListResultPage
2187 }
2188
2189
2190
2191 func (iter *WebTestListResultIterator) NextWithContext(ctx context.Context) (err error) {
2192 if tracing.IsEnabled() {
2193 ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultIterator.NextWithContext")
2194 defer func() {
2195 sc := -1
2196 if iter.Response().Response.Response != nil {
2197 sc = iter.Response().Response.Response.StatusCode
2198 }
2199 tracing.EndSpan(ctx, sc, err)
2200 }()
2201 }
2202 iter.i++
2203 if iter.i < len(iter.page.Values()) {
2204 return nil
2205 }
2206 err = iter.page.NextWithContext(ctx)
2207 if err != nil {
2208 iter.i--
2209 return err
2210 }
2211 iter.i = 0
2212 return nil
2213 }
2214
2215
2216
2217
2218 func (iter *WebTestListResultIterator) Next() error {
2219 return iter.NextWithContext(context.Background())
2220 }
2221
2222
2223 func (iter WebTestListResultIterator) NotDone() bool {
2224 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2225 }
2226
2227
2228 func (iter WebTestListResultIterator) Response() WebTestListResult {
2229 return iter.page.Response()
2230 }
2231
2232
2233
2234 func (iter WebTestListResultIterator) Value() WebTest {
2235 if !iter.page.NotDone() {
2236 return WebTest{}
2237 }
2238 return iter.page.Values()[iter.i]
2239 }
2240
2241
2242 func NewWebTestListResultIterator(page WebTestListResultPage) WebTestListResultIterator {
2243 return WebTestListResultIterator{page: page}
2244 }
2245
2246
2247 func (wtlr WebTestListResult) IsEmpty() bool {
2248 return wtlr.Value == nil || len(*wtlr.Value) == 0
2249 }
2250
2251
2252 func (wtlr WebTestListResult) hasNextLink() bool {
2253 return wtlr.NextLink != nil && len(*wtlr.NextLink) != 0
2254 }
2255
2256
2257
2258 func (wtlr WebTestListResult) webTestListResultPreparer(ctx context.Context) (*http.Request, error) {
2259 if !wtlr.hasNextLink() {
2260 return nil, nil
2261 }
2262 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2263 autorest.AsJSON(),
2264 autorest.AsGet(),
2265 autorest.WithBaseURL(to.String(wtlr.NextLink)))
2266 }
2267
2268
2269 type WebTestListResultPage struct {
2270 fn func(context.Context, WebTestListResult) (WebTestListResult, error)
2271 wtlr WebTestListResult
2272 }
2273
2274
2275
2276 func (page *WebTestListResultPage) NextWithContext(ctx context.Context) (err error) {
2277 if tracing.IsEnabled() {
2278 ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultPage.NextWithContext")
2279 defer func() {
2280 sc := -1
2281 if page.Response().Response.Response != nil {
2282 sc = page.Response().Response.Response.StatusCode
2283 }
2284 tracing.EndSpan(ctx, sc, err)
2285 }()
2286 }
2287 for {
2288 next, err := page.fn(ctx, page.wtlr)
2289 if err != nil {
2290 return err
2291 }
2292 page.wtlr = next
2293 if !next.hasNextLink() || !next.IsEmpty() {
2294 break
2295 }
2296 }
2297 return nil
2298 }
2299
2300
2301
2302
2303 func (page *WebTestListResultPage) Next() error {
2304 return page.NextWithContext(context.Background())
2305 }
2306
2307
2308 func (page WebTestListResultPage) NotDone() bool {
2309 return !page.wtlr.IsEmpty()
2310 }
2311
2312
2313 func (page WebTestListResultPage) Response() WebTestListResult {
2314 return page.wtlr
2315 }
2316
2317
2318 func (page WebTestListResultPage) Values() []WebTest {
2319 if page.wtlr.IsEmpty() {
2320 return nil
2321 }
2322 return *page.wtlr.Value
2323 }
2324
2325
2326 func NewWebTestListResultPage(cur WebTestListResult, getNextPage func(context.Context, WebTestListResult) (WebTestListResult, error)) WebTestListResultPage {
2327 return WebTestListResultPage{
2328 fn: getNextPage,
2329 wtlr: cur,
2330 }
2331 }
2332
2333
2334 type WebTestProperties struct {
2335
2336 SyntheticMonitorID *string `json:"SyntheticMonitorId,omitempty"`
2337
2338 WebTestName *string `json:"Name,omitempty"`
2339
2340 Description *string `json:"Description,omitempty"`
2341
2342 Enabled *bool `json:"Enabled,omitempty"`
2343
2344 Frequency *int32 `json:"Frequency,omitempty"`
2345
2346 Timeout *int32 `json:"Timeout,omitempty"`
2347
2348 WebTestKind WebTestKind `json:"Kind,omitempty"`
2349
2350 RetryEnabled *bool `json:"RetryEnabled,omitempty"`
2351
2352 Locations *[]WebTestGeolocation `json:"Locations,omitempty"`
2353
2354 Configuration *WebTestPropertiesConfiguration `json:"Configuration,omitempty"`
2355
2356 ProvisioningState *string `json:"provisioningState,omitempty"`
2357 }
2358
2359
2360 func (wtp WebTestProperties) MarshalJSON() ([]byte, error) {
2361 objectMap := make(map[string]interface{})
2362 if wtp.SyntheticMonitorID != nil {
2363 objectMap["SyntheticMonitorId"] = wtp.SyntheticMonitorID
2364 }
2365 if wtp.WebTestName != nil {
2366 objectMap["Name"] = wtp.WebTestName
2367 }
2368 if wtp.Description != nil {
2369 objectMap["Description"] = wtp.Description
2370 }
2371 if wtp.Enabled != nil {
2372 objectMap["Enabled"] = wtp.Enabled
2373 }
2374 if wtp.Frequency != nil {
2375 objectMap["Frequency"] = wtp.Frequency
2376 }
2377 if wtp.Timeout != nil {
2378 objectMap["Timeout"] = wtp.Timeout
2379 }
2380 if wtp.WebTestKind != "" {
2381 objectMap["Kind"] = wtp.WebTestKind
2382 }
2383 if wtp.RetryEnabled != nil {
2384 objectMap["RetryEnabled"] = wtp.RetryEnabled
2385 }
2386 if wtp.Locations != nil {
2387 objectMap["Locations"] = wtp.Locations
2388 }
2389 if wtp.Configuration != nil {
2390 objectMap["Configuration"] = wtp.Configuration
2391 }
2392 return json.Marshal(objectMap)
2393 }
2394
2395
2396 type WebTestPropertiesConfiguration struct {
2397
2398 WebTest *string `json:"WebTest,omitempty"`
2399 }
2400
2401
2402 type WebtestsResource struct {
2403
2404 ID *string `json:"id,omitempty"`
2405
2406 Name *string `json:"name,omitempty"`
2407
2408 Type *string `json:"type,omitempty"`
2409
2410 Location *string `json:"location,omitempty"`
2411
2412 Tags map[string]*string `json:"tags"`
2413 }
2414
2415
2416 func (wr WebtestsResource) MarshalJSON() ([]byte, error) {
2417 objectMap := make(map[string]interface{})
2418 if wr.Location != nil {
2419 objectMap["location"] = wr.Location
2420 }
2421 if wr.Tags != nil {
2422 objectMap["tags"] = wr.Tags
2423 }
2424 return json.Marshal(objectMap)
2425 }
2426
2427
2428 type Workbook struct {
2429 autorest.Response `json:"-"`
2430
2431 *WorkbookProperties `json:"properties,omitempty"`
2432
2433 SystemData *SystemData `json:"systemData,omitempty"`
2434
2435 Identity *WorkbookResourceIdentity `json:"identity,omitempty"`
2436
2437 Kind Kind `json:"kind,omitempty"`
2438
2439 Etag map[string]*string `json:"etag"`
2440
2441 Tags map[string]*string `json:"tags"`
2442
2443 Location *string `json:"location,omitempty"`
2444
2445 ID *string `json:"id,omitempty"`
2446
2447 Name *string `json:"name,omitempty"`
2448
2449 Type *string `json:"type,omitempty"`
2450 }
2451
2452
2453 func (w Workbook) MarshalJSON() ([]byte, error) {
2454 objectMap := make(map[string]interface{})
2455 if w.WorkbookProperties != nil {
2456 objectMap["properties"] = w.WorkbookProperties
2457 }
2458 if w.Identity != nil {
2459 objectMap["identity"] = w.Identity
2460 }
2461 if w.Kind != "" {
2462 objectMap["kind"] = w.Kind
2463 }
2464 if w.Etag != nil {
2465 objectMap["etag"] = w.Etag
2466 }
2467 if w.Tags != nil {
2468 objectMap["tags"] = w.Tags
2469 }
2470 if w.Location != nil {
2471 objectMap["location"] = w.Location
2472 }
2473 return json.Marshal(objectMap)
2474 }
2475
2476
2477 func (w *Workbook) UnmarshalJSON(body []byte) error {
2478 var m map[string]*json.RawMessage
2479 err := json.Unmarshal(body, &m)
2480 if err != nil {
2481 return err
2482 }
2483 for k, v := range m {
2484 switch k {
2485 case "properties":
2486 if v != nil {
2487 var workbookProperties WorkbookProperties
2488 err = json.Unmarshal(*v, &workbookProperties)
2489 if err != nil {
2490 return err
2491 }
2492 w.WorkbookProperties = &workbookProperties
2493 }
2494 case "systemData":
2495 if v != nil {
2496 var systemData SystemData
2497 err = json.Unmarshal(*v, &systemData)
2498 if err != nil {
2499 return err
2500 }
2501 w.SystemData = &systemData
2502 }
2503 case "identity":
2504 if v != nil {
2505 var identity WorkbookResourceIdentity
2506 err = json.Unmarshal(*v, &identity)
2507 if err != nil {
2508 return err
2509 }
2510 w.Identity = &identity
2511 }
2512 case "kind":
2513 if v != nil {
2514 var kind Kind
2515 err = json.Unmarshal(*v, &kind)
2516 if err != nil {
2517 return err
2518 }
2519 w.Kind = kind
2520 }
2521 case "etag":
2522 if v != nil {
2523 var etag map[string]*string
2524 err = json.Unmarshal(*v, &etag)
2525 if err != nil {
2526 return err
2527 }
2528 w.Etag = etag
2529 }
2530 case "tags":
2531 if v != nil {
2532 var tags map[string]*string
2533 err = json.Unmarshal(*v, &tags)
2534 if err != nil {
2535 return err
2536 }
2537 w.Tags = tags
2538 }
2539 case "location":
2540 if v != nil {
2541 var location string
2542 err = json.Unmarshal(*v, &location)
2543 if err != nil {
2544 return err
2545 }
2546 w.Location = &location
2547 }
2548 case "id":
2549 if v != nil {
2550 var ID string
2551 err = json.Unmarshal(*v, &ID)
2552 if err != nil {
2553 return err
2554 }
2555 w.ID = &ID
2556 }
2557 case "name":
2558 if v != nil {
2559 var name string
2560 err = json.Unmarshal(*v, &name)
2561 if err != nil {
2562 return err
2563 }
2564 w.Name = &name
2565 }
2566 case "type":
2567 if v != nil {
2568 var typeVar string
2569 err = json.Unmarshal(*v, &typeVar)
2570 if err != nil {
2571 return err
2572 }
2573 w.Type = &typeVar
2574 }
2575 }
2576 }
2577
2578 return nil
2579 }
2580
2581
2582 type WorkbookError struct {
2583
2584 Error *WorkbookErrorDefinition `json:"error,omitempty"`
2585 }
2586
2587
2588 type WorkbookErrorDefinition struct {
2589
2590 Code *string `json:"code,omitempty"`
2591
2592 Message *string `json:"message,omitempty"`
2593
2594 InnerError interface{} `json:"innerError,omitempty"`
2595 }
2596
2597
2598 func (wed WorkbookErrorDefinition) MarshalJSON() ([]byte, error) {
2599 objectMap := make(map[string]interface{})
2600 return json.Marshal(objectMap)
2601 }
2602
2603
2604 type WorkbookInnerErrorTrace struct {
2605
2606 Trace *[]string `json:"trace,omitempty"`
2607 }
2608
2609
2610 func (wiet WorkbookInnerErrorTrace) MarshalJSON() ([]byte, error) {
2611 objectMap := make(map[string]interface{})
2612 return json.Marshal(objectMap)
2613 }
2614
2615
2616 type WorkbookProperties struct {
2617
2618 DisplayName *string `json:"displayName,omitempty"`
2619
2620 SerializedData *string `json:"serializedData,omitempty"`
2621
2622 Version *string `json:"version,omitempty"`
2623
2624 TimeModified *date.Time `json:"timeModified,omitempty"`
2625
2626 Category *string `json:"category,omitempty"`
2627
2628 Tags *[]string `json:"tags,omitempty"`
2629
2630 UserID *string `json:"userId,omitempty"`
2631
2632 SourceID *string `json:"sourceId,omitempty"`
2633
2634 StorageURI *string `json:"storageUri,omitempty"`
2635
2636 Description *string `json:"description,omitempty"`
2637
2638 Revision *string `json:"revision,omitempty"`
2639 }
2640
2641
2642 func (wp WorkbookProperties) MarshalJSON() ([]byte, error) {
2643 objectMap := make(map[string]interface{})
2644 if wp.DisplayName != nil {
2645 objectMap["displayName"] = wp.DisplayName
2646 }
2647 if wp.SerializedData != nil {
2648 objectMap["serializedData"] = wp.SerializedData
2649 }
2650 if wp.Version != nil {
2651 objectMap["version"] = wp.Version
2652 }
2653 if wp.Category != nil {
2654 objectMap["category"] = wp.Category
2655 }
2656 if wp.Tags != nil {
2657 objectMap["tags"] = wp.Tags
2658 }
2659 if wp.SourceID != nil {
2660 objectMap["sourceId"] = wp.SourceID
2661 }
2662 if wp.StorageURI != nil {
2663 objectMap["storageUri"] = wp.StorageURI
2664 }
2665 if wp.Description != nil {
2666 objectMap["description"] = wp.Description
2667 }
2668 return json.Marshal(objectMap)
2669 }
2670
2671
2672 type WorkbookPropertiesUpdateParameters struct {
2673
2674 DisplayName *string `json:"displayName,omitempty"`
2675
2676 SerializedData *string `json:"serializedData,omitempty"`
2677
2678 Category *string `json:"category,omitempty"`
2679
2680 Tags *[]string `json:"tags,omitempty"`
2681
2682 Description *string `json:"description,omitempty"`
2683
2684 Revision *string `json:"revision,omitempty"`
2685 }
2686
2687
2688 type WorkbookResource struct {
2689
2690 Identity *WorkbookResourceIdentity `json:"identity,omitempty"`
2691
2692 Kind Kind `json:"kind,omitempty"`
2693
2694 Etag map[string]*string `json:"etag"`
2695
2696 Tags map[string]*string `json:"tags"`
2697
2698 Location *string `json:"location,omitempty"`
2699
2700 ID *string `json:"id,omitempty"`
2701
2702 Name *string `json:"name,omitempty"`
2703
2704 Type *string `json:"type,omitempty"`
2705 }
2706
2707
2708 func (wr WorkbookResource) MarshalJSON() ([]byte, error) {
2709 objectMap := make(map[string]interface{})
2710 if wr.Identity != nil {
2711 objectMap["identity"] = wr.Identity
2712 }
2713 if wr.Kind != "" {
2714 objectMap["kind"] = wr.Kind
2715 }
2716 if wr.Etag != nil {
2717 objectMap["etag"] = wr.Etag
2718 }
2719 if wr.Tags != nil {
2720 objectMap["tags"] = wr.Tags
2721 }
2722 if wr.Location != nil {
2723 objectMap["location"] = wr.Location
2724 }
2725 return json.Marshal(objectMap)
2726 }
2727
2728
2729 type WorkbookResourceIdentity struct {
2730
2731 PrincipalID *uuid.UUID `json:"principalId,omitempty"`
2732
2733 TenantID *uuid.UUID `json:"tenantId,omitempty"`
2734
2735 Type ManagedServiceIdentityType `json:"type,omitempty"`
2736 UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"`
2737 }
2738
2739
2740 func (wr WorkbookResourceIdentity) MarshalJSON() ([]byte, error) {
2741 objectMap := make(map[string]interface{})
2742 if wr.Type != "" {
2743 objectMap["type"] = wr.Type
2744 }
2745 if wr.UserAssignedIdentities != nil {
2746 objectMap["userAssignedIdentities"] = wr.UserAssignedIdentities
2747 }
2748 return json.Marshal(objectMap)
2749 }
2750
2751
2752 type WorkbooksListResult struct {
2753 autorest.Response `json:"-"`
2754
2755 Value *[]Workbook `json:"value,omitempty"`
2756 NextLink *string `json:"nextLink,omitempty"`
2757 }
2758
2759
2760 func (wlr WorkbooksListResult) MarshalJSON() ([]byte, error) {
2761 objectMap := make(map[string]interface{})
2762 if wlr.NextLink != nil {
2763 objectMap["nextLink"] = wlr.NextLink
2764 }
2765 return json.Marshal(objectMap)
2766 }
2767
2768
2769 type WorkbooksListResultIterator struct {
2770 i int
2771 page WorkbooksListResultPage
2772 }
2773
2774
2775
2776 func (iter *WorkbooksListResultIterator) NextWithContext(ctx context.Context) (err error) {
2777 if tracing.IsEnabled() {
2778 ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksListResultIterator.NextWithContext")
2779 defer func() {
2780 sc := -1
2781 if iter.Response().Response.Response != nil {
2782 sc = iter.Response().Response.Response.StatusCode
2783 }
2784 tracing.EndSpan(ctx, sc, err)
2785 }()
2786 }
2787 iter.i++
2788 if iter.i < len(iter.page.Values()) {
2789 return nil
2790 }
2791 err = iter.page.NextWithContext(ctx)
2792 if err != nil {
2793 iter.i--
2794 return err
2795 }
2796 iter.i = 0
2797 return nil
2798 }
2799
2800
2801
2802
2803 func (iter *WorkbooksListResultIterator) Next() error {
2804 return iter.NextWithContext(context.Background())
2805 }
2806
2807
2808 func (iter WorkbooksListResultIterator) NotDone() bool {
2809 return iter.page.NotDone() && iter.i < len(iter.page.Values())
2810 }
2811
2812
2813 func (iter WorkbooksListResultIterator) Response() WorkbooksListResult {
2814 return iter.page.Response()
2815 }
2816
2817
2818
2819 func (iter WorkbooksListResultIterator) Value() Workbook {
2820 if !iter.page.NotDone() {
2821 return Workbook{}
2822 }
2823 return iter.page.Values()[iter.i]
2824 }
2825
2826
2827 func NewWorkbooksListResultIterator(page WorkbooksListResultPage) WorkbooksListResultIterator {
2828 return WorkbooksListResultIterator{page: page}
2829 }
2830
2831
2832 func (wlr WorkbooksListResult) IsEmpty() bool {
2833 return wlr.Value == nil || len(*wlr.Value) == 0
2834 }
2835
2836
2837 func (wlr WorkbooksListResult) hasNextLink() bool {
2838 return wlr.NextLink != nil && len(*wlr.NextLink) != 0
2839 }
2840
2841
2842
2843 func (wlr WorkbooksListResult) workbooksListResultPreparer(ctx context.Context) (*http.Request, error) {
2844 if !wlr.hasNextLink() {
2845 return nil, nil
2846 }
2847 return autorest.Prepare((&http.Request{}).WithContext(ctx),
2848 autorest.AsJSON(),
2849 autorest.AsGet(),
2850 autorest.WithBaseURL(to.String(wlr.NextLink)))
2851 }
2852
2853
2854 type WorkbooksListResultPage struct {
2855 fn func(context.Context, WorkbooksListResult) (WorkbooksListResult, error)
2856 wlr WorkbooksListResult
2857 }
2858
2859
2860
2861 func (page *WorkbooksListResultPage) NextWithContext(ctx context.Context) (err error) {
2862 if tracing.IsEnabled() {
2863 ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksListResultPage.NextWithContext")
2864 defer func() {
2865 sc := -1
2866 if page.Response().Response.Response != nil {
2867 sc = page.Response().Response.Response.StatusCode
2868 }
2869 tracing.EndSpan(ctx, sc, err)
2870 }()
2871 }
2872 for {
2873 next, err := page.fn(ctx, page.wlr)
2874 if err != nil {
2875 return err
2876 }
2877 page.wlr = next
2878 if !next.hasNextLink() || !next.IsEmpty() {
2879 break
2880 }
2881 }
2882 return nil
2883 }
2884
2885
2886
2887
2888 func (page *WorkbooksListResultPage) Next() error {
2889 return page.NextWithContext(context.Background())
2890 }
2891
2892
2893 func (page WorkbooksListResultPage) NotDone() bool {
2894 return !page.wlr.IsEmpty()
2895 }
2896
2897
2898 func (page WorkbooksListResultPage) Response() WorkbooksListResult {
2899 return page.wlr
2900 }
2901
2902
2903 func (page WorkbooksListResultPage) Values() []Workbook {
2904 if page.wlr.IsEmpty() {
2905 return nil
2906 }
2907 return *page.wlr.Value
2908 }
2909
2910
2911 func NewWorkbooksListResultPage(cur WorkbooksListResult, getNextPage func(context.Context, WorkbooksListResult) (WorkbooksListResult, error)) WorkbooksListResultPage {
2912 return WorkbooksListResultPage{
2913 fn: getNextPage,
2914 wlr: cur,
2915 }
2916 }
2917
2918
2919 type WorkbookTemplate struct {
2920 autorest.Response `json:"-"`
2921
2922 *WorkbookTemplateProperties `json:"properties,omitempty"`
2923
2924 ID *string `json:"id,omitempty"`
2925
2926 Name *string `json:"name,omitempty"`
2927
2928 Type *string `json:"type,omitempty"`
2929
2930 Location *string `json:"location,omitempty"`
2931
2932 Tags map[string]*string `json:"tags"`
2933 }
2934
2935
2936 func (wt WorkbookTemplate) MarshalJSON() ([]byte, error) {
2937 objectMap := make(map[string]interface{})
2938 if wt.WorkbookTemplateProperties != nil {
2939 objectMap["properties"] = wt.WorkbookTemplateProperties
2940 }
2941 if wt.Location != nil {
2942 objectMap["location"] = wt.Location
2943 }
2944 if wt.Tags != nil {
2945 objectMap["tags"] = wt.Tags
2946 }
2947 return json.Marshal(objectMap)
2948 }
2949
2950
2951 func (wt *WorkbookTemplate) UnmarshalJSON(body []byte) error {
2952 var m map[string]*json.RawMessage
2953 err := json.Unmarshal(body, &m)
2954 if err != nil {
2955 return err
2956 }
2957 for k, v := range m {
2958 switch k {
2959 case "properties":
2960 if v != nil {
2961 var workbookTemplateProperties WorkbookTemplateProperties
2962 err = json.Unmarshal(*v, &workbookTemplateProperties)
2963 if err != nil {
2964 return err
2965 }
2966 wt.WorkbookTemplateProperties = &workbookTemplateProperties
2967 }
2968 case "id":
2969 if v != nil {
2970 var ID string
2971 err = json.Unmarshal(*v, &ID)
2972 if err != nil {
2973 return err
2974 }
2975 wt.ID = &ID
2976 }
2977 case "name":
2978 if v != nil {
2979 var name string
2980 err = json.Unmarshal(*v, &name)
2981 if err != nil {
2982 return err
2983 }
2984 wt.Name = &name
2985 }
2986 case "type":
2987 if v != nil {
2988 var typeVar string
2989 err = json.Unmarshal(*v, &typeVar)
2990 if err != nil {
2991 return err
2992 }
2993 wt.Type = &typeVar
2994 }
2995 case "location":
2996 if v != nil {
2997 var location string
2998 err = json.Unmarshal(*v, &location)
2999 if err != nil {
3000 return err
3001 }
3002 wt.Location = &location
3003 }
3004 case "tags":
3005 if v != nil {
3006 var tags map[string]*string
3007 err = json.Unmarshal(*v, &tags)
3008 if err != nil {
3009 return err
3010 }
3011 wt.Tags = tags
3012 }
3013 }
3014 }
3015
3016 return nil
3017 }
3018
3019
3020 type WorkbookTemplateError struct {
3021
3022 Error *WorkbookTemplateErrorBody `json:"error,omitempty"`
3023 }
3024
3025
3026 type WorkbookTemplateErrorBody struct {
3027
3028 Code *string `json:"code,omitempty"`
3029
3030 Message *string `json:"message,omitempty"`
3031
3032 Details *[]WorkbookTemplateErrorFieldContract `json:"details,omitempty"`
3033 }
3034
3035
3036 type WorkbookTemplateErrorFieldContract struct {
3037
3038 Code *string `json:"code,omitempty"`
3039
3040 Message *string `json:"message,omitempty"`
3041
3042 Target *string `json:"target,omitempty"`
3043 }
3044
3045
3046 type WorkbookTemplateGallery struct {
3047
3048 Name *string `json:"name,omitempty"`
3049
3050 Category *string `json:"category,omitempty"`
3051
3052 Type *string `json:"type,omitempty"`
3053
3054 Order *int32 `json:"order,omitempty"`
3055
3056 ResourceType *string `json:"resourceType,omitempty"`
3057 }
3058
3059
3060 type WorkbookTemplateLocalizedGallery struct {
3061
3062 TemplateData interface{} `json:"templateData,omitempty"`
3063
3064 Galleries *[]WorkbookTemplateGallery `json:"galleries,omitempty"`
3065 }
3066
3067
3068 type WorkbookTemplateProperties struct {
3069
3070 Priority *int32 `json:"priority,omitempty"`
3071
3072 Author *string `json:"author,omitempty"`
3073
3074 TemplateData interface{} `json:"templateData,omitempty"`
3075
3076 Galleries *[]WorkbookTemplateGallery `json:"galleries,omitempty"`
3077
3078 Localized map[string][]WorkbookTemplateLocalizedGallery `json:"localized"`
3079 }
3080
3081
3082 func (wtp WorkbookTemplateProperties) MarshalJSON() ([]byte, error) {
3083 objectMap := make(map[string]interface{})
3084 if wtp.Priority != nil {
3085 objectMap["priority"] = wtp.Priority
3086 }
3087 if wtp.Author != nil {
3088 objectMap["author"] = wtp.Author
3089 }
3090 if wtp.TemplateData != nil {
3091 objectMap["templateData"] = wtp.TemplateData
3092 }
3093 if wtp.Galleries != nil {
3094 objectMap["galleries"] = wtp.Galleries
3095 }
3096 if wtp.Localized != nil {
3097 objectMap["localized"] = wtp.Localized
3098 }
3099 return json.Marshal(objectMap)
3100 }
3101
3102
3103 type WorkbookTemplateResource struct {
3104
3105 ID *string `json:"id,omitempty"`
3106
3107 Name *string `json:"name,omitempty"`
3108
3109 Type *string `json:"type,omitempty"`
3110
3111 Location *string `json:"location,omitempty"`
3112
3113 Tags map[string]*string `json:"tags"`
3114 }
3115
3116
3117 func (wtr WorkbookTemplateResource) MarshalJSON() ([]byte, error) {
3118 objectMap := make(map[string]interface{})
3119 if wtr.Location != nil {
3120 objectMap["location"] = wtr.Location
3121 }
3122 if wtr.Tags != nil {
3123 objectMap["tags"] = wtr.Tags
3124 }
3125 return json.Marshal(objectMap)
3126 }
3127
3128
3129 type WorkbookTemplatesListResult struct {
3130 autorest.Response `json:"-"`
3131
3132 Value *[]WorkbookTemplate `json:"value,omitempty"`
3133 }
3134
3135
3136 type WorkbookTemplateUpdateParameters struct {
3137
3138 Tags map[string]*string `json:"tags"`
3139
3140 *WorkbookTemplateProperties `json:"properties,omitempty"`
3141 }
3142
3143
3144 func (wtup WorkbookTemplateUpdateParameters) MarshalJSON() ([]byte, error) {
3145 objectMap := make(map[string]interface{})
3146 if wtup.Tags != nil {
3147 objectMap["tags"] = wtup.Tags
3148 }
3149 if wtup.WorkbookTemplateProperties != nil {
3150 objectMap["properties"] = wtup.WorkbookTemplateProperties
3151 }
3152 return json.Marshal(objectMap)
3153 }
3154
3155
3156 func (wtup *WorkbookTemplateUpdateParameters) UnmarshalJSON(body []byte) error {
3157 var m map[string]*json.RawMessage
3158 err := json.Unmarshal(body, &m)
3159 if err != nil {
3160 return err
3161 }
3162 for k, v := range m {
3163 switch k {
3164 case "tags":
3165 if v != nil {
3166 var tags map[string]*string
3167 err = json.Unmarshal(*v, &tags)
3168 if err != nil {
3169 return err
3170 }
3171 wtup.Tags = tags
3172 }
3173 case "properties":
3174 if v != nil {
3175 var workbookTemplateProperties WorkbookTemplateProperties
3176 err = json.Unmarshal(*v, &workbookTemplateProperties)
3177 if err != nil {
3178 return err
3179 }
3180 wtup.WorkbookTemplateProperties = &workbookTemplateProperties
3181 }
3182 }
3183 }
3184
3185 return nil
3186 }
3187
3188
3189
3190 type WorkbookUpdateParameters struct {
3191
3192 Kind SharedTypeKind `json:"kind,omitempty"`
3193
3194 Tags map[string]*string `json:"tags"`
3195
3196 *WorkbookPropertiesUpdateParameters `json:"properties,omitempty"`
3197 }
3198
3199
3200 func (wup WorkbookUpdateParameters) MarshalJSON() ([]byte, error) {
3201 objectMap := make(map[string]interface{})
3202 if wup.Kind != "" {
3203 objectMap["kind"] = wup.Kind
3204 }
3205 if wup.Tags != nil {
3206 objectMap["tags"] = wup.Tags
3207 }
3208 if wup.WorkbookPropertiesUpdateParameters != nil {
3209 objectMap["properties"] = wup.WorkbookPropertiesUpdateParameters
3210 }
3211 return json.Marshal(objectMap)
3212 }
3213
3214
3215 func (wup *WorkbookUpdateParameters) UnmarshalJSON(body []byte) error {
3216 var m map[string]*json.RawMessage
3217 err := json.Unmarshal(body, &m)
3218 if err != nil {
3219 return err
3220 }
3221 for k, v := range m {
3222 switch k {
3223 case "kind":
3224 if v != nil {
3225 var kind SharedTypeKind
3226 err = json.Unmarshal(*v, &kind)
3227 if err != nil {
3228 return err
3229 }
3230 wup.Kind = kind
3231 }
3232 case "tags":
3233 if v != nil {
3234 var tags map[string]*string
3235 err = json.Unmarshal(*v, &tags)
3236 if err != nil {
3237 return err
3238 }
3239 wup.Tags = tags
3240 }
3241 case "properties":
3242 if v != nil {
3243 var workbookPropertiesUpdateParameters WorkbookPropertiesUpdateParameters
3244 err = json.Unmarshal(*v, &workbookPropertiesUpdateParameters)
3245 if err != nil {
3246 return err
3247 }
3248 wup.WorkbookPropertiesUpdateParameters = &workbookPropertiesUpdateParameters
3249 }
3250 }
3251 }
3252
3253 return nil
3254 }
3255
3256
3257 type WorkItemConfiguration struct {
3258 autorest.Response `json:"-"`
3259
3260 ConnectorID *string `json:"ConnectorId,omitempty"`
3261
3262 ConfigDisplayName *string `json:"ConfigDisplayName,omitempty"`
3263
3264 IsDefault *bool `json:"IsDefault,omitempty"`
3265
3266 ID *string `json:"Id,omitempty"`
3267
3268 ConfigProperties *string `json:"ConfigProperties,omitempty"`
3269 }
3270
3271
3272 type WorkItemConfigurationError struct {
3273
3274 Code *string `json:"code,omitempty"`
3275
3276 Message *string `json:"message,omitempty"`
3277 Innererror *InnerError `json:"innererror,omitempty"`
3278 }
3279
3280
3281 type WorkItemConfigurationsListResult struct {
3282 autorest.Response `json:"-"`
3283
3284 Value *[]WorkItemConfiguration `json:"value,omitempty"`
3285 }
3286
3287
3288 func (wiclr WorkItemConfigurationsListResult) MarshalJSON() ([]byte, error) {
3289 objectMap := make(map[string]interface{})
3290 return json.Marshal(objectMap)
3291 }
3292
3293
3294 type WorkItemCreateConfiguration struct {
3295
3296 ConnectorID *string `json:"ConnectorId,omitempty"`
3297
3298 ConnectorDataConfiguration *string `json:"ConnectorDataConfiguration,omitempty"`
3299
3300 ValidateOnly *bool `json:"ValidateOnly,omitempty"`
3301
3302 WorkItemProperties map[string]*string `json:"WorkItemProperties"`
3303 }
3304
3305
3306 func (wicc WorkItemCreateConfiguration) MarshalJSON() ([]byte, error) {
3307 objectMap := make(map[string]interface{})
3308 if wicc.ConnectorID != nil {
3309 objectMap["ConnectorId"] = wicc.ConnectorID
3310 }
3311 if wicc.ConnectorDataConfiguration != nil {
3312 objectMap["ConnectorDataConfiguration"] = wicc.ConnectorDataConfiguration
3313 }
3314 if wicc.ValidateOnly != nil {
3315 objectMap["ValidateOnly"] = wicc.ValidateOnly
3316 }
3317 if wicc.WorkItemProperties != nil {
3318 objectMap["WorkItemProperties"] = wicc.WorkItemProperties
3319 }
3320 return json.Marshal(objectMap)
3321 }
3322
View as plain text