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