-
Notifications
You must be signed in to change notification settings - Fork 805
/
models.go
3216 lines (2931 loc) · 126 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package adhybridhealthservice
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice"
// AdditionalInformation the additional information for a property.
type AdditionalInformation struct {
// TitleName - The title name for the property.
TitleName *string `json:"titleName,omitempty"`
// TitleValue - The title value for the property.
TitleValue *string `json:"titleValue,omitempty"`
// Properties - The list of properties which are included in the additional information.
Properties interface{} `json:"properties,omitempty"`
// HasProperties - Indicates if properties are present or not.
HasProperties *bool `json:"hasProperties,omitempty"`
}
// AddsConfiguration the list of key value properties.
type AddsConfiguration struct {
autorest.Response `json:"-"`
// NextLink - The link used to get the next page of operations.
NextLink *string `json:"nextLink,omitempty"`
// Value - The value returned by the operation.
Value *[]Item `json:"value,omitempty"`
// TotalCount - The total count of configuration.
TotalCount *int32 `json:"totalCount,omitempty"`
// ContinuationToken - The continuation token for paginated calls.
ContinuationToken *string `json:"continuationToken,omitempty"`
}
// AddsConfigurationIterator provides access to a complete listing of Item values.
type AddsConfigurationIterator struct {
i int
page AddsConfigurationPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *AddsConfigurationIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AddsConfigurationIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *AddsConfigurationIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AddsConfigurationIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter AddsConfigurationIterator) Response() AddsConfiguration {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter AddsConfigurationIterator) Value() Item {
if !iter.page.NotDone() {
return Item{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AddsConfigurationIterator type.
func NewAddsConfigurationIterator(page AddsConfigurationPage) AddsConfigurationIterator {
return AddsConfigurationIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (ac AddsConfiguration) IsEmpty() bool {
return ac.Value == nil || len(*ac.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (ac AddsConfiguration) hasNextLink() bool {
return ac.NextLink != nil && len(*ac.NextLink) != 0
}
// addsConfigurationPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (ac AddsConfiguration) addsConfigurationPreparer(ctx context.Context) (*http.Request, error) {
if !ac.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ac.NextLink)))
}
// AddsConfigurationPage contains a page of Item values.
type AddsConfigurationPage struct {
fn func(context.Context, AddsConfiguration) (AddsConfiguration, error)
ac AddsConfiguration
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *AddsConfigurationPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AddsConfigurationPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.ac)
if err != nil {
return err
}
page.ac = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *AddsConfigurationPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AddsConfigurationPage) NotDone() bool {
return !page.ac.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AddsConfigurationPage) Response() AddsConfiguration {
return page.ac
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AddsConfigurationPage) Values() []Item {
if page.ac.IsEmpty() {
return nil
}
return *page.ac.Value
}
// Creates a new instance of the AddsConfigurationPage type.
func NewAddsConfigurationPage(getNextPage func(context.Context, AddsConfiguration) (AddsConfiguration, error)) AddsConfigurationPage {
return AddsConfigurationPage{fn: getNextPage}
}
// AddsServiceMember the server details for ADDS service.
type AddsServiceMember struct {
// DomainName - The domain name.
DomainName *string `json:"domainName,omitempty"`
// SiteName - The site name.
SiteName *string `json:"siteName,omitempty"`
// AddsRoles - The list of ADDS roles.
AddsRoles *[]string `json:"addsRoles,omitempty"`
// GcReachable - Indicates if the global catalog for this domain is reachable or not.
GcReachable *bool `json:"gcReachable,omitempty"`
// IsAdvertising - Indicates if the Dc is advertising or not.
IsAdvertising *bool `json:"isAdvertising,omitempty"`
// PdcReachable - Indicates if the primary domain controller is reachable or not.
PdcReachable *bool `json:"pdcReachable,omitempty"`
// SysvolState - Indicates if the SYSVOL state is healthy or not.
SysvolState *bool `json:"sysvolState,omitempty"`
// DcTypes - The list of domain controller types.
DcTypes *[]string `json:"dcTypes,omitempty"`
// ServiceMemberID - The id of the server.
ServiceMemberID *string `json:"serviceMemberId,omitempty"`
// ServiceID - The service id to whom this server belongs.
ServiceID *string `json:"serviceId,omitempty"`
// TenantID - The tenant id to whom this server belongs.
TenantID *string `json:"tenantId,omitempty"`
// ActiveAlerts - The total number of alerts that are currently active for the server.
ActiveAlerts *int32 `json:"activeAlerts,omitempty"`
// AdditionalInformation - The additional information, if any, for the server.
AdditionalInformation *string `json:"additionalInformation,omitempty"`
// CreatedDate - The date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health.
CreatedDate *date.Time `json:"createdDate,omitempty"`
// Dimensions - The server specific configuration related dimensions.
Dimensions *[]Item `json:"dimensions,omitempty"`
// Disabled - Indicates if the server is disabled or not.
Disabled *bool `json:"disabled,omitempty"`
// DisabledReason - The reason for disabling the server.
DisabledReason *int32 `json:"disabledReason,omitempty"`
// InstalledQfes - The list of installed QFEs for the server.
InstalledQfes *[]Hotfix `json:"installedQfes,omitempty"`
// LastDisabled - The date and time , in UTC, when the server was last disabled.
LastDisabled *date.Time `json:"lastDisabled,omitempty"`
// LastReboot - The date and time, in UTC, when the server was last rebooted.
LastReboot *date.Time `json:"lastReboot,omitempty"`
// LastServerReportedMonitoringLevelChange - The date and time, in UTC, when the server's data monitoring configuration was last changed.
LastServerReportedMonitoringLevelChange *date.Time `json:"lastServerReportedMonitoringLevelChange,omitempty"`
// LastUpdated - The date and time, in UTC, when the server properties were last updated.
LastUpdated *date.Time `json:"lastUpdated,omitempty"`
// MachineID - The id of the machine.
MachineID *string `json:"machineId,omitempty"`
// MachineName - The name of the server.
MachineName *string `json:"machineName,omitempty"`
// MonitoringConfigurationsComputed - The monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health.
MonitoringConfigurationsComputed *[]Item `json:"monitoringConfigurationsComputed,omitempty"`
// MonitoringConfigurationsCustomized - The customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health.
MonitoringConfigurationsCustomized *[]Item `json:"monitoringConfigurationsCustomized,omitempty"`
// OsName - The name of the operating system installed in the machine.
OsName *string `json:"osName,omitempty"`
// OsVersion - The version of the operating system installed in the machine.
OsVersion *string `json:"osVersion,omitempty"`
// Properties - Server specific properties.
Properties *[]Item `json:"properties,omitempty"`
// RecommendedQfes - The list of recommended hotfixes for the server.
RecommendedQfes *[]Hotfix `json:"recommendedQfes,omitempty"`
// ResolvedAlerts - The total count of alerts that are resolved for this server.
ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"`
// Role - The service role that is being monitored in the server.
Role *string `json:"role,omitempty"`
// ServerReportedMonitoringLevel - The monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'
ServerReportedMonitoringLevel MonitoringLevel `json:"serverReportedMonitoringLevel,omitempty"`
// Status - The health status of the server.
Status *string `json:"status,omitempty"`
}
// AddsServiceMembers the list of ADDS service members.
type AddsServiceMembers struct {
autorest.Response `json:"-"`
// NextLink - The link used to get the next page of operations.
NextLink *string `json:"nextLink,omitempty"`
// Value - The value returned by the operation.
Value *[]AddsServiceMember `json:"value,omitempty"`
// TotalCount - The total count of service members.
TotalCount *int32 `json:"totalCount,omitempty"`
// ContinuationToken - The continuation token for paginated calls.
ContinuationToken *string `json:"continuationToken,omitempty"`
}
// AddsServiceMembersIterator provides access to a complete listing of AddsServiceMember values.
type AddsServiceMembersIterator struct {
i int
page AddsServiceMembersPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *AddsServiceMembersIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AddsServiceMembersIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *AddsServiceMembersIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AddsServiceMembersIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter AddsServiceMembersIterator) Response() AddsServiceMembers {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter AddsServiceMembersIterator) Value() AddsServiceMember {
if !iter.page.NotDone() {
return AddsServiceMember{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AddsServiceMembersIterator type.
func NewAddsServiceMembersIterator(page AddsServiceMembersPage) AddsServiceMembersIterator {
return AddsServiceMembersIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (asm AddsServiceMembers) IsEmpty() bool {
return asm.Value == nil || len(*asm.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (asm AddsServiceMembers) hasNextLink() bool {
return asm.NextLink != nil && len(*asm.NextLink) != 0
}
// addsServiceMembersPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (asm AddsServiceMembers) addsServiceMembersPreparer(ctx context.Context) (*http.Request, error) {
if !asm.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(asm.NextLink)))
}
// AddsServiceMembersPage contains a page of AddsServiceMember values.
type AddsServiceMembersPage struct {
fn func(context.Context, AddsServiceMembers) (AddsServiceMembers, error)
asm AddsServiceMembers
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *AddsServiceMembersPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AddsServiceMembersPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.asm)
if err != nil {
return err
}
page.asm = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *AddsServiceMembersPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AddsServiceMembersPage) NotDone() bool {
return !page.asm.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AddsServiceMembersPage) Response() AddsServiceMembers {
return page.asm
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AddsServiceMembersPage) Values() []AddsServiceMember {
if page.asm.IsEmpty() {
return nil
}
return *page.asm.Value
}
// Creates a new instance of the AddsServiceMembersPage type.
func NewAddsServiceMembersPage(getNextPage func(context.Context, AddsServiceMembers) (AddsServiceMembers, error)) AddsServiceMembersPage {
return AddsServiceMembersPage{fn: getNextPage}
}
// Agent the agent details.
type Agent struct {
// TenantID - The tenant Id.
TenantID *string `json:"tenantId,omitempty"`
// MachineID - The machine Id.
MachineID *string `json:"machineId,omitempty"`
// Credential - The agent credential details.
Credential interface{} `json:"credential,omitempty"`
// MachineName - The machine name.
MachineName *string `json:"machineName,omitempty"`
// AgentVersion - The agent version.
AgentVersion *string `json:"agentVersion,omitempty"`
// CreatedDate - The date and time, in UTC, when the agent was created.
CreatedDate *date.Time `json:"createdDate,omitempty"`
// Key - The connector hash key.
Key *string `json:"key,omitempty"`
}
// Alert the alert details indicating an issue with service or server.
type Alert struct {
// AlertID - The alert Id.
AlertID *uuid.UUID `json:"alertId,omitempty"`
// Level - The alert level which indicates the severity of the alert. Possible values include: 'LevelWarning', 'LevelError', 'LevelPreWarning'
Level Level `json:"level,omitempty"`
// State - The alert state which can be either active or resolved with multiple resolution types. Possible values include: 'Active', 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', 'ResolvedByStateChange'
State State `json:"state,omitempty"`
// ShortName - The alert short name.
ShortName *string `json:"shortName,omitempty"`
// DisplayName - The display name for the alert.
DisplayName *string `json:"displayName,omitempty"`
// Description - The alert description.
Description *string `json:"description,omitempty"`
// Remediation - The alert remediation.
Remediation *string `json:"remediation,omitempty"`
// RelatedLinks - The help links to get more information related to the alert.
RelatedLinks *[]HelpLink `json:"relatedLinks,omitempty"`
// Scope - The scope of the alert. Indicates if it is a service or a server related alert.
Scope *string `json:"scope,omitempty"`
// AdditionalInformation - Additional information related to the alert.
AdditionalInformation *[]AdditionalInformation `json:"additionalInformation,omitempty"`
// CreatedDate - The date and time,in UTC,when the alert was created.
CreatedDate *date.Time `json:"createdDate,omitempty"`
// ResolvedDate - The date and time, in UTC, when the alert was resolved.
ResolvedDate *date.Time `json:"resolvedDate,omitempty"`
// LastUpdated - The date and time, in UTC, when the alert was last updated.
LastUpdated *date.Time `json:"lastUpdated,omitempty"`
// MonitorRoleType - The monitoring role type for which the alert was raised.
MonitorRoleType *string `json:"monitorRoleType,omitempty"`
// ActiveAlertProperties - The active alert properties.
ActiveAlertProperties *[]Item `json:"activeAlertProperties,omitempty"`
// ResolvedAlertProperties - The resolved alert properties.
ResolvedAlertProperties *[]Item `json:"resolvedAlertProperties,omitempty"`
// TenantID - The tenant Id.
TenantID *uuid.UUID `json:"tenantId,omitempty"`
// ServiceID - The service Id.
ServiceID *uuid.UUID `json:"serviceId,omitempty"`
// ServiceMemberID - The server Id.
ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"`
}
// AlertFeedback the alert feedback details.
type AlertFeedback struct {
autorest.Response `json:"-"`
// Level - The alert level which indicates the severity of the alert.
Level *string `json:"level,omitempty"`
// State - The alert state which can be either active or resolved with multiple resolution types.
State *string `json:"state,omitempty"`
// ShortName - The alert short name.
ShortName *string `json:"shortName,omitempty"`
// Feedback - The feedback for the alert which indicates if the customer likes or dislikes the alert.
Feedback *string `json:"feedback,omitempty"`
// Comment - Additional comments related to the alert.
Comment *string `json:"comment,omitempty"`
// ConsentedToShare - Indicates if the alert feedback can be shared from product team.
ConsentedToShare *bool `json:"consentedToShare,omitempty"`
// ServiceMemberID - The server Id of the alert.
ServiceMemberID *string `json:"serviceMemberId,omitempty"`
// CreatedDate - The date and time,in UTC,when the alert was created.
CreatedDate *date.Time `json:"createdDate,omitempty"`
}
// AlertFeedbacks the list of alert feedback.
type AlertFeedbacks struct {
autorest.Response `json:"-"`
// Value - The value returned by the operation.
Value *[]AlertFeedback `json:"value,omitempty"`
}
// Alerts the list of alerts for a service.
type Alerts struct {
autorest.Response `json:"-"`
// Value - The value returned by the operation.
Value *[]Alert `json:"value,omitempty"`
// NextLink - The link used to get the next page of operations.
NextLink *string `json:"nextLink,omitempty"`
// TotalCount - The total count of alert elements.
TotalCount *int32 `json:"totalCount,omitempty"`
// ContinuationToken - The continuation token for paginated calls.
ContinuationToken *string `json:"continuationToken,omitempty"`
}
// AlertsIterator provides access to a complete listing of Alert values.
type AlertsIterator struct {
i int
page AlertsPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *AlertsIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AlertsIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *AlertsIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AlertsIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter AlertsIterator) Response() Alerts {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter AlertsIterator) Value() Alert {
if !iter.page.NotDone() {
return Alert{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AlertsIterator type.
func NewAlertsIterator(page AlertsPage) AlertsIterator {
return AlertsIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (a Alerts) IsEmpty() bool {
return a.Value == nil || len(*a.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (a Alerts) hasNextLink() bool {
return a.NextLink != nil && len(*a.NextLink) != 0
}
// alertsPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (a Alerts) alertsPreparer(ctx context.Context) (*http.Request, error) {
if !a.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(a.NextLink)))
}
// AlertsPage contains a page of Alert values.
type AlertsPage struct {
fn func(context.Context, Alerts) (Alerts, error)
a Alerts
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *AlertsPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AlertsPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.a)
if err != nil {
return err
}
page.a = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *AlertsPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AlertsPage) NotDone() bool {
return !page.a.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AlertsPage) Response() Alerts {
return page.a
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AlertsPage) Values() []Alert {
if page.a.IsEmpty() {
return nil
}
return *page.a.Value
}
// Creates a new instance of the AlertsPage type.
func NewAlertsPage(getNextPage func(context.Context, Alerts) (Alerts, error)) AlertsPage {
return AlertsPage{fn: getNextPage}
}
// AssociatedObject object that hold sync object details.
type AssociatedObject struct {
// DisplayName - The display name of the object.
DisplayName *string `json:"displayName,omitempty"`
// DistinguishedName - The distinguished name of the object.
DistinguishedName *string `json:"distinguishedName,omitempty"`
// LastDirSyncTime - The last dirSync time.
LastDirSyncTime *date.Time `json:"lastDirSyncTime,omitempty"`
// Mail - The email of the object.
Mail *string `json:"mail,omitempty"`
// ObjectGUID - The object guid.
ObjectGUID *string `json:"objectGuid,omitempty"`
// ObjectType - The object type.
ObjectType *string `json:"objectType,omitempty"`
// OnpremisesUserPrincipalName - The On-premises UPN.
OnpremisesUserPrincipalName *string `json:"onpremisesUserPrincipalName,omitempty"`
// ProxyAddresses - The proxy addresses.
ProxyAddresses *string `json:"proxyAddresses,omitempty"`
// SourceAnchor - The source anchor.
SourceAnchor *string `json:"sourceAnchor,omitempty"`
// SourceOfAuthority - The source of authority.
SourceOfAuthority *string `json:"sourceOfAuthority,omitempty"`
// TimeOccurred - The time of the error.
TimeOccurred *date.Time `json:"timeOccurred,omitempty"`
// UserPrincipalName - The UPN.
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
}
// AttributeDelta the delta attributes.
type AttributeDelta struct {
// Values - The delta values.
Values *[]ValueDelta `json:"values,omitempty"`
// Name - The name of the attribute delta.
Name *string `json:"name,omitempty"`
// OperationType - The attribute delta operation type. Possible values include: 'AttributeDeltaOperationTypeUndefined', 'AttributeDeltaOperationTypeAdd', 'AttributeDeltaOperationTypeReplace', 'AttributeDeltaOperationTypeUpdate', 'AttributeDeltaOperationTypeDelete'
OperationType AttributeDeltaOperationType `json:"operationType,omitempty"`
// ValueType - The value type. Possible values include: 'ValueTypeUndefined', 'ValueTypeDn', 'ValueTypeBinary', 'ValueTypeString', 'ValueTypeInteger', 'ValueTypeBoolean'
ValueType ValueType `json:"valueType,omitempty"`
// MultiValued - Indicates if the attribute delta is multivalued or not.
MultiValued *bool `json:"multiValued,omitempty"`
}
// AttributeMapping the attribute mapping details.
type AttributeMapping struct {
// MappingSource - The mapping source.
MappingSource *AttributeMppingSource `json:"mappingSource,omitempty"`
// Type - The attribute mapping type. Possible values include: 'Constant', 'Direct', 'DnPart', 'Script'
Type AttributeMappingType `json:"type,omitempty"`
// DestinationAttribute - The destination attribute.
DestinationAttribute *string `json:"destinationAttribute,omitempty"`
// ContextID - The context Id.
ContextID *string `json:"contextId,omitempty"`
}
// AttributeMppingSource the attribute mapping source.
type AttributeMppingSource struct {
// SourceAttribute - The source attribute.
SourceAttribute *[]string `json:"sourceAttribute,omitempty"`
// DnPart - The value for dn part.
DnPart *int32 `json:"dnPart,omitempty"`
// ScriptContext - The script context.
ScriptContext *string `json:"scriptContext,omitempty"`
// ConstantValue - The constant value.
ConstantValue *string `json:"constantValue,omitempty"`
}
// ChangeNotReimported the changes which are not re-imported.
type ChangeNotReimported struct {
// Delta - The delta changes that is not re-imported.
Delta *ChangeNotReimportedDelta `json:"delta,omitempty"`
// Entry - The object entry in a change that is not re-imported.
Entry *ChangeNotReimportedEntry `json:"entry,omitempty"`
}
// ChangeNotReimportedDelta the delta in a change that is not re-imported.
type ChangeNotReimportedDelta struct {
// Anchor - The anchor.
Anchor *string `json:"anchor,omitempty"`
// DnAttributes - The delta attributes for distinguished names.
DnAttributes *[]AttributeDelta `json:"dnAttributes,omitempty"`
// Attributes - The attributes.
Attributes *[]AttributeDelta `json:"attributes,omitempty"`
// OperationType - The operation type. Possible values include: 'DeltaOperationTypeUndefined', 'DeltaOperationTypeNone', 'DeltaOperationTypeAdd', 'DeltaOperationTypeReplace', 'DeltaOperationTypeUpdate', 'DeltaOperationTypeDelete', 'DeltaOperationTypeObsolete', 'DeltaOperationTypeDeleteAdd'
OperationType DeltaOperationType `json:"operationType,omitempty"`
}
// ChangeNotReimportedEntry the object entry in a change that is not re-imported.
type ChangeNotReimportedEntry struct {
// Anchor - The anchor.
Anchor *string `json:"anchor,omitempty"`
// ParentAnchor - The parent anchor.
ParentAnchor *string `json:"parentAnchor,omitempty"`
// PrimaryObjectClass - The primary object class.
PrimaryObjectClass *string `json:"primaryObjectClass,omitempty"`
// ObjectClasses - The list of object classes.
ObjectClasses *[]string `json:"objectClasses,omitempty"`
// DnAttributes - The delta attributes for distinguished names.
DnAttributes *[]AttributeDelta `json:"dnAttributes,omitempty"`
// Attributes - The attributes.
Attributes *[]AttributeDelta `json:"attributes,omitempty"`
// Dn - The distinguished name.
Dn *string `json:"dn,omitempty"`
}
// Connector the connect details.
type Connector struct {
// ConnectorID - The connector Id.
ConnectorID *string `json:"connectorId,omitempty"`
// ID - The connector Id.
ID *string `json:"id,omitempty"`
// Name - The connector name.
Name *string `json:"name,omitempty"`
// Version - The connector version
Version *int32 `json:"version,omitempty"`
// Type - The connector type.
Type *string `json:"type,omitempty"`
// Description - The connector description.
Description *string `json:"description,omitempty"`
// SchemaXML - The schema xml for the connector.
SchemaXML *string `json:"schemaXml,omitempty"`
// PasswordManagementSettings - The password management settings of the connector.
PasswordManagementSettings interface{} `json:"passwordManagementSettings,omitempty"`
// PasswordHashSyncConfiguration - The password hash synchronization configuration of the connector.
PasswordHashSyncConfiguration interface{} `json:"passwordHashSyncConfiguration,omitempty"`
// TimeCreated - The date and time when this connector was created.
TimeCreated *date.Time `json:"timeCreated,omitempty"`
// TimeLastModified - The date and time when this connector was last modified.
TimeLastModified *date.Time `json:"timeLastModified,omitempty"`
// Partitions - The partitions of the connector.
Partitions *[]Partition `json:"partitions,omitempty"`
// RunProfiles - The run profiles of the connector.
RunProfiles *[]RunProfile `json:"runProfiles,omitempty"`
// ClassesIncluded - The class inclusion list of the connector.
ClassesIncluded *[]string `json:"classesIncluded,omitempty"`
// AttributesIncluded - The attribute inclusion list of the connector.
AttributesIncluded *[]string `json:"attributesIncluded,omitempty"`
}
// ConnectorConnectionError the connector connection error.
type ConnectorConnectionError struct {
// ID - The error Id.
ID *string `json:"id,omitempty"`
// RunStepResultID - The run step result Id.
RunStepResultID *string `json:"runStepResultId,omitempty"`
// ConnectorID - The connector Id.
ConnectorID *string `json:"connectorId,omitempty"`
// Type - The type of error.
Type *string `json:"type,omitempty"`
// ErrorCode - The error code.
ErrorCode *string `json:"errorCode,omitempty"`
// Message - The message for the connection error.
Message *string `json:"message,omitempty"`
// TimeOccured - The time when the connection error occurred.
TimeOccured *date.Time `json:"timeOccured,omitempty"`
// Server - The server where the connection error happened.
Server *string `json:"server,omitempty"`
}
// ConnectorConnectionErrors the list of connector connection errors.
type ConnectorConnectionErrors struct {
// Value - The value returned by the operation.
Value *[]ConnectorConnectionError `json:"value,omitempty"`
}
// ConnectorMetadata gets the list of connectors and run profile names.
type ConnectorMetadata struct {
autorest.Response `json:"-"`
// Connectors - The list of connectors.
Connectors *[]ConnectorMetadataDetails `json:"connectors,omitempty"`
// RunProfileNames - The list of run profile names.
RunProfileNames *[]string `json:"runProfileNames,omitempty"`
}
// ConnectorMetadataDetails details of the connector.
type ConnectorMetadataDetails struct {
// ConnectorID - The Connector Id.
ConnectorID *string `json:"connectorId,omitempty"`
// ConnectorDisplayName - The Connector Display Name
ConnectorDisplayName *string `json:"connectorDisplayName,omitempty"`
}
// ConnectorObjectError the connector object error.
type ConnectorObjectError struct {
// ID - The error Id.
ID *string `json:"id,omitempty"`
// RunStepResultID - The run step result Id.
RunStepResultID *string `json:"runStepResultId,omitempty"`
// ConnectorID - The connector Id.
ConnectorID *string `json:"connectorId,omitempty"`
// Type - The type of error.
Type *string `json:"type,omitempty"`
// ErrorCode - The error code.
ErrorCode *string `json:"errorCode,omitempty"`
// Message - The message for the object error.
Message *string `json:"message,omitempty"`
// EntryNumber - The entry number for object error occurred.
EntryNumber *int32 `json:"entryNumber,omitempty"`
// LineNumber - The line number for the object error.
LineNumber *int32 `json:"lineNumber,omitempty"`
// ColumnNumber - The column number for the object error.
ColumnNumber *int32 `json:"columnNumber,omitempty"`
// Dn - The distinguished name of the object.
Dn *string `json:"dn,omitempty"`
// Anchor - The name for the anchor of the object.
Anchor *string `json:"anchor,omitempty"`
// AttributeName - The attribute name of the object.
AttributeName *string `json:"attributeName,omitempty"`
// ServerErrorDetail - The server side error details.
ServerErrorDetail *string `json:"serverErrorDetail,omitempty"`
// Values - The value corresponding to attribute name.
Values *[]string `json:"values,omitempty"`
}
// ConnectorObjectErrors the list of connector object errors.
type ConnectorObjectErrors struct {
// Value - The value returned by the operation.
Value *[]ConnectorObjectError `json:"value,omitempty"`
}
// Connectors the list of connects for a service.
type Connectors struct {
autorest.Response `json:"-"`
// Value - The value returned by the operation.
Value *[]Connector `json:"value,omitempty"`
}
// Credential the credential for a given server.
type Credential struct {
// Identifier - The credential identifier.
Identifier *string `json:"identifier,omitempty"`
// Type - The type of credential.
Type *string `json:"type,omitempty"`
// CredentialData - The credential data.
CredentialData *[]string `json:"credentialData,omitempty"`
}
// Credentials the list of agent credentials.
type Credentials struct {
autorest.Response `json:"-"`
// Value - The value returned by the operation.
Value *[]Credential `json:"value,omitempty"`
}
// DataFreshnessDetails the data freshness details for the server.
type DataFreshnessDetails struct {
autorest.Response `json:"-"`
// Value - The value returned by the operation.
Value *[]Item `json:"value,omitempty"`
}
// Dimension the connector object error.
type Dimension struct {
// Health - The health status for the domain controller. Possible values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing'
Health HealthStatus `json:"health,omitempty"`
// SimpleProperties - List of service specific configuration properties.
SimpleProperties interface{} `json:"simpleProperties,omitempty"`
// ActiveAlerts - The count of alerts that are currently active for the service.
ActiveAlerts *int32 `json:"activeAlerts,omitempty"`
// AdditionalInformation - The additional information related to the service.
AdditionalInformation *string `json:"additionalInformation,omitempty"`
// LastUpdated - The date or time , in UTC, when the service properties were last updated.
LastUpdated *date.Time `json:"lastUpdated,omitempty"`
// DisplayName - The display name of the service.
DisplayName *string `json:"displayName,omitempty"`
// ResolvedAlerts - The total count of alerts that has been resolved for the service.
ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"`
// Signature - The signature of the service.
Signature *string `json:"signature,omitempty"`
// Type - The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService.
Type *string `json:"type,omitempty"`
}
// Dimensions the list of dimensions.
type Dimensions struct {
autorest.Response `json:"-"`
// NextLink - The link used to get the next page of operations.
NextLink *string `json:"nextLink,omitempty"`
// Value - The value returned by the operation.
Value *[]Dimension `json:"value,omitempty"`
// TotalCount - The total count of dimensions.
TotalCount *int32 `json:"totalCount,omitempty"`
// ContinuationToken - The continuation token for paginated calls.
ContinuationToken *string `json:"continuationToken,omitempty"`
}
// DimensionsIterator provides access to a complete listing of Dimension values.
type DimensionsIterator struct {
i int
page DimensionsPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *DimensionsIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/DimensionsIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil