1package adhybridhealthservice 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 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// The package's fully qualified name. 21const fqdn = "github.com/Azure/azure-sdk-for-go/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice" 22 23// AdditionalInformation the additional information for a property. 24type AdditionalInformation struct { 25 // TitleName - The title name for the property. 26 TitleName *string `json:"titleName,omitempty"` 27 // TitleValue - The title value for the property. 28 TitleValue *string `json:"titleValue,omitempty"` 29 // Properties - The list of properties which are included in the additional information. 30 Properties interface{} `json:"properties,omitempty"` 31 // HasProperties - Indicates if properties are present or not. 32 HasProperties *bool `json:"hasProperties,omitempty"` 33} 34 35// AddsConfiguration the list of key value properties. 36type AddsConfiguration struct { 37 autorest.Response `json:"-"` 38 // NextLink - The link used to get the next page of operations. 39 NextLink *string `json:"nextLink,omitempty"` 40 // Value - The value returned by the operation. 41 Value *[]Item `json:"value,omitempty"` 42 // TotalCount - The total count of configuration. 43 TotalCount *int32 `json:"totalCount,omitempty"` 44 // ContinuationToken - The continuation token for paginated calls. 45 ContinuationToken *string `json:"continuationToken,omitempty"` 46} 47 48// AddsConfigurationIterator provides access to a complete listing of Item values. 49type AddsConfigurationIterator struct { 50 i int 51 page AddsConfigurationPage 52} 53 54// NextWithContext advances to the next value. If there was an error making 55// the request the iterator does not advance and the error is returned. 56func (iter *AddsConfigurationIterator) NextWithContext(ctx context.Context) (err error) { 57 if tracing.IsEnabled() { 58 ctx = tracing.StartSpan(ctx, fqdn+"/AddsConfigurationIterator.NextWithContext") 59 defer func() { 60 sc := -1 61 if iter.Response().Response.Response != nil { 62 sc = iter.Response().Response.Response.StatusCode 63 } 64 tracing.EndSpan(ctx, sc, err) 65 }() 66 } 67 iter.i++ 68 if iter.i < len(iter.page.Values()) { 69 return nil 70 } 71 err = iter.page.NextWithContext(ctx) 72 if err != nil { 73 iter.i-- 74 return err 75 } 76 iter.i = 0 77 return nil 78} 79 80// Next advances to the next value. If there was an error making 81// the request the iterator does not advance and the error is returned. 82// Deprecated: Use NextWithContext() instead. 83func (iter *AddsConfigurationIterator) Next() error { 84 return iter.NextWithContext(context.Background()) 85} 86 87// NotDone returns true if the enumeration should be started or is not yet complete. 88func (iter AddsConfigurationIterator) NotDone() bool { 89 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 90} 91 92// Response returns the raw server response from the last page request. 93func (iter AddsConfigurationIterator) Response() AddsConfiguration { 94 return iter.page.Response() 95} 96 97// Value returns the current value or a zero-initialized value if the 98// iterator has advanced beyond the end of the collection. 99func (iter AddsConfigurationIterator) Value() Item { 100 if !iter.page.NotDone() { 101 return Item{} 102 } 103 return iter.page.Values()[iter.i] 104} 105 106// Creates a new instance of the AddsConfigurationIterator type. 107func NewAddsConfigurationIterator(page AddsConfigurationPage) AddsConfigurationIterator { 108 return AddsConfigurationIterator{page: page} 109} 110 111// IsEmpty returns true if the ListResult contains no values. 112func (ac AddsConfiguration) IsEmpty() bool { 113 return ac.Value == nil || len(*ac.Value) == 0 114} 115 116// hasNextLink returns true if the NextLink is not empty. 117func (ac AddsConfiguration) hasNextLink() bool { 118 return ac.NextLink != nil && len(*ac.NextLink) != 0 119} 120 121// addsConfigurationPreparer prepares a request to retrieve the next set of results. 122// It returns nil if no more results exist. 123func (ac AddsConfiguration) addsConfigurationPreparer(ctx context.Context) (*http.Request, error) { 124 if !ac.hasNextLink() { 125 return nil, nil 126 } 127 return autorest.Prepare((&http.Request{}).WithContext(ctx), 128 autorest.AsJSON(), 129 autorest.AsGet(), 130 autorest.WithBaseURL(to.String(ac.NextLink))) 131} 132 133// AddsConfigurationPage contains a page of Item values. 134type AddsConfigurationPage struct { 135 fn func(context.Context, AddsConfiguration) (AddsConfiguration, error) 136 ac AddsConfiguration 137} 138 139// NextWithContext advances to the next page of values. If there was an error making 140// the request the page does not advance and the error is returned. 141func (page *AddsConfigurationPage) NextWithContext(ctx context.Context) (err error) { 142 if tracing.IsEnabled() { 143 ctx = tracing.StartSpan(ctx, fqdn+"/AddsConfigurationPage.NextWithContext") 144 defer func() { 145 sc := -1 146 if page.Response().Response.Response != nil { 147 sc = page.Response().Response.Response.StatusCode 148 } 149 tracing.EndSpan(ctx, sc, err) 150 }() 151 } 152 for { 153 next, err := page.fn(ctx, page.ac) 154 if err != nil { 155 return err 156 } 157 page.ac = next 158 if !next.hasNextLink() || !next.IsEmpty() { 159 break 160 } 161 } 162 return nil 163} 164 165// Next advances to the next page of values. If there was an error making 166// the request the page does not advance and the error is returned. 167// Deprecated: Use NextWithContext() instead. 168func (page *AddsConfigurationPage) Next() error { 169 return page.NextWithContext(context.Background()) 170} 171 172// NotDone returns true if the page enumeration should be started or is not yet complete. 173func (page AddsConfigurationPage) NotDone() bool { 174 return !page.ac.IsEmpty() 175} 176 177// Response returns the raw server response from the last page request. 178func (page AddsConfigurationPage) Response() AddsConfiguration { 179 return page.ac 180} 181 182// Values returns the slice of values for the current page or nil if there are no values. 183func (page AddsConfigurationPage) Values() []Item { 184 if page.ac.IsEmpty() { 185 return nil 186 } 187 return *page.ac.Value 188} 189 190// Creates a new instance of the AddsConfigurationPage type. 191func NewAddsConfigurationPage(cur AddsConfiguration, getNextPage func(context.Context, AddsConfiguration) (AddsConfiguration, error)) AddsConfigurationPage { 192 return AddsConfigurationPage{ 193 fn: getNextPage, 194 ac: cur, 195 } 196} 197 198// AddsServiceMember the server details for ADDS service. 199type AddsServiceMember struct { 200 // DomainName - The domain name. 201 DomainName *string `json:"domainName,omitempty"` 202 // SiteName - The site name. 203 SiteName *string `json:"siteName,omitempty"` 204 // AddsRoles - The list of ADDS roles. 205 AddsRoles *[]string `json:"addsRoles,omitempty"` 206 // GcReachable - Indicates if the global catalog for this domain is reachable or not. 207 GcReachable *bool `json:"gcReachable,omitempty"` 208 // IsAdvertising - Indicates if the Dc is advertising or not. 209 IsAdvertising *bool `json:"isAdvertising,omitempty"` 210 // PdcReachable - Indicates if the primary domain controller is reachable or not. 211 PdcReachable *bool `json:"pdcReachable,omitempty"` 212 // SysvolState - Indicates if the SYSVOL state is healthy or not. 213 SysvolState *bool `json:"sysvolState,omitempty"` 214 // DcTypes - The list of domain controller types. 215 DcTypes *[]string `json:"dcTypes,omitempty"` 216 // ServiceMemberID - The id of the server. 217 ServiceMemberID *string `json:"serviceMemberId,omitempty"` 218 // ServiceID - The service id to whom this server belongs. 219 ServiceID *string `json:"serviceId,omitempty"` 220 // TenantID - The tenant id to whom this server belongs. 221 TenantID *string `json:"tenantId,omitempty"` 222 // ActiveAlerts - The total number of alerts that are currently active for the server. 223 ActiveAlerts *int32 `json:"activeAlerts,omitempty"` 224 // AdditionalInformation - The additional information, if any, for the server. 225 AdditionalInformation *string `json:"additionalInformation,omitempty"` 226 // CreatedDate - The date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health. 227 CreatedDate *date.Time `json:"createdDate,omitempty"` 228 // Dimensions - The server specific configuration related dimensions. 229 Dimensions *[]Item `json:"dimensions,omitempty"` 230 // Disabled - Indicates if the server is disabled or not. 231 Disabled *bool `json:"disabled,omitempty"` 232 // DisabledReason - The reason for disabling the server. 233 DisabledReason *int32 `json:"disabledReason,omitempty"` 234 // InstalledQfes - The list of installed QFEs for the server. 235 InstalledQfes *[]Hotfix `json:"installedQfes,omitempty"` 236 // LastDisabled - The date and time , in UTC, when the server was last disabled. 237 LastDisabled *date.Time `json:"lastDisabled,omitempty"` 238 // LastReboot - The date and time, in UTC, when the server was last rebooted. 239 LastReboot *date.Time `json:"lastReboot,omitempty"` 240 // LastServerReportedMonitoringLevelChange - The date and time, in UTC, when the server's data monitoring configuration was last changed. 241 LastServerReportedMonitoringLevelChange *date.Time `json:"lastServerReportedMonitoringLevelChange,omitempty"` 242 // LastUpdated - The date and time, in UTC, when the server properties were last updated. 243 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 244 // MachineID - The id of the machine. 245 MachineID *string `json:"machineId,omitempty"` 246 // MachineName - The name of the server. 247 MachineName *string `json:"machineName,omitempty"` 248 // MonitoringConfigurationsComputed - The monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. 249 MonitoringConfigurationsComputed *[]Item `json:"monitoringConfigurationsComputed,omitempty"` 250 // MonitoringConfigurationsCustomized - The customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. 251 MonitoringConfigurationsCustomized *[]Item `json:"monitoringConfigurationsCustomized,omitempty"` 252 // OsName - The name of the operating system installed in the machine. 253 OsName *string `json:"osName,omitempty"` 254 // OsVersion - The version of the operating system installed in the machine. 255 OsVersion *string `json:"osVersion,omitempty"` 256 // Properties - Server specific properties. 257 Properties *[]Item `json:"properties,omitempty"` 258 // RecommendedQfes - The list of recommended hotfixes for the server. 259 RecommendedQfes *[]Hotfix `json:"recommendedQfes,omitempty"` 260 // ResolvedAlerts - The total count of alerts that are resolved for this server. 261 ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"` 262 // Role - The service role that is being monitored in the server. 263 Role *string `json:"role,omitempty"` 264 // ServerReportedMonitoringLevel - The monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off' 265 ServerReportedMonitoringLevel MonitoringLevel `json:"serverReportedMonitoringLevel,omitempty"` 266 // Status - The health status of the server. 267 Status *string `json:"status,omitempty"` 268} 269 270// AddsServiceMembers the list of ADDS service members. 271type AddsServiceMembers struct { 272 autorest.Response `json:"-"` 273 // NextLink - The link used to get the next page of operations. 274 NextLink *string `json:"nextLink,omitempty"` 275 // Value - The value returned by the operation. 276 Value *[]AddsServiceMember `json:"value,omitempty"` 277 // TotalCount - The total count of service members. 278 TotalCount *int32 `json:"totalCount,omitempty"` 279 // ContinuationToken - The continuation token for paginated calls. 280 ContinuationToken *string `json:"continuationToken,omitempty"` 281} 282 283// AddsServiceMembersIterator provides access to a complete listing of AddsServiceMember values. 284type AddsServiceMembersIterator struct { 285 i int 286 page AddsServiceMembersPage 287} 288 289// NextWithContext advances to the next value. If there was an error making 290// the request the iterator does not advance and the error is returned. 291func (iter *AddsServiceMembersIterator) NextWithContext(ctx context.Context) (err error) { 292 if tracing.IsEnabled() { 293 ctx = tracing.StartSpan(ctx, fqdn+"/AddsServiceMembersIterator.NextWithContext") 294 defer func() { 295 sc := -1 296 if iter.Response().Response.Response != nil { 297 sc = iter.Response().Response.Response.StatusCode 298 } 299 tracing.EndSpan(ctx, sc, err) 300 }() 301 } 302 iter.i++ 303 if iter.i < len(iter.page.Values()) { 304 return nil 305 } 306 err = iter.page.NextWithContext(ctx) 307 if err != nil { 308 iter.i-- 309 return err 310 } 311 iter.i = 0 312 return nil 313} 314 315// Next advances to the next value. If there was an error making 316// the request the iterator does not advance and the error is returned. 317// Deprecated: Use NextWithContext() instead. 318func (iter *AddsServiceMembersIterator) Next() error { 319 return iter.NextWithContext(context.Background()) 320} 321 322// NotDone returns true if the enumeration should be started or is not yet complete. 323func (iter AddsServiceMembersIterator) NotDone() bool { 324 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 325} 326 327// Response returns the raw server response from the last page request. 328func (iter AddsServiceMembersIterator) Response() AddsServiceMembers { 329 return iter.page.Response() 330} 331 332// Value returns the current value or a zero-initialized value if the 333// iterator has advanced beyond the end of the collection. 334func (iter AddsServiceMembersIterator) Value() AddsServiceMember { 335 if !iter.page.NotDone() { 336 return AddsServiceMember{} 337 } 338 return iter.page.Values()[iter.i] 339} 340 341// Creates a new instance of the AddsServiceMembersIterator type. 342func NewAddsServiceMembersIterator(page AddsServiceMembersPage) AddsServiceMembersIterator { 343 return AddsServiceMembersIterator{page: page} 344} 345 346// IsEmpty returns true if the ListResult contains no values. 347func (asm AddsServiceMembers) IsEmpty() bool { 348 return asm.Value == nil || len(*asm.Value) == 0 349} 350 351// hasNextLink returns true if the NextLink is not empty. 352func (asm AddsServiceMembers) hasNextLink() bool { 353 return asm.NextLink != nil && len(*asm.NextLink) != 0 354} 355 356// addsServiceMembersPreparer prepares a request to retrieve the next set of results. 357// It returns nil if no more results exist. 358func (asm AddsServiceMembers) addsServiceMembersPreparer(ctx context.Context) (*http.Request, error) { 359 if !asm.hasNextLink() { 360 return nil, nil 361 } 362 return autorest.Prepare((&http.Request{}).WithContext(ctx), 363 autorest.AsJSON(), 364 autorest.AsGet(), 365 autorest.WithBaseURL(to.String(asm.NextLink))) 366} 367 368// AddsServiceMembersPage contains a page of AddsServiceMember values. 369type AddsServiceMembersPage struct { 370 fn func(context.Context, AddsServiceMembers) (AddsServiceMembers, error) 371 asm AddsServiceMembers 372} 373 374// NextWithContext advances to the next page of values. If there was an error making 375// the request the page does not advance and the error is returned. 376func (page *AddsServiceMembersPage) NextWithContext(ctx context.Context) (err error) { 377 if tracing.IsEnabled() { 378 ctx = tracing.StartSpan(ctx, fqdn+"/AddsServiceMembersPage.NextWithContext") 379 defer func() { 380 sc := -1 381 if page.Response().Response.Response != nil { 382 sc = page.Response().Response.Response.StatusCode 383 } 384 tracing.EndSpan(ctx, sc, err) 385 }() 386 } 387 for { 388 next, err := page.fn(ctx, page.asm) 389 if err != nil { 390 return err 391 } 392 page.asm = next 393 if !next.hasNextLink() || !next.IsEmpty() { 394 break 395 } 396 } 397 return nil 398} 399 400// Next advances to the next page of values. If there was an error making 401// the request the page does not advance and the error is returned. 402// Deprecated: Use NextWithContext() instead. 403func (page *AddsServiceMembersPage) Next() error { 404 return page.NextWithContext(context.Background()) 405} 406 407// NotDone returns true if the page enumeration should be started or is not yet complete. 408func (page AddsServiceMembersPage) NotDone() bool { 409 return !page.asm.IsEmpty() 410} 411 412// Response returns the raw server response from the last page request. 413func (page AddsServiceMembersPage) Response() AddsServiceMembers { 414 return page.asm 415} 416 417// Values returns the slice of values for the current page or nil if there are no values. 418func (page AddsServiceMembersPage) Values() []AddsServiceMember { 419 if page.asm.IsEmpty() { 420 return nil 421 } 422 return *page.asm.Value 423} 424 425// Creates a new instance of the AddsServiceMembersPage type. 426func NewAddsServiceMembersPage(cur AddsServiceMembers, getNextPage func(context.Context, AddsServiceMembers) (AddsServiceMembers, error)) AddsServiceMembersPage { 427 return AddsServiceMembersPage{ 428 fn: getNextPage, 429 asm: cur, 430 } 431} 432 433// Agent the agent details. 434type Agent struct { 435 // TenantID - The tenant Id. 436 TenantID *string `json:"tenantId,omitempty"` 437 // MachineID - The machine Id. 438 MachineID *string `json:"machineId,omitempty"` 439 // Credential - The agent credential details. 440 Credential interface{} `json:"credential,omitempty"` 441 // MachineName - The machine name. 442 MachineName *string `json:"machineName,omitempty"` 443 // AgentVersion - The agent version. 444 AgentVersion *string `json:"agentVersion,omitempty"` 445 // CreatedDate - The date and time, in UTC, when the agent was created. 446 CreatedDate *date.Time `json:"createdDate,omitempty"` 447 // Key - The connector hash key. 448 Key *string `json:"key,omitempty"` 449} 450 451// Alert the alert details indicating an issue with service or server. 452type Alert struct { 453 // AlertID - The alert Id. 454 AlertID *uuid.UUID `json:"alertId,omitempty"` 455 // Level - The alert level which indicates the severity of the alert. Possible values include: 'LevelWarning', 'LevelError', 'LevelPreWarning' 456 Level Level `json:"level,omitempty"` 457 // State - The alert state which can be either active or resolved with multiple resolution types. Possible values include: 'Active', 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', 'ResolvedByStateChange' 458 State State `json:"state,omitempty"` 459 // ShortName - The alert short name. 460 ShortName *string `json:"shortName,omitempty"` 461 // DisplayName - The display name for the alert. 462 DisplayName *string `json:"displayName,omitempty"` 463 // Description - The alert description. 464 Description *string `json:"description,omitempty"` 465 // Remediation - The alert remediation. 466 Remediation *string `json:"remediation,omitempty"` 467 // RelatedLinks - The help links to get more information related to the alert. 468 RelatedLinks *[]HelpLink `json:"relatedLinks,omitempty"` 469 // Scope - The scope of the alert. Indicates if it is a service or a server related alert. 470 Scope *string `json:"scope,omitempty"` 471 // AdditionalInformation - Additional information related to the alert. 472 AdditionalInformation *[]AdditionalInformation `json:"additionalInformation,omitempty"` 473 // CreatedDate - The date and time,in UTC,when the alert was created. 474 CreatedDate *date.Time `json:"createdDate,omitempty"` 475 // ResolvedDate - The date and time, in UTC, when the alert was resolved. 476 ResolvedDate *date.Time `json:"resolvedDate,omitempty"` 477 // LastUpdated - The date and time, in UTC, when the alert was last updated. 478 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 479 // MonitorRoleType - The monitoring role type for which the alert was raised. 480 MonitorRoleType *string `json:"monitorRoleType,omitempty"` 481 // ActiveAlertProperties - The active alert properties. 482 ActiveAlertProperties *[]Item `json:"activeAlertProperties,omitempty"` 483 // ResolvedAlertProperties - The resolved alert properties. 484 ResolvedAlertProperties *[]Item `json:"resolvedAlertProperties,omitempty"` 485 // TenantID - The tenant Id. 486 TenantID *uuid.UUID `json:"tenantId,omitempty"` 487 // ServiceID - The service Id. 488 ServiceID *uuid.UUID `json:"serviceId,omitempty"` 489 // ServiceMemberID - The server Id. 490 ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"` 491} 492 493// AlertFeedback the alert feedback details. 494type AlertFeedback struct { 495 autorest.Response `json:"-"` 496 // Level - The alert level which indicates the severity of the alert. 497 Level *string `json:"level,omitempty"` 498 // State - The alert state which can be either active or resolved with multiple resolution types. 499 State *string `json:"state,omitempty"` 500 // ShortName - The alert short name. 501 ShortName *string `json:"shortName,omitempty"` 502 // Feedback - The feedback for the alert which indicates if the customer likes or dislikes the alert. 503 Feedback *string `json:"feedback,omitempty"` 504 // Comment - Additional comments related to the alert. 505 Comment *string `json:"comment,omitempty"` 506 // ConsentedToShare - Indicates if the alert feedback can be shared from product team. 507 ConsentedToShare *bool `json:"consentedToShare,omitempty"` 508 // ServiceMemberID - The server Id of the alert. 509 ServiceMemberID *string `json:"serviceMemberId,omitempty"` 510 // CreatedDate - The date and time,in UTC,when the alert was created. 511 CreatedDate *date.Time `json:"createdDate,omitempty"` 512} 513 514// AlertFeedbacks the list of alert feedback. 515type AlertFeedbacks struct { 516 autorest.Response `json:"-"` 517 // Value - The value returned by the operation. 518 Value *[]AlertFeedback `json:"value,omitempty"` 519} 520 521// Alerts the list of alerts for a service. 522type Alerts struct { 523 autorest.Response `json:"-"` 524 // Value - The value returned by the operation. 525 Value *[]Alert `json:"value,omitempty"` 526 // NextLink - The link used to get the next page of operations. 527 NextLink *string `json:"nextLink,omitempty"` 528 // TotalCount - The total count of alert elements. 529 TotalCount *int32 `json:"totalCount,omitempty"` 530 // ContinuationToken - The continuation token for paginated calls. 531 ContinuationToken *string `json:"continuationToken,omitempty"` 532} 533 534// AlertsIterator provides access to a complete listing of Alert values. 535type AlertsIterator struct { 536 i int 537 page AlertsPage 538} 539 540// NextWithContext advances to the next value. If there was an error making 541// the request the iterator does not advance and the error is returned. 542func (iter *AlertsIterator) NextWithContext(ctx context.Context) (err error) { 543 if tracing.IsEnabled() { 544 ctx = tracing.StartSpan(ctx, fqdn+"/AlertsIterator.NextWithContext") 545 defer func() { 546 sc := -1 547 if iter.Response().Response.Response != nil { 548 sc = iter.Response().Response.Response.StatusCode 549 } 550 tracing.EndSpan(ctx, sc, err) 551 }() 552 } 553 iter.i++ 554 if iter.i < len(iter.page.Values()) { 555 return nil 556 } 557 err = iter.page.NextWithContext(ctx) 558 if err != nil { 559 iter.i-- 560 return err 561 } 562 iter.i = 0 563 return nil 564} 565 566// Next advances to the next value. If there was an error making 567// the request the iterator does not advance and the error is returned. 568// Deprecated: Use NextWithContext() instead. 569func (iter *AlertsIterator) Next() error { 570 return iter.NextWithContext(context.Background()) 571} 572 573// NotDone returns true if the enumeration should be started or is not yet complete. 574func (iter AlertsIterator) NotDone() bool { 575 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 576} 577 578// Response returns the raw server response from the last page request. 579func (iter AlertsIterator) Response() Alerts { 580 return iter.page.Response() 581} 582 583// Value returns the current value or a zero-initialized value if the 584// iterator has advanced beyond the end of the collection. 585func (iter AlertsIterator) Value() Alert { 586 if !iter.page.NotDone() { 587 return Alert{} 588 } 589 return iter.page.Values()[iter.i] 590} 591 592// Creates a new instance of the AlertsIterator type. 593func NewAlertsIterator(page AlertsPage) AlertsIterator { 594 return AlertsIterator{page: page} 595} 596 597// IsEmpty returns true if the ListResult contains no values. 598func (a Alerts) IsEmpty() bool { 599 return a.Value == nil || len(*a.Value) == 0 600} 601 602// hasNextLink returns true if the NextLink is not empty. 603func (a Alerts) hasNextLink() bool { 604 return a.NextLink != nil && len(*a.NextLink) != 0 605} 606 607// alertsPreparer prepares a request to retrieve the next set of results. 608// It returns nil if no more results exist. 609func (a Alerts) alertsPreparer(ctx context.Context) (*http.Request, error) { 610 if !a.hasNextLink() { 611 return nil, nil 612 } 613 return autorest.Prepare((&http.Request{}).WithContext(ctx), 614 autorest.AsJSON(), 615 autorest.AsGet(), 616 autorest.WithBaseURL(to.String(a.NextLink))) 617} 618 619// AlertsPage contains a page of Alert values. 620type AlertsPage struct { 621 fn func(context.Context, Alerts) (Alerts, error) 622 a Alerts 623} 624 625// NextWithContext advances to the next page of values. If there was an error making 626// the request the page does not advance and the error is returned. 627func (page *AlertsPage) NextWithContext(ctx context.Context) (err error) { 628 if tracing.IsEnabled() { 629 ctx = tracing.StartSpan(ctx, fqdn+"/AlertsPage.NextWithContext") 630 defer func() { 631 sc := -1 632 if page.Response().Response.Response != nil { 633 sc = page.Response().Response.Response.StatusCode 634 } 635 tracing.EndSpan(ctx, sc, err) 636 }() 637 } 638 for { 639 next, err := page.fn(ctx, page.a) 640 if err != nil { 641 return err 642 } 643 page.a = next 644 if !next.hasNextLink() || !next.IsEmpty() { 645 break 646 } 647 } 648 return nil 649} 650 651// Next advances to the next page of values. If there was an error making 652// the request the page does not advance and the error is returned. 653// Deprecated: Use NextWithContext() instead. 654func (page *AlertsPage) Next() error { 655 return page.NextWithContext(context.Background()) 656} 657 658// NotDone returns true if the page enumeration should be started or is not yet complete. 659func (page AlertsPage) NotDone() bool { 660 return !page.a.IsEmpty() 661} 662 663// Response returns the raw server response from the last page request. 664func (page AlertsPage) Response() Alerts { 665 return page.a 666} 667 668// Values returns the slice of values for the current page or nil if there are no values. 669func (page AlertsPage) Values() []Alert { 670 if page.a.IsEmpty() { 671 return nil 672 } 673 return *page.a.Value 674} 675 676// Creates a new instance of the AlertsPage type. 677func NewAlertsPage(cur Alerts, getNextPage func(context.Context, Alerts) (Alerts, error)) AlertsPage { 678 return AlertsPage{ 679 fn: getNextPage, 680 a: cur, 681 } 682} 683 684// AssociatedObject object that hold sync object details. 685type AssociatedObject struct { 686 // DisplayName - The display name of the object. 687 DisplayName *string `json:"displayName,omitempty"` 688 // DistinguishedName - The distinguished name of the object. 689 DistinguishedName *string `json:"distinguishedName,omitempty"` 690 // LastDirSyncTime - The last dirSync time. 691 LastDirSyncTime *date.Time `json:"lastDirSyncTime,omitempty"` 692 // Mail - The email of the object. 693 Mail *string `json:"mail,omitempty"` 694 // ObjectGUID - The object guid. 695 ObjectGUID *string `json:"objectGuid,omitempty"` 696 // ObjectType - The object type. 697 ObjectType *string `json:"objectType,omitempty"` 698 // OnpremisesUserPrincipalName - The On-premises UPN. 699 OnpremisesUserPrincipalName *string `json:"onpremisesUserPrincipalName,omitempty"` 700 // ProxyAddresses - The proxy addresses. 701 ProxyAddresses *string `json:"proxyAddresses,omitempty"` 702 // SourceAnchor - The source anchor. 703 SourceAnchor *string `json:"sourceAnchor,omitempty"` 704 // SourceOfAuthority - The source of authority. 705 SourceOfAuthority *string `json:"sourceOfAuthority,omitempty"` 706 // TimeOccurred - The time of the error. 707 TimeOccurred *date.Time `json:"timeOccurred,omitempty"` 708 // UserPrincipalName - The UPN. 709 UserPrincipalName *string `json:"userPrincipalName,omitempty"` 710} 711 712// AttributeDelta the delta attributes. 713type AttributeDelta struct { 714 // Values - The delta values. 715 Values *[]ValueDelta `json:"values,omitempty"` 716 // Name - The name of the attribute delta. 717 Name *string `json:"name,omitempty"` 718 // OperationType - The attribute delta operation type. Possible values include: 'AttributeDeltaOperationTypeUndefined', 'AttributeDeltaOperationTypeAdd', 'AttributeDeltaOperationTypeReplace', 'AttributeDeltaOperationTypeUpdate', 'AttributeDeltaOperationTypeDelete' 719 OperationType AttributeDeltaOperationType `json:"operationType,omitempty"` 720 // ValueType - The value type. Possible values include: 'ValueTypeUndefined', 'ValueTypeDn', 'ValueTypeBinary', 'ValueTypeString', 'ValueTypeInteger', 'ValueTypeBoolean' 721 ValueType ValueType `json:"valueType,omitempty"` 722 // MultiValued - Indicates if the attribute delta is multivalued or not. 723 MultiValued *bool `json:"multiValued,omitempty"` 724} 725 726// AttributeMapping the attribute mapping details. 727type AttributeMapping struct { 728 // MappingSource - The mapping source. 729 MappingSource *AttributeMppingSource `json:"mappingSource,omitempty"` 730 // Type - The attribute mapping type. Possible values include: 'Constant', 'Direct', 'DnPart', 'Script' 731 Type AttributeMappingType `json:"type,omitempty"` 732 // DestinationAttribute - The destination attribute. 733 DestinationAttribute *string `json:"destinationAttribute,omitempty"` 734 // ContextID - The context Id. 735 ContextID *string `json:"contextId,omitempty"` 736} 737 738// AttributeMppingSource the attribute mapping source. 739type AttributeMppingSource struct { 740 // SourceAttribute - The source attribute. 741 SourceAttribute *[]string `json:"sourceAttribute,omitempty"` 742 // DnPart - The value for dn part. 743 DnPart *int32 `json:"dnPart,omitempty"` 744 // ScriptContext - The script context. 745 ScriptContext *string `json:"scriptContext,omitempty"` 746 // ConstantValue - The constant value. 747 ConstantValue *string `json:"constantValue,omitempty"` 748} 749 750// ChangeNotReimported the changes which are not re-imported. 751type ChangeNotReimported struct { 752 // Delta - The delta changes that is not re-imported. 753 Delta *ChangeNotReimportedDelta `json:"delta,omitempty"` 754 // Entry - The object entry in a change that is not re-imported. 755 Entry *ChangeNotReimportedEntry `json:"entry,omitempty"` 756} 757 758// ChangeNotReimportedDelta the delta in a change that is not re-imported. 759type ChangeNotReimportedDelta struct { 760 // Anchor - The anchor. 761 Anchor *string `json:"anchor,omitempty"` 762 // DnAttributes - The delta attributes for distinguished names. 763 DnAttributes *[]AttributeDelta `json:"dnAttributes,omitempty"` 764 // Attributes - The attributes. 765 Attributes *[]AttributeDelta `json:"attributes,omitempty"` 766 // OperationType - The operation type. Possible values include: 'DeltaOperationTypeUndefined', 'DeltaOperationTypeNone', 'DeltaOperationTypeAdd', 'DeltaOperationTypeReplace', 'DeltaOperationTypeUpdate', 'DeltaOperationTypeDelete', 'DeltaOperationTypeObsolete', 'DeltaOperationTypeDeleteAdd' 767 OperationType DeltaOperationType `json:"operationType,omitempty"` 768} 769 770// ChangeNotReimportedEntry the object entry in a change that is not re-imported. 771type ChangeNotReimportedEntry struct { 772 // Anchor - The anchor. 773 Anchor *string `json:"anchor,omitempty"` 774 // ParentAnchor - The parent anchor. 775 ParentAnchor *string `json:"parentAnchor,omitempty"` 776 // PrimaryObjectClass - The primary object class. 777 PrimaryObjectClass *string `json:"primaryObjectClass,omitempty"` 778 // ObjectClasses - The list of object classes. 779 ObjectClasses *[]string `json:"objectClasses,omitempty"` 780 // DnAttributes - The delta attributes for distinguished names. 781 DnAttributes *[]AttributeDelta `json:"dnAttributes,omitempty"` 782 // Attributes - The attributes. 783 Attributes *[]AttributeDelta `json:"attributes,omitempty"` 784 // Dn - The distinguished name. 785 Dn *string `json:"dn,omitempty"` 786} 787 788// Connector the connect details. 789type Connector struct { 790 // ConnectorID - The connector Id. 791 ConnectorID *string `json:"connectorId,omitempty"` 792 // ID - The connector Id. 793 ID *string `json:"id,omitempty"` 794 // Name - The connector name. 795 Name *string `json:"name,omitempty"` 796 // Version - The connector version 797 Version *int32 `json:"version,omitempty"` 798 // Type - The connector type. 799 Type *string `json:"type,omitempty"` 800 // Description - The connector description. 801 Description *string `json:"description,omitempty"` 802 // SchemaXML - The schema xml for the connector. 803 SchemaXML *string `json:"schemaXml,omitempty"` 804 // PasswordManagementSettings - The password management settings of the connector. 805 PasswordManagementSettings interface{} `json:"passwordManagementSettings,omitempty"` 806 // PasswordHashSyncConfiguration - The password hash synchronization configuration of the connector. 807 PasswordHashSyncConfiguration interface{} `json:"passwordHashSyncConfiguration,omitempty"` 808 // TimeCreated - The date and time when this connector was created. 809 TimeCreated *date.Time `json:"timeCreated,omitempty"` 810 // TimeLastModified - The date and time when this connector was last modified. 811 TimeLastModified *date.Time `json:"timeLastModified,omitempty"` 812 // Partitions - The partitions of the connector. 813 Partitions *[]Partition `json:"partitions,omitempty"` 814 // RunProfiles - The run profiles of the connector. 815 RunProfiles *[]RunProfile `json:"runProfiles,omitempty"` 816 // ClassesIncluded - The class inclusion list of the connector. 817 ClassesIncluded *[]string `json:"classesIncluded,omitempty"` 818 // AttributesIncluded - The attribute inclusion list of the connector. 819 AttributesIncluded *[]string `json:"attributesIncluded,omitempty"` 820} 821 822// ConnectorConnectionError the connector connection error. 823type ConnectorConnectionError struct { 824 // ID - The error Id. 825 ID *string `json:"id,omitempty"` 826 // RunStepResultID - The run step result Id. 827 RunStepResultID *string `json:"runStepResultId,omitempty"` 828 // ConnectorID - The connector Id. 829 ConnectorID *string `json:"connectorId,omitempty"` 830 // Type - The type of error. 831 Type *string `json:"type,omitempty"` 832 // ErrorCode - The error code. 833 ErrorCode *string `json:"errorCode,omitempty"` 834 // Message - The message for the connection error. 835 Message *string `json:"message,omitempty"` 836 // TimeOccured - The time when the connection error occurred. 837 TimeOccured *date.Time `json:"timeOccured,omitempty"` 838 // Server - The server where the connection error happened. 839 Server *string `json:"server,omitempty"` 840} 841 842// ConnectorConnectionErrors the list of connector connection errors. 843type ConnectorConnectionErrors struct { 844 // Value - The value returned by the operation. 845 Value *[]ConnectorConnectionError `json:"value,omitempty"` 846} 847 848// ConnectorMetadata gets the list of connectors and run profile names. 849type ConnectorMetadata struct { 850 autorest.Response `json:"-"` 851 // Connectors - The list of connectors. 852 Connectors *[]ConnectorMetadataDetails `json:"connectors,omitempty"` 853 // RunProfileNames - The list of run profile names. 854 RunProfileNames *[]string `json:"runProfileNames,omitempty"` 855} 856 857// ConnectorMetadataDetails details of the connector. 858type ConnectorMetadataDetails struct { 859 // ConnectorID - The Connector Id. 860 ConnectorID *string `json:"connectorId,omitempty"` 861 // ConnectorDisplayName - The Connector Display Name 862 ConnectorDisplayName *string `json:"connectorDisplayName,omitempty"` 863} 864 865// ConnectorObjectError the connector object error. 866type ConnectorObjectError struct { 867 // ID - The error Id. 868 ID *string `json:"id,omitempty"` 869 // RunStepResultID - The run step result Id. 870 RunStepResultID *string `json:"runStepResultId,omitempty"` 871 // ConnectorID - The connector Id. 872 ConnectorID *string `json:"connectorId,omitempty"` 873 // Type - The type of error. 874 Type *string `json:"type,omitempty"` 875 // ErrorCode - The error code. 876 ErrorCode *string `json:"errorCode,omitempty"` 877 // Message - The message for the object error. 878 Message *string `json:"message,omitempty"` 879 // EntryNumber - The entry number for object error occurred. 880 EntryNumber *int32 `json:"entryNumber,omitempty"` 881 // LineNumber - The line number for the object error. 882 LineNumber *int32 `json:"lineNumber,omitempty"` 883 // ColumnNumber - The column number for the object error. 884 ColumnNumber *int32 `json:"columnNumber,omitempty"` 885 // Dn - The distinguished name of the object. 886 Dn *string `json:"dn,omitempty"` 887 // Anchor - The name for the anchor of the object. 888 Anchor *string `json:"anchor,omitempty"` 889 // AttributeName - The attribute name of the object. 890 AttributeName *string `json:"attributeName,omitempty"` 891 // ServerErrorDetail - The server side error details. 892 ServerErrorDetail *string `json:"serverErrorDetail,omitempty"` 893 // Values - The value corresponding to attribute name. 894 Values *[]string `json:"values,omitempty"` 895} 896 897// ConnectorObjectErrors the list of connector object errors. 898type ConnectorObjectErrors struct { 899 // Value - The value returned by the operation. 900 Value *[]ConnectorObjectError `json:"value,omitempty"` 901} 902 903// Connectors the list of connects for a service. 904type Connectors struct { 905 autorest.Response `json:"-"` 906 // Value - The value returned by the operation. 907 Value *[]Connector `json:"value,omitempty"` 908} 909 910// Credential the credential for a given server. 911type Credential struct { 912 // Identifier - The credential identifier. 913 Identifier *string `json:"identifier,omitempty"` 914 // Type - The type of credential. 915 Type *string `json:"type,omitempty"` 916 // CredentialData - The credential data. 917 CredentialData *[]string `json:"credentialData,omitempty"` 918} 919 920// Credentials the list of agent credentials. 921type Credentials struct { 922 autorest.Response `json:"-"` 923 // Value - The value returned by the operation. 924 Value *[]Credential `json:"value,omitempty"` 925} 926 927// DataFreshnessDetails the data freshness details for the server. 928type DataFreshnessDetails struct { 929 autorest.Response `json:"-"` 930 // Value - The value returned by the operation. 931 Value *[]Item `json:"value,omitempty"` 932} 933 934// Dimension the connector object error. 935type Dimension struct { 936 // Health - The health status for the domain controller. Possible values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing' 937 Health HealthStatus `json:"health,omitempty"` 938 // SimpleProperties - List of service specific configuration properties. 939 SimpleProperties interface{} `json:"simpleProperties,omitempty"` 940 // ActiveAlerts - The count of alerts that are currently active for the service. 941 ActiveAlerts *int32 `json:"activeAlerts,omitempty"` 942 // AdditionalInformation - The additional information related to the service. 943 AdditionalInformation *string `json:"additionalInformation,omitempty"` 944 // LastUpdated - The date or time , in UTC, when the service properties were last updated. 945 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 946 // DisplayName - The display name of the service. 947 DisplayName *string `json:"displayName,omitempty"` 948 // ResolvedAlerts - The total count of alerts that has been resolved for the service. 949 ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"` 950 // Signature - The signature of the service. 951 Signature *string `json:"signature,omitempty"` 952 // 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. 953 Type *string `json:"type,omitempty"` 954} 955 956// Dimensions the list of dimensions. 957type Dimensions struct { 958 autorest.Response `json:"-"` 959 // NextLink - The link used to get the next page of operations. 960 NextLink *string `json:"nextLink,omitempty"` 961 // Value - The value returned by the operation. 962 Value *[]Dimension `json:"value,omitempty"` 963 // TotalCount - The total count of dimensions. 964 TotalCount *int32 `json:"totalCount,omitempty"` 965 // ContinuationToken - The continuation token for paginated calls. 966 ContinuationToken *string `json:"continuationToken,omitempty"` 967} 968 969// DimensionsIterator provides access to a complete listing of Dimension values. 970type DimensionsIterator struct { 971 i int 972 page DimensionsPage 973} 974 975// NextWithContext advances to the next value. If there was an error making 976// the request the iterator does not advance and the error is returned. 977func (iter *DimensionsIterator) NextWithContext(ctx context.Context) (err error) { 978 if tracing.IsEnabled() { 979 ctx = tracing.StartSpan(ctx, fqdn+"/DimensionsIterator.NextWithContext") 980 defer func() { 981 sc := -1 982 if iter.Response().Response.Response != nil { 983 sc = iter.Response().Response.Response.StatusCode 984 } 985 tracing.EndSpan(ctx, sc, err) 986 }() 987 } 988 iter.i++ 989 if iter.i < len(iter.page.Values()) { 990 return nil 991 } 992 err = iter.page.NextWithContext(ctx) 993 if err != nil { 994 iter.i-- 995 return err 996 } 997 iter.i = 0 998 return nil 999} 1000 1001// Next advances to the next value. If there was an error making 1002// the request the iterator does not advance and the error is returned. 1003// Deprecated: Use NextWithContext() instead. 1004func (iter *DimensionsIterator) Next() error { 1005 return iter.NextWithContext(context.Background()) 1006} 1007 1008// NotDone returns true if the enumeration should be started or is not yet complete. 1009func (iter DimensionsIterator) NotDone() bool { 1010 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1011} 1012 1013// Response returns the raw server response from the last page request. 1014func (iter DimensionsIterator) Response() Dimensions { 1015 return iter.page.Response() 1016} 1017 1018// Value returns the current value or a zero-initialized value if the 1019// iterator has advanced beyond the end of the collection. 1020func (iter DimensionsIterator) Value() Dimension { 1021 if !iter.page.NotDone() { 1022 return Dimension{} 1023 } 1024 return iter.page.Values()[iter.i] 1025} 1026 1027// Creates a new instance of the DimensionsIterator type. 1028func NewDimensionsIterator(page DimensionsPage) DimensionsIterator { 1029 return DimensionsIterator{page: page} 1030} 1031 1032// IsEmpty returns true if the ListResult contains no values. 1033func (d Dimensions) IsEmpty() bool { 1034 return d.Value == nil || len(*d.Value) == 0 1035} 1036 1037// hasNextLink returns true if the NextLink is not empty. 1038func (d Dimensions) hasNextLink() bool { 1039 return d.NextLink != nil && len(*d.NextLink) != 0 1040} 1041 1042// dimensionsPreparer prepares a request to retrieve the next set of results. 1043// It returns nil if no more results exist. 1044func (d Dimensions) dimensionsPreparer(ctx context.Context) (*http.Request, error) { 1045 if !d.hasNextLink() { 1046 return nil, nil 1047 } 1048 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1049 autorest.AsJSON(), 1050 autorest.AsGet(), 1051 autorest.WithBaseURL(to.String(d.NextLink))) 1052} 1053 1054// DimensionsPage contains a page of Dimension values. 1055type DimensionsPage struct { 1056 fn func(context.Context, Dimensions) (Dimensions, error) 1057 d Dimensions 1058} 1059 1060// NextWithContext advances to the next page of values. If there was an error making 1061// the request the page does not advance and the error is returned. 1062func (page *DimensionsPage) NextWithContext(ctx context.Context) (err error) { 1063 if tracing.IsEnabled() { 1064 ctx = tracing.StartSpan(ctx, fqdn+"/DimensionsPage.NextWithContext") 1065 defer func() { 1066 sc := -1 1067 if page.Response().Response.Response != nil { 1068 sc = page.Response().Response.Response.StatusCode 1069 } 1070 tracing.EndSpan(ctx, sc, err) 1071 }() 1072 } 1073 for { 1074 next, err := page.fn(ctx, page.d) 1075 if err != nil { 1076 return err 1077 } 1078 page.d = next 1079 if !next.hasNextLink() || !next.IsEmpty() { 1080 break 1081 } 1082 } 1083 return nil 1084} 1085 1086// Next advances to the next page of values. If there was an error making 1087// the request the page does not advance and the error is returned. 1088// Deprecated: Use NextWithContext() instead. 1089func (page *DimensionsPage) Next() error { 1090 return page.NextWithContext(context.Background()) 1091} 1092 1093// NotDone returns true if the page enumeration should be started or is not yet complete. 1094func (page DimensionsPage) NotDone() bool { 1095 return !page.d.IsEmpty() 1096} 1097 1098// Response returns the raw server response from the last page request. 1099func (page DimensionsPage) Response() Dimensions { 1100 return page.d 1101} 1102 1103// Values returns the slice of values for the current page or nil if there are no values. 1104func (page DimensionsPage) Values() []Dimension { 1105 if page.d.IsEmpty() { 1106 return nil 1107 } 1108 return *page.d.Value 1109} 1110 1111// Creates a new instance of the DimensionsPage type. 1112func NewDimensionsPage(cur Dimensions, getNextPage func(context.Context, Dimensions) (Dimensions, error)) DimensionsPage { 1113 return DimensionsPage{ 1114 fn: getNextPage, 1115 d: cur, 1116 } 1117} 1118 1119// Display displays the details related to operations supported by Azure Active Directory Connect Health. 1120type Display struct { 1121 // Description - The description for the operation. 1122 Description *string `json:"description,omitempty"` 1123 // Operation - The details of the operation. 1124 Operation *string `json:"operation,omitempty"` 1125 // Provider - The provider name. 1126 Provider *string `json:"provider,omitempty"` 1127} 1128 1129// ErrorCount the error count details. 1130type ErrorCount struct { 1131 // ErrorBucket - The error bucket. 1132 ErrorBucket *string `json:"errorBucket,omitempty"` 1133 // Count - The error count. 1134 Count *int32 `json:"count,omitempty"` 1135 // Truncated - Indicates if the error count is truncated or not. 1136 Truncated *bool `json:"truncated,omitempty"` 1137} 1138 1139// ErrorCounts the list of error counts. 1140type ErrorCounts struct { 1141 autorest.Response `json:"-"` 1142 // Value - The value returned by the operation. 1143 Value *[]ErrorCount `json:"value,omitempty"` 1144} 1145 1146// ErrorDetail the error details. 1147type ErrorDetail struct { 1148 // Description - The error description. 1149 Description *string `json:"description,omitempty"` 1150 // KbURL - The knowledge base article url which contains more information about the error. 1151 KbURL *string `json:"kbUrl,omitempty"` 1152 // Detail - Additional details related to the error. 1153 Detail *string `json:"detail,omitempty"` 1154 // ObjectsWithSyncError - The list of objects with sync errors. 1155 ObjectsWithSyncError *ObjectWithSyncError `json:"objectsWithSyncError,omitempty"` 1156 // ObjectWithSyncError - The object with sync error. 1157 ObjectWithSyncError *MergedExportError `json:"objectWithSyncError,omitempty"` 1158} 1159 1160// ErrorReportUsersEntries the list of bad password log in attempt entries. 1161type ErrorReportUsersEntries struct { 1162 autorest.Response `json:"-"` 1163 // Value - The value returned by the operation. 1164 Value *[]ErrorReportUsersEntry `json:"value,omitempty"` 1165} 1166 1167// ErrorReportUsersEntry the bad password login attempt details. 1168type ErrorReportUsersEntry struct { 1169 // UserID - The user ID value. 1170 UserID *string `json:"userId,omitempty"` 1171 // IPAddress - The IP address corresponding to the last error event. 1172 IPAddress *string `json:"ipAddress,omitempty"` 1173 // LastUpdated - The date and time when the last error event was logged. 1174 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 1175 // UniqueIPAddresses - The list of unique IP addresses. 1176 UniqueIPAddresses *string `json:"uniqueIpAddresses,omitempty"` 1177 // TotalErrorAttempts - The total count of specific error events. 1178 TotalErrorAttempts *int32 `json:"totalErrorAttempts,omitempty"` 1179} 1180 1181// ExportError the export error details. 1182type ExportError struct { 1183 // ID - The error Id. 1184 ID *string `json:"id,omitempty"` 1185 // RunStepResultID - The run step result Id. 1186 RunStepResultID *string `json:"runStepResultId,omitempty"` 1187 // ConnectorID - The connector Id. 1188 ConnectorID *string `json:"connectorId,omitempty"` 1189 // Type - The type of error. 1190 Type *string `json:"type,omitempty"` 1191 // ErrorCode - The error code. 1192 ErrorCode *string `json:"errorCode,omitempty"` 1193 // Message - The export error message. 1194 Message *string `json:"message,omitempty"` 1195 // ServerErrorDetail - The server error detail. 1196 ServerErrorDetail *string `json:"serverErrorDetail,omitempty"` 1197 // TimeFirstOccured - The date and time when the export error first occurred. 1198 TimeFirstOccured *date.Time `json:"timeFirstOccured,omitempty"` 1199 // RetryCount - The retry count. 1200 RetryCount *int32 `json:"retryCount,omitempty"` 1201 // CsObjectID - The cloud object Id. 1202 CsObjectID *string `json:"csObjectId,omitempty"` 1203 // Dn - The distinguished name. 1204 Dn *string `json:"dn,omitempty"` 1205 // MinLimit - The minimum limit. 1206 MinLimit *string `json:"minLimit,omitempty"` 1207 // MaxLimit - The maximum limit. 1208 MaxLimit *string `json:"maxLimit,omitempty"` 1209 // CloudAnchor - The name of the cloud anchor. 1210 CloudAnchor *string `json:"cloudAnchor,omitempty"` 1211 // AttributeName - The attribute name. 1212 AttributeName *string `json:"attributeName,omitempty"` 1213 // AttributeValue - The attribute value. 1214 AttributeValue *string `json:"attributeValue,omitempty"` 1215 // AttributeMultiValue - Indicates if the attribute is multi valued or not. 1216 AttributeMultiValue *bool `json:"attributeMultiValue,omitempty"` 1217 // ObjectIDConflict - The object Id with which there was an attribute conflict. 1218 ObjectIDConflict *string `json:"objectIdConflict,omitempty"` 1219 // SamAccountName - The SAM account name. 1220 SamAccountName *string `json:"samAccountName,omitempty"` 1221 // AdObjectType - The AD object type 1222 AdObjectType *string `json:"adObjectType,omitempty"` 1223 // AdObjectGUID - The AD object guid. 1224 AdObjectGUID *string `json:"adObjectGuid,omitempty"` 1225 // AdDisplayName - The display name for the AD object. 1226 AdDisplayName *string `json:"adDisplayName,omitempty"` 1227 // AdSourceOfAuthority - The source of authority for the AD object. 1228 AdSourceOfAuthority *string `json:"adSourceOfAuthority,omitempty"` 1229 // AdSourceAnchor - The AD source anchor. 1230 AdSourceAnchor *string `json:"adSourceAnchor,omitempty"` 1231 // AdUserPrincipalName - The user principal name for the AD object. 1232 AdUserPrincipalName *string `json:"adUserPrincipalName,omitempty"` 1233 // AdDistinguishedName - The distinguished name for the AD object. 1234 AdDistinguishedName *string `json:"adDistinguishedName,omitempty"` 1235 // AdMail - The email for the AD object. 1236 AdMail *string `json:"adMail,omitempty"` 1237 // TimeOccured - The date and time of occurrence. 1238 TimeOccured *date.Time `json:"timeOccured,omitempty"` 1239 // AadObjectType - The AAD side object type. 1240 AadObjectType *string `json:"aadObjectType,omitempty"` 1241 // AadObjectGUID - The AAD side object guid. 1242 AadObjectGUID *string `json:"aadObjectGuid,omitempty"` 1243 // AadDisplayName - The AAD side display name 1244 AadDisplayName *string `json:"aadDisplayName,omitempty"` 1245 // AadSourceOfAuthority - The AAD side source of authority for the object. 1246 AadSourceOfAuthority *string `json:"aadSourceOfAuthority,omitempty"` 1247 // AadUserPrincipalName - The AAD side user principal name. 1248 AadUserPrincipalName *string `json:"aadUserPrincipalName,omitempty"` 1249 // AadDistinguishedName - The AAD side distinguished name for the object. 1250 AadDistinguishedName *string `json:"aadDistinguishedName,omitempty"` 1251 // AadMail - The AAD side email for the object. 1252 AadMail *string `json:"aadMail,omitempty"` 1253 // LastDirSyncTime - The date and time of last sync run. 1254 LastDirSyncTime *date.Time `json:"lastDirSyncTime,omitempty"` 1255 // ModifiedAttributeValue - The modified attribute value. 1256 ModifiedAttributeValue *string `json:"modifiedAttributeValue,omitempty"` 1257} 1258 1259// ExportErrors the list of export errors. 1260type ExportErrors struct { 1261 // Value - The value returned by the operation. 1262 Value *[]ExportError `json:"value,omitempty"` 1263} 1264 1265// ExportStatus the details of the export status. 1266type ExportStatus struct { 1267 // ServiceID - The id of the service for whom the export status is being reported. 1268 ServiceID *uuid.UUID `json:"serviceId,omitempty"` 1269 // ServiceMemberID - The server Id for whom the export status is being reported. 1270 ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"` 1271 // EndTime - The date and time when the export ended. 1272 EndTime *date.Time `json:"endTime,omitempty"` 1273 // RunStepResultID - The run step result Id. 1274 RunStepResultID *string `json:"runStepResultId,omitempty"` 1275} 1276 1277// ExportStatuses the list of export statuses. 1278type ExportStatuses struct { 1279 autorest.Response `json:"-"` 1280 // NextLink - The link used to get the next page of operations. 1281 NextLink *string `json:"nextLink,omitempty"` 1282 // Value - The value returned by the operation. 1283 Value *[]ExportStatus `json:"value,omitempty"` 1284 // TotalCount - The total count of service elements. 1285 TotalCount *int32 `json:"totalCount,omitempty"` 1286 // ContinuationToken - The continuation token for paginated calls. 1287 ContinuationToken *string `json:"continuationToken,omitempty"` 1288} 1289 1290// ExportStatusesIterator provides access to a complete listing of ExportStatus values. 1291type ExportStatusesIterator struct { 1292 i int 1293 page ExportStatusesPage 1294} 1295 1296// NextWithContext advances to the next value. If there was an error making 1297// the request the iterator does not advance and the error is returned. 1298func (iter *ExportStatusesIterator) NextWithContext(ctx context.Context) (err error) { 1299 if tracing.IsEnabled() { 1300 ctx = tracing.StartSpan(ctx, fqdn+"/ExportStatusesIterator.NextWithContext") 1301 defer func() { 1302 sc := -1 1303 if iter.Response().Response.Response != nil { 1304 sc = iter.Response().Response.Response.StatusCode 1305 } 1306 tracing.EndSpan(ctx, sc, err) 1307 }() 1308 } 1309 iter.i++ 1310 if iter.i < len(iter.page.Values()) { 1311 return nil 1312 } 1313 err = iter.page.NextWithContext(ctx) 1314 if err != nil { 1315 iter.i-- 1316 return err 1317 } 1318 iter.i = 0 1319 return nil 1320} 1321 1322// Next advances to the next value. If there was an error making 1323// the request the iterator does not advance and the error is returned. 1324// Deprecated: Use NextWithContext() instead. 1325func (iter *ExportStatusesIterator) Next() error { 1326 return iter.NextWithContext(context.Background()) 1327} 1328 1329// NotDone returns true if the enumeration should be started or is not yet complete. 1330func (iter ExportStatusesIterator) NotDone() bool { 1331 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1332} 1333 1334// Response returns the raw server response from the last page request. 1335func (iter ExportStatusesIterator) Response() ExportStatuses { 1336 return iter.page.Response() 1337} 1338 1339// Value returns the current value or a zero-initialized value if the 1340// iterator has advanced beyond the end of the collection. 1341func (iter ExportStatusesIterator) Value() ExportStatus { 1342 if !iter.page.NotDone() { 1343 return ExportStatus{} 1344 } 1345 return iter.page.Values()[iter.i] 1346} 1347 1348// Creates a new instance of the ExportStatusesIterator type. 1349func NewExportStatusesIterator(page ExportStatusesPage) ExportStatusesIterator { 1350 return ExportStatusesIterator{page: page} 1351} 1352 1353// IsEmpty returns true if the ListResult contains no values. 1354func (es ExportStatuses) IsEmpty() bool { 1355 return es.Value == nil || len(*es.Value) == 0 1356} 1357 1358// hasNextLink returns true if the NextLink is not empty. 1359func (es ExportStatuses) hasNextLink() bool { 1360 return es.NextLink != nil && len(*es.NextLink) != 0 1361} 1362 1363// exportStatusesPreparer prepares a request to retrieve the next set of results. 1364// It returns nil if no more results exist. 1365func (es ExportStatuses) exportStatusesPreparer(ctx context.Context) (*http.Request, error) { 1366 if !es.hasNextLink() { 1367 return nil, nil 1368 } 1369 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1370 autorest.AsJSON(), 1371 autorest.AsGet(), 1372 autorest.WithBaseURL(to.String(es.NextLink))) 1373} 1374 1375// ExportStatusesPage contains a page of ExportStatus values. 1376type ExportStatusesPage struct { 1377 fn func(context.Context, ExportStatuses) (ExportStatuses, error) 1378 es ExportStatuses 1379} 1380 1381// NextWithContext advances to the next page of values. If there was an error making 1382// the request the page does not advance and the error is returned. 1383func (page *ExportStatusesPage) NextWithContext(ctx context.Context) (err error) { 1384 if tracing.IsEnabled() { 1385 ctx = tracing.StartSpan(ctx, fqdn+"/ExportStatusesPage.NextWithContext") 1386 defer func() { 1387 sc := -1 1388 if page.Response().Response.Response != nil { 1389 sc = page.Response().Response.Response.StatusCode 1390 } 1391 tracing.EndSpan(ctx, sc, err) 1392 }() 1393 } 1394 for { 1395 next, err := page.fn(ctx, page.es) 1396 if err != nil { 1397 return err 1398 } 1399 page.es = next 1400 if !next.hasNextLink() || !next.IsEmpty() { 1401 break 1402 } 1403 } 1404 return nil 1405} 1406 1407// Next advances to the next page of values. If there was an error making 1408// the request the page does not advance and the error is returned. 1409// Deprecated: Use NextWithContext() instead. 1410func (page *ExportStatusesPage) Next() error { 1411 return page.NextWithContext(context.Background()) 1412} 1413 1414// NotDone returns true if the page enumeration should be started or is not yet complete. 1415func (page ExportStatusesPage) NotDone() bool { 1416 return !page.es.IsEmpty() 1417} 1418 1419// Response returns the raw server response from the last page request. 1420func (page ExportStatusesPage) Response() ExportStatuses { 1421 return page.es 1422} 1423 1424// Values returns the slice of values for the current page or nil if there are no values. 1425func (page ExportStatusesPage) Values() []ExportStatus { 1426 if page.es.IsEmpty() { 1427 return nil 1428 } 1429 return *page.es.Value 1430} 1431 1432// Creates a new instance of the ExportStatusesPage type. 1433func NewExportStatusesPage(cur ExportStatuses, getNextPage func(context.Context, ExportStatuses) (ExportStatuses, error)) ExportStatusesPage { 1434 return ExportStatusesPage{ 1435 fn: getNextPage, 1436 es: cur, 1437 } 1438} 1439 1440// ExtensionErrorInfo the extension error details. 1441type ExtensionErrorInfo struct { 1442 // ExtensionName - The extension name. 1443 ExtensionName *string `json:"extensionName,omitempty"` 1444 // ExtensionContext - The extension context. 1445 ExtensionContext *string `json:"extensionContext,omitempty"` 1446 // CallStack - The call stack for the error. 1447 CallStack *string `json:"callStack,omitempty"` 1448} 1449 1450// ForestSummary the forest summary for an ADDS domain. 1451type ForestSummary struct { 1452 autorest.Response `json:"-"` 1453 // ForestName - The forest name. 1454 ForestName *string `json:"forestName,omitempty"` 1455 // DomainCount - The domain count. 1456 DomainCount *int32 `json:"domainCount,omitempty"` 1457 // SiteCount - The site count. 1458 SiteCount *int32 `json:"siteCount,omitempty"` 1459 // MonitoredDcCount - The number of domain controllers that are monitored by Azure Active Directory Connect Health. 1460 MonitoredDcCount *int32 `json:"monitoredDcCount,omitempty"` 1461 // TotalDcCount - The total domain controllers. 1462 TotalDcCount *int32 `json:"totalDcCount,omitempty"` 1463 // Domains - The list of domain controller names. 1464 Domains *[]string `json:"domains,omitempty"` 1465 // Sites - The list of site names. 1466 Sites *[]string `json:"sites,omitempty"` 1467} 1468 1469// GlobalConfiguration the global configuration settings. 1470type GlobalConfiguration struct { 1471 // Version - The version for the global configuration. 1472 Version *int32 `json:"version,omitempty"` 1473 // SchemaXML - The schema for the configuration. 1474 SchemaXML *string `json:"schemaXml,omitempty"` 1475 // PasswordSyncEnabled - Indicates if password sync is enabled or not. 1476 PasswordSyncEnabled *bool `json:"passwordSyncEnabled,omitempty"` 1477 // NumSavedPwdEvent - The number of saved password events. 1478 NumSavedPwdEvent *int32 `json:"numSavedPwdEvent,omitempty"` 1479 // FeatureSet - The list of additional feature sets. 1480 FeatureSet *[]Item `json:"featureSet,omitempty"` 1481} 1482 1483// GlobalConfigurations the list of global configurations. 1484type GlobalConfigurations struct { 1485 autorest.Response `json:"-"` 1486 // Value - The value returned by the operation. 1487 Value *[]GlobalConfiguration `json:"value,omitempty"` 1488} 1489 1490// HelpLink the help link which contains more information related to an alert. 1491type HelpLink struct { 1492 // Title - The title for the link. 1493 Title *string `json:"title,omitempty"` 1494 // URL - The url for the help document. 1495 URL *string `json:"url,omitempty"` 1496} 1497 1498// Hotfix the details of the hotfix installed in the server. 1499type Hotfix struct { 1500 // KbName - The name of the hotfix KB. 1501 KbName *string `json:"kbName,omitempty"` 1502 // Link - The link to the KB Article. 1503 Link *string `json:"link,omitempty"` 1504 // InstalledDate - The date and time, in UTC, when the KB was installed in the server. 1505 InstalledDate *date.Time `json:"installedDate,omitempty"` 1506} 1507 1508// Hotfixes the list of hotfixes installed in the server. 1509type Hotfixes struct { 1510 // Value - The value returned by the operation. 1511 Value *[]Hotfix `json:"value,omitempty"` 1512} 1513 1514// ImportError the import error details. 1515type ImportError struct { 1516 // ID - The error Id. 1517 ID *string `json:"id,omitempty"` 1518 // RunStepResultID - The run step result Id. 1519 RunStepResultID *string `json:"runStepResultId,omitempty"` 1520 // ConnectorID - The connector Id. 1521 ConnectorID *string `json:"connectorId,omitempty"` 1522 // Type - The type of error. 1523 Type *string `json:"type,omitempty"` 1524 // TimeOccurred - The time when the import error occurred. 1525 TimeOccurred *date.Time `json:"timeOccurred,omitempty"` 1526 // TimeFirstOccurred - The time when the import error first occurred. 1527 TimeFirstOccurred *date.Time `json:"timeFirstOccurred,omitempty"` 1528 // RetryCount - The retry count. 1529 RetryCount *int32 `json:"retryCount,omitempty"` 1530 // AlgorithmStepType - The operation type specific to error reporting. Possible values include: 'Undefined', 'Staging', 'ConnectorFilter', 'Join', 'Projection', 'ImportFlow', 'Provisioning', 'ValidateConnectorFilter', 'Deprovisioning', 'ExportFlow', 'MvDeletion', 'Recall', 'MvObjectTypeChange' 1531 AlgorithmStepType AlgorithmStepType `json:"algorithmStepType,omitempty"` 1532 // ChangeNotReimported - The change details that is not re-imported. 1533 ChangeNotReimported *ChangeNotReimported `json:"changeNotReimported,omitempty"` 1534 // ExtensionErrorInfo - The extension error information. 1535 ExtensionErrorInfo *ExtensionErrorInfo `json:"extensionErrorInfo,omitempty"` 1536 // RuleErrorInfo - The error details in legacy rule processing. 1537 RuleErrorInfo *RuleErrorInfo `json:"ruleErrorInfo,omitempty"` 1538 // CsObjectID - The object Id. 1539 CsObjectID *string `json:"csObjectId,omitempty"` 1540 // Dn - The distinguished name. 1541 Dn *string `json:"dn,omitempty"` 1542} 1543 1544// ImportErrors the list of import errors. 1545type ImportErrors struct { 1546 // Value - The value returned by the operation. 1547 Value *[]ImportError `json:"value,omitempty"` 1548} 1549 1550// InboundReplicationNeighbor the replication summary for the domain controller inbound neighbor. 1551type InboundReplicationNeighbor struct { 1552 // SourceDomainController - The name of the source domain controller. 1553 SourceDomainController *string `json:"sourceDomainController,omitempty"` 1554 // ConsecutiveFailureCount - The number of consecutive failure counts. 1555 ConsecutiveFailureCount *int32 `json:"consecutiveFailureCount,omitempty"` 1556 // NamingContext - The naming context. 1557 NamingContext *string `json:"namingContext,omitempty"` 1558 // Status - The health status for the domain controller 1559 Status *int32 `json:"status,omitempty"` 1560 // LastAttemptedSync - The last time a sync was attempted on the domain controller. 1561 LastAttemptedSync *date.Time `json:"lastAttemptedSync,omitempty"` 1562 // LastSuccessfulSync - The last time when a successful sync happened. 1563 LastSuccessfulSync *date.Time `json:"lastSuccessfulSync,omitempty"` 1564 // LastErrorCode - The last error code. 1565 LastErrorCode *int32 `json:"lastErrorCode,omitempty"` 1566 // LastErrorMessage - The error message of the last error. 1567 LastErrorMessage *string `json:"lastErrorMessage,omitempty"` 1568 // ErrorTitle - The error title. 1569 ErrorTitle *string `json:"errorTitle,omitempty"` 1570 // ErrorDescription - The error description. 1571 ErrorDescription *string `json:"errorDescription,omitempty"` 1572 // FixLink - The link for the fix of the error. 1573 FixLink *string `json:"fixLink,omitempty"` 1574 // FixDetails - The details of the fix. 1575 FixDetails *string `json:"fixDetails,omitempty"` 1576 // AdditionalInfo - The additional details. 1577 AdditionalInfo *string `json:"additionalInfo,omitempty"` 1578} 1579 1580// InboundReplicationNeighbors the list of replication summary for the domain controller inbound neighbor. 1581type InboundReplicationNeighbors struct { 1582 // Value - The details of inbound replication neighbors. 1583 Value *[]InboundReplicationNeighbor `json:"value,omitempty"` 1584} 1585 1586// IPAddressAggregate the key value pair for properties. 1587type IPAddressAggregate struct { 1588 // ID - Unique ID for the entree 1589 ID *string `json:"id,omitempty"` 1590 // TenantID - The tenant ID 1591 TenantID *string `json:"tenantId,omitempty"` 1592 // ServiceID - The service ID 1593 ServiceID *string `json:"serviceId,omitempty"` 1594 // IPAddress - The IP address from where the attempted login originated from. 1595 IPAddress *string `json:"ipAddress,omitempty"` 1596 // Timestamp - When the event occurred 1597 Timestamp *string `json:"timestamp,omitempty"` 1598 // FirstAuditTimestamp - The first audit timestamp 1599 FirstAuditTimestamp *string `json:"firstAuditTimestamp,omitempty"` 1600 // LastAuditTimestamp - The last audit timestamp 1601 LastAuditTimestamp *string `json:"lastAuditTimestamp,omitempty"` 1602 // ExtranetLockoutErrorCount - The extranet lockout error count 1603 ExtranetLockoutErrorCount *int32 `json:"extranetLockoutErrorCount,omitempty"` 1604 // BadPasswordErrorCount - The bad password error count 1605 BadPasswordErrorCount *int32 `json:"badPasswordErrorCount,omitempty"` 1606 // UniqueUsernamesAttemptedCount - The unique usernames attempted 1607 UniqueUsernamesAttemptedCount *int32 `json:"uniqueUsernamesAttemptedCount,omitempty"` 1608 // AttemptCountThresholdIsExceeded - A value indicating whether the attempt count threshold been exceeded 1609 AttemptCountThresholdIsExceeded *bool `json:"attemptCountThresholdIsExceeded,omitempty"` 1610 // TimeSpan - The duration of the event 1611 TimeSpan *string `json:"timeSpan,omitempty"` 1612 // IsWhitelistedIPAddress - A value indicating whether the IP address has been whitelisted. 1613 IsWhitelistedIPAddress *bool `json:"isWhitelistedIpAddress,omitempty"` 1614 // NetworkLocation - The network location 1615 NetworkLocation *string `json:"networkLocation,omitempty"` 1616 // AttemptCountThresholdOnTrigger - The attempted count threshold on trigger. 1617 AttemptCountThresholdOnTrigger *int32 `json:"attemptCountThresholdOnTrigger,omitempty"` 1618 // AttemptThresholdTypeOnTrigger - The attempted threshold type on trigger. 1619 AttemptThresholdTypeOnTrigger *string `json:"attemptThresholdTypeOnTrigger,omitempty"` 1620 // GeographicLocation - The geographic location. 1621 GeographicLocation *string `json:"geographicLocation,omitempty"` 1622} 1623 1624// IPAddressAggregates IP address aggregates. 1625type IPAddressAggregates struct { 1626 autorest.Response `json:"-"` 1627 // Value - The value returned by the operation. 1628 Value *[]IPAddressAggregate `json:"value,omitempty"` 1629 // NextLink - URL to get the next set of IP Aggregate list results if there are any. 1630 NextLink *string `json:"nextLink,omitempty"` 1631 // TotalCount - The number of results. 1632 TotalCount *int32 `json:"totalCount,omitempty"` 1633 // ContinuationToken - The continuation token for paginated calls. 1634 ContinuationToken *string `json:"continuationToken,omitempty"` 1635} 1636 1637// IPAddressAggregateSetting the key value pair for IP aggregate thresholds. 1638type IPAddressAggregateSetting struct { 1639 autorest.Response `json:"-"` 1640 // ID - Unique ID for the entree 1641 ID *string `json:"id,omitempty"` 1642 // BadPasswordAndExtranetLockoutCombinedDailyThreshold - This threshold setting defines the per day trigger for a new event to be generated in the report. 1643 BadPasswordAndExtranetLockoutCombinedDailyThreshold *int32 `json:"badPasswordAndExtranetLockoutCombinedDailyThreshold,omitempty"` 1644 // BadPasswordAndExtranetLockoutCombinedHourlyThreshold - This threshold setting defines the per hour trigger for a new event to be generated in the report. 1645 BadPasswordAndExtranetLockoutCombinedHourlyThreshold *int32 `json:"badPasswordAndExtranetLockoutCombinedHourlyThreshold,omitempty"` 1646 // ExtranetLockoutDailyThreshold - This threshold setting defines the per hour trigger for a new event to be generated in the report. 1647 ExtranetLockoutDailyThreshold *int32 `json:"extranetLockoutDailyThreshold,omitempty"` 1648 // ExtranetLockoutHourlyThreshold - This threshold setting defines the per hour trigger for a new event to be generated in the report. 1649 ExtranetLockoutHourlyThreshold *int32 `json:"extranetLockoutHourlyThreshold,omitempty"` 1650 // EmailNotificationEnabled - A value indicating whether email notification has been enabled. 1651 EmailNotificationEnabled *bool `json:"emailNotificationEnabled,omitempty"` 1652} 1653 1654// IPAddressAggregatesIterator provides access to a complete listing of IPAddressAggregate values. 1655type IPAddressAggregatesIterator struct { 1656 i int 1657 page IPAddressAggregatesPage 1658} 1659 1660// NextWithContext advances to the next value. If there was an error making 1661// the request the iterator does not advance and the error is returned. 1662func (iter *IPAddressAggregatesIterator) NextWithContext(ctx context.Context) (err error) { 1663 if tracing.IsEnabled() { 1664 ctx = tracing.StartSpan(ctx, fqdn+"/IPAddressAggregatesIterator.NextWithContext") 1665 defer func() { 1666 sc := -1 1667 if iter.Response().Response.Response != nil { 1668 sc = iter.Response().Response.Response.StatusCode 1669 } 1670 tracing.EndSpan(ctx, sc, err) 1671 }() 1672 } 1673 iter.i++ 1674 if iter.i < len(iter.page.Values()) { 1675 return nil 1676 } 1677 err = iter.page.NextWithContext(ctx) 1678 if err != nil { 1679 iter.i-- 1680 return err 1681 } 1682 iter.i = 0 1683 return nil 1684} 1685 1686// Next advances to the next value. If there was an error making 1687// the request the iterator does not advance and the error is returned. 1688// Deprecated: Use NextWithContext() instead. 1689func (iter *IPAddressAggregatesIterator) Next() error { 1690 return iter.NextWithContext(context.Background()) 1691} 1692 1693// NotDone returns true if the enumeration should be started or is not yet complete. 1694func (iter IPAddressAggregatesIterator) NotDone() bool { 1695 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1696} 1697 1698// Response returns the raw server response from the last page request. 1699func (iter IPAddressAggregatesIterator) Response() IPAddressAggregates { 1700 return iter.page.Response() 1701} 1702 1703// Value returns the current value or a zero-initialized value if the 1704// iterator has advanced beyond the end of the collection. 1705func (iter IPAddressAggregatesIterator) Value() IPAddressAggregate { 1706 if !iter.page.NotDone() { 1707 return IPAddressAggregate{} 1708 } 1709 return iter.page.Values()[iter.i] 1710} 1711 1712// Creates a new instance of the IPAddressAggregatesIterator type. 1713func NewIPAddressAggregatesIterator(page IPAddressAggregatesPage) IPAddressAggregatesIterator { 1714 return IPAddressAggregatesIterator{page: page} 1715} 1716 1717// IsEmpty returns true if the ListResult contains no values. 1718func (iaa IPAddressAggregates) IsEmpty() bool { 1719 return iaa.Value == nil || len(*iaa.Value) == 0 1720} 1721 1722// hasNextLink returns true if the NextLink is not empty. 1723func (iaa IPAddressAggregates) hasNextLink() bool { 1724 return iaa.NextLink != nil && len(*iaa.NextLink) != 0 1725} 1726 1727// iPAddressAggregatesPreparer prepares a request to retrieve the next set of results. 1728// It returns nil if no more results exist. 1729func (iaa IPAddressAggregates) iPAddressAggregatesPreparer(ctx context.Context) (*http.Request, error) { 1730 if !iaa.hasNextLink() { 1731 return nil, nil 1732 } 1733 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1734 autorest.AsJSON(), 1735 autorest.AsGet(), 1736 autorest.WithBaseURL(to.String(iaa.NextLink))) 1737} 1738 1739// IPAddressAggregatesPage contains a page of IPAddressAggregate values. 1740type IPAddressAggregatesPage struct { 1741 fn func(context.Context, IPAddressAggregates) (IPAddressAggregates, error) 1742 iaa IPAddressAggregates 1743} 1744 1745// NextWithContext advances to the next page of values. If there was an error making 1746// the request the page does not advance and the error is returned. 1747func (page *IPAddressAggregatesPage) NextWithContext(ctx context.Context) (err error) { 1748 if tracing.IsEnabled() { 1749 ctx = tracing.StartSpan(ctx, fqdn+"/IPAddressAggregatesPage.NextWithContext") 1750 defer func() { 1751 sc := -1 1752 if page.Response().Response.Response != nil { 1753 sc = page.Response().Response.Response.StatusCode 1754 } 1755 tracing.EndSpan(ctx, sc, err) 1756 }() 1757 } 1758 for { 1759 next, err := page.fn(ctx, page.iaa) 1760 if err != nil { 1761 return err 1762 } 1763 page.iaa = next 1764 if !next.hasNextLink() || !next.IsEmpty() { 1765 break 1766 } 1767 } 1768 return nil 1769} 1770 1771// Next advances to the next page of values. If there was an error making 1772// the request the page does not advance and the error is returned. 1773// Deprecated: Use NextWithContext() instead. 1774func (page *IPAddressAggregatesPage) Next() error { 1775 return page.NextWithContext(context.Background()) 1776} 1777 1778// NotDone returns true if the page enumeration should be started or is not yet complete. 1779func (page IPAddressAggregatesPage) NotDone() bool { 1780 return !page.iaa.IsEmpty() 1781} 1782 1783// Response returns the raw server response from the last page request. 1784func (page IPAddressAggregatesPage) Response() IPAddressAggregates { 1785 return page.iaa 1786} 1787 1788// Values returns the slice of values for the current page or nil if there are no values. 1789func (page IPAddressAggregatesPage) Values() []IPAddressAggregate { 1790 if page.iaa.IsEmpty() { 1791 return nil 1792 } 1793 return *page.iaa.Value 1794} 1795 1796// Creates a new instance of the IPAddressAggregatesPage type. 1797func NewIPAddressAggregatesPage(cur IPAddressAggregates, getNextPage func(context.Context, IPAddressAggregates) (IPAddressAggregates, error)) IPAddressAggregatesPage { 1798 return IPAddressAggregatesPage{ 1799 fn: getNextPage, 1800 iaa: cur, 1801 } 1802} 1803 1804// Item the key value pair for properties. 1805type Item struct { 1806 // Key - The key for the property. 1807 Key *string `json:"key,omitempty"` 1808 // Value - The value for the key. 1809 Value *string `json:"value,omitempty"` 1810} 1811 1812// Items the list of key value properties. 1813type Items struct { 1814 autorest.Response `json:"-"` 1815 // Value - The value returned by the operation. 1816 Value *[]Item `json:"value,omitempty"` 1817} 1818 1819// MergedExportError the merged export error. 1820type MergedExportError struct { 1821 // ID - The error Id. 1822 ID *string `json:"id,omitempty"` 1823 // IncomingObjectDisplayName - The incoming object display name. 1824 IncomingObjectDisplayName *string `json:"incomingObjectDisplayName,omitempty"` 1825 // IncomingObjectType - The incoming object type. 1826 IncomingObjectType *string `json:"incomingObjectType,omitempty"` 1827 // UserPrincipalName - The user principal name 1828 UserPrincipalName *string `json:"userPrincipalName,omitempty"` 1829 // Type - The type of the error. 1830 Type *string `json:"type,omitempty"` 1831 // AttributeName - The attribute name. 1832 AttributeName *string `json:"attributeName,omitempty"` 1833 // AttributeValue - The attribute value. 1834 AttributeValue *string `json:"attributeValue,omitempty"` 1835 // TimeOccurred - The date and time when the error occurred. 1836 TimeOccurred *date.Time `json:"timeOccurred,omitempty"` 1837 // TimeFirstOccurred - The time when the error first occurred. 1838 TimeFirstOccurred *date.Time `json:"timeFirstOccurred,omitempty"` 1839 // CsObjectID - the cs object Id. 1840 CsObjectID *string `json:"csObjectId,omitempty"` 1841 // Dn - the DN of the object. 1842 Dn *string `json:"dn,omitempty"` 1843 // IncomingObject - The incoming object details. 1844 IncomingObject *AssociatedObject `json:"incomingObject,omitempty"` 1845 // ExistingObject - The existing object 1846 ExistingObject *AssociatedObject `json:"existingObject,omitempty"` 1847 // ModifiedOrRemovedAttributeValue - The modified or removed attribute value. 1848 ModifiedOrRemovedAttributeValue *string `json:"modifiedOrRemovedAttributeValue,omitempty"` 1849 // RunStepResultID - The run step result Id. 1850 RunStepResultID *uuid.UUID `json:"runStepResultId,omitempty"` 1851 // SamAccountName - The sam account name. 1852 SamAccountName *string `json:"samAccountName,omitempty"` 1853 // ServerErrorDetail - The server error details. 1854 ServerErrorDetail *string `json:"serverErrorDetail,omitempty"` 1855 // ServiceID - The service Id. 1856 ServiceID *uuid.UUID `json:"serviceId,omitempty"` 1857 // ServiceMemberID - The server Id. 1858 ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"` 1859 // MergedEntityID - The merged entity Id. 1860 MergedEntityID *uuid.UUID `json:"mergedEntityId,omitempty"` 1861 // CreatedDate - The date and time, in UTC, when the error was created. 1862 CreatedDate *date.Time `json:"createdDate,omitempty"` 1863 // ExportErrorStatus - The export error status. 1864 ExportErrorStatus *int32 `json:"exportErrorStatus,omitempty"` 1865} 1866 1867// MergedExportErrors the list of export errors. 1868type MergedExportErrors struct { 1869 autorest.Response `json:"-"` 1870 // Value - The value returned by the operation. 1871 Value *[]MergedExportError `json:"value,omitempty"` 1872} 1873 1874// MetricGroup the metric group details. 1875type MetricGroup struct { 1876 // Key - The key for the group. 1877 Key *string `json:"key,omitempty"` 1878 // DisplayName - The display name for the group. 1879 DisplayName *string `json:"displayName,omitempty"` 1880 // InvisibleForUI - indicates if the metric group is displayed in Azure Active Directory Connect Health UI. 1881 InvisibleForUI *bool `json:"invisibleForUi,omitempty"` 1882} 1883 1884// MetricMetadata the metric meta data 1885type MetricMetadata struct { 1886 autorest.Response `json:"-"` 1887 // MetricsProcessorClassName - The name of the class which retrieve and process the metric. 1888 MetricsProcessorClassName *string `json:"metricsProcessorClassName,omitempty"` 1889 // MetricName - The metric name 1890 MetricName *string `json:"metricName,omitempty"` 1891 // Groupings - The groupings for the metrics. 1892 Groupings *[]MetricGroup `json:"groupings,omitempty"` 1893 // DisplayName - The display name for the metric. 1894 DisplayName *string `json:"displayName,omitempty"` 1895 // ValueKind - Indicates if the metrics is a rate,value, percent or duration type. 1896 ValueKind *string `json:"valueKind,omitempty"` 1897 // MinValue - The minimum value. 1898 MinValue *int32 `json:"minValue,omitempty"` 1899 // MaxValue - The maximum value. 1900 MaxValue *int32 `json:"maxValue,omitempty"` 1901 // Kind - Indicates whether the dashboard to represent the metric is a line, bar,pie, area or donut chart. 1902 Kind *string `json:"kind,omitempty"` 1903 // IsDefault - Indicates if the metric is a default metric or not. 1904 IsDefault *bool `json:"isDefault,omitempty"` 1905 // IsPerfCounter - Indicates if the metric is a performance counter metric or not. 1906 IsPerfCounter *bool `json:"isPerfCounter,omitempty"` 1907 // IsDevOps - Indicates if the metric is visible to DevOps or not. 1908 IsDevOps *bool `json:"isDevOps,omitempty"` 1909} 1910 1911// MetricMetadataList the list of metric metadata. 1912type MetricMetadataList struct { 1913 autorest.Response `json:"-"` 1914 // NextLink - The link used to get the next page of operations. 1915 NextLink *string `json:"nextLink,omitempty"` 1916 // Value - The value returned by the operation. 1917 Value *[]MetricMetadata `json:"value,omitempty"` 1918 // TotalCount - The total count of service elements. 1919 TotalCount *int32 `json:"totalCount,omitempty"` 1920 // ContinuationToken - The continuation token for paginated calls. 1921 ContinuationToken *string `json:"continuationToken,omitempty"` 1922} 1923 1924// MetricMetadataListIterator provides access to a complete listing of MetricMetadata values. 1925type MetricMetadataListIterator struct { 1926 i int 1927 page MetricMetadataListPage 1928} 1929 1930// NextWithContext advances to the next value. If there was an error making 1931// the request the iterator does not advance and the error is returned. 1932func (iter *MetricMetadataListIterator) NextWithContext(ctx context.Context) (err error) { 1933 if tracing.IsEnabled() { 1934 ctx = tracing.StartSpan(ctx, fqdn+"/MetricMetadataListIterator.NextWithContext") 1935 defer func() { 1936 sc := -1 1937 if iter.Response().Response.Response != nil { 1938 sc = iter.Response().Response.Response.StatusCode 1939 } 1940 tracing.EndSpan(ctx, sc, err) 1941 }() 1942 } 1943 iter.i++ 1944 if iter.i < len(iter.page.Values()) { 1945 return nil 1946 } 1947 err = iter.page.NextWithContext(ctx) 1948 if err != nil { 1949 iter.i-- 1950 return err 1951 } 1952 iter.i = 0 1953 return nil 1954} 1955 1956// Next advances to the next value. If there was an error making 1957// the request the iterator does not advance and the error is returned. 1958// Deprecated: Use NextWithContext() instead. 1959func (iter *MetricMetadataListIterator) Next() error { 1960 return iter.NextWithContext(context.Background()) 1961} 1962 1963// NotDone returns true if the enumeration should be started or is not yet complete. 1964func (iter MetricMetadataListIterator) NotDone() bool { 1965 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1966} 1967 1968// Response returns the raw server response from the last page request. 1969func (iter MetricMetadataListIterator) Response() MetricMetadataList { 1970 return iter.page.Response() 1971} 1972 1973// Value returns the current value or a zero-initialized value if the 1974// iterator has advanced beyond the end of the collection. 1975func (iter MetricMetadataListIterator) Value() MetricMetadata { 1976 if !iter.page.NotDone() { 1977 return MetricMetadata{} 1978 } 1979 return iter.page.Values()[iter.i] 1980} 1981 1982// Creates a new instance of the MetricMetadataListIterator type. 1983func NewMetricMetadataListIterator(page MetricMetadataListPage) MetricMetadataListIterator { 1984 return MetricMetadataListIterator{page: page} 1985} 1986 1987// IsEmpty returns true if the ListResult contains no values. 1988func (mml MetricMetadataList) IsEmpty() bool { 1989 return mml.Value == nil || len(*mml.Value) == 0 1990} 1991 1992// hasNextLink returns true if the NextLink is not empty. 1993func (mml MetricMetadataList) hasNextLink() bool { 1994 return mml.NextLink != nil && len(*mml.NextLink) != 0 1995} 1996 1997// metricMetadataListPreparer prepares a request to retrieve the next set of results. 1998// It returns nil if no more results exist. 1999func (mml MetricMetadataList) metricMetadataListPreparer(ctx context.Context) (*http.Request, error) { 2000 if !mml.hasNextLink() { 2001 return nil, nil 2002 } 2003 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2004 autorest.AsJSON(), 2005 autorest.AsGet(), 2006 autorest.WithBaseURL(to.String(mml.NextLink))) 2007} 2008 2009// MetricMetadataListPage contains a page of MetricMetadata values. 2010type MetricMetadataListPage struct { 2011 fn func(context.Context, MetricMetadataList) (MetricMetadataList, error) 2012 mml MetricMetadataList 2013} 2014 2015// NextWithContext advances to the next page of values. If there was an error making 2016// the request the page does not advance and the error is returned. 2017func (page *MetricMetadataListPage) NextWithContext(ctx context.Context) (err error) { 2018 if tracing.IsEnabled() { 2019 ctx = tracing.StartSpan(ctx, fqdn+"/MetricMetadataListPage.NextWithContext") 2020 defer func() { 2021 sc := -1 2022 if page.Response().Response.Response != nil { 2023 sc = page.Response().Response.Response.StatusCode 2024 } 2025 tracing.EndSpan(ctx, sc, err) 2026 }() 2027 } 2028 for { 2029 next, err := page.fn(ctx, page.mml) 2030 if err != nil { 2031 return err 2032 } 2033 page.mml = next 2034 if !next.hasNextLink() || !next.IsEmpty() { 2035 break 2036 } 2037 } 2038 return nil 2039} 2040 2041// Next advances to the next page of values. If there was an error making 2042// the request the page does not advance and the error is returned. 2043// Deprecated: Use NextWithContext() instead. 2044func (page *MetricMetadataListPage) Next() error { 2045 return page.NextWithContext(context.Background()) 2046} 2047 2048// NotDone returns true if the page enumeration should be started or is not yet complete. 2049func (page MetricMetadataListPage) NotDone() bool { 2050 return !page.mml.IsEmpty() 2051} 2052 2053// Response returns the raw server response from the last page request. 2054func (page MetricMetadataListPage) Response() MetricMetadataList { 2055 return page.mml 2056} 2057 2058// Values returns the slice of values for the current page or nil if there are no values. 2059func (page MetricMetadataListPage) Values() []MetricMetadata { 2060 if page.mml.IsEmpty() { 2061 return nil 2062 } 2063 return *page.mml.Value 2064} 2065 2066// Creates a new instance of the MetricMetadataListPage type. 2067func NewMetricMetadataListPage(cur MetricMetadataList, getNextPage func(context.Context, MetricMetadataList) (MetricMetadataList, error)) MetricMetadataListPage { 2068 return MetricMetadataListPage{ 2069 fn: getNextPage, 2070 mml: cur, 2071 } 2072} 2073 2074// Metrics the list of metric items. 2075type Metrics struct { 2076 autorest.Response `json:"-"` 2077 // NextLink - The link used to get the next page of operations. 2078 NextLink *string `json:"nextLink,omitempty"` 2079 // Value - The value returned by the operation. 2080 Value *[]Item `json:"value,omitempty"` 2081 // TotalCount - The total count of metrics. 2082 TotalCount *int32 `json:"totalCount,omitempty"` 2083 // ContinuationToken - The continuation token for paginated calls. 2084 ContinuationToken *string `json:"continuationToken,omitempty"` 2085} 2086 2087// MetricSet the set of metric values. Example of a MetricSet are Values of token requests for a Server1 or 2088// RelyingParty1. 2089type MetricSet struct { 2090 // SetName - The name of the set. 2091 SetName *string `json:"setName,omitempty"` 2092 // Values - The list of the metric values. 2093 Values *[]int32 `json:"values,omitempty"` 2094} 2095 2096// MetricSets the metrics data represented set. 2097type MetricSets struct { 2098 autorest.Response `json:"-"` 2099 // Sets - The list of metric set. 2100 Sets *[]MetricSet `json:"sets,omitempty"` 2101 // TimeStamps - The list of timestamps for each metric in the metric set. 2102 TimeStamps *[]date.Time `json:"timeStamps,omitempty"` 2103} 2104 2105// MetricsIterator provides access to a complete listing of Item values. 2106type MetricsIterator struct { 2107 i int 2108 page MetricsPage 2109} 2110 2111// NextWithContext advances to the next value. If there was an error making 2112// the request the iterator does not advance and the error is returned. 2113func (iter *MetricsIterator) NextWithContext(ctx context.Context) (err error) { 2114 if tracing.IsEnabled() { 2115 ctx = tracing.StartSpan(ctx, fqdn+"/MetricsIterator.NextWithContext") 2116 defer func() { 2117 sc := -1 2118 if iter.Response().Response.Response != nil { 2119 sc = iter.Response().Response.Response.StatusCode 2120 } 2121 tracing.EndSpan(ctx, sc, err) 2122 }() 2123 } 2124 iter.i++ 2125 if iter.i < len(iter.page.Values()) { 2126 return nil 2127 } 2128 err = iter.page.NextWithContext(ctx) 2129 if err != nil { 2130 iter.i-- 2131 return err 2132 } 2133 iter.i = 0 2134 return nil 2135} 2136 2137// Next advances to the next value. If there was an error making 2138// the request the iterator does not advance and the error is returned. 2139// Deprecated: Use NextWithContext() instead. 2140func (iter *MetricsIterator) Next() error { 2141 return iter.NextWithContext(context.Background()) 2142} 2143 2144// NotDone returns true if the enumeration should be started or is not yet complete. 2145func (iter MetricsIterator) NotDone() bool { 2146 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2147} 2148 2149// Response returns the raw server response from the last page request. 2150func (iter MetricsIterator) Response() Metrics { 2151 return iter.page.Response() 2152} 2153 2154// Value returns the current value or a zero-initialized value if the 2155// iterator has advanced beyond the end of the collection. 2156func (iter MetricsIterator) Value() Item { 2157 if !iter.page.NotDone() { 2158 return Item{} 2159 } 2160 return iter.page.Values()[iter.i] 2161} 2162 2163// Creates a new instance of the MetricsIterator type. 2164func NewMetricsIterator(page MetricsPage) MetricsIterator { 2165 return MetricsIterator{page: page} 2166} 2167 2168// IsEmpty returns true if the ListResult contains no values. 2169func (mVar Metrics) IsEmpty() bool { 2170 return mVar.Value == nil || len(*mVar.Value) == 0 2171} 2172 2173// hasNextLink returns true if the NextLink is not empty. 2174func (mVar Metrics) hasNextLink() bool { 2175 return mVar.NextLink != nil && len(*mVar.NextLink) != 0 2176} 2177 2178// metricsPreparer prepares a request to retrieve the next set of results. 2179// It returns nil if no more results exist. 2180func (mVar Metrics) metricsPreparer(ctx context.Context) (*http.Request, error) { 2181 if !mVar.hasNextLink() { 2182 return nil, nil 2183 } 2184 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2185 autorest.AsJSON(), 2186 autorest.AsGet(), 2187 autorest.WithBaseURL(to.String(mVar.NextLink))) 2188} 2189 2190// MetricsPage contains a page of Item values. 2191type MetricsPage struct { 2192 fn func(context.Context, Metrics) (Metrics, error) 2193 mVar Metrics 2194} 2195 2196// NextWithContext advances to the next page of values. If there was an error making 2197// the request the page does not advance and the error is returned. 2198func (page *MetricsPage) NextWithContext(ctx context.Context) (err error) { 2199 if tracing.IsEnabled() { 2200 ctx = tracing.StartSpan(ctx, fqdn+"/MetricsPage.NextWithContext") 2201 defer func() { 2202 sc := -1 2203 if page.Response().Response.Response != nil { 2204 sc = page.Response().Response.Response.StatusCode 2205 } 2206 tracing.EndSpan(ctx, sc, err) 2207 }() 2208 } 2209 for { 2210 next, err := page.fn(ctx, page.mVar) 2211 if err != nil { 2212 return err 2213 } 2214 page.mVar = next 2215 if !next.hasNextLink() || !next.IsEmpty() { 2216 break 2217 } 2218 } 2219 return nil 2220} 2221 2222// Next advances to the next page of values. If there was an error making 2223// the request the page does not advance and the error is returned. 2224// Deprecated: Use NextWithContext() instead. 2225func (page *MetricsPage) Next() error { 2226 return page.NextWithContext(context.Background()) 2227} 2228 2229// NotDone returns true if the page enumeration should be started or is not yet complete. 2230func (page MetricsPage) NotDone() bool { 2231 return !page.mVar.IsEmpty() 2232} 2233 2234// Response returns the raw server response from the last page request. 2235func (page MetricsPage) Response() Metrics { 2236 return page.mVar 2237} 2238 2239// Values returns the slice of values for the current page or nil if there are no values. 2240func (page MetricsPage) Values() []Item { 2241 if page.mVar.IsEmpty() { 2242 return nil 2243 } 2244 return *page.mVar.Value 2245} 2246 2247// Creates a new instance of the MetricsPage type. 2248func NewMetricsPage(cur Metrics, getNextPage func(context.Context, Metrics) (Metrics, error)) MetricsPage { 2249 return MetricsPage{ 2250 fn: getNextPage, 2251 mVar: cur, 2252 } 2253} 2254 2255// ModuleConfiguration the module configuration as required by the Agent service. 2256type ModuleConfiguration struct { 2257 // AgentService - The name of agent service. 2258 AgentService *string `json:"agentService,omitempty"` 2259 // ModuleName - The name of the module for which the configuration is applicable. 2260 ModuleName *string `json:"moduleName,omitempty"` 2261 // Properties - The key value pairs of properties required for configuration. 2262 Properties map[string]*string `json:"properties"` 2263} 2264 2265// MarshalJSON is the custom marshaler for ModuleConfiguration. 2266func (mc ModuleConfiguration) MarshalJSON() ([]byte, error) { 2267 objectMap := make(map[string]interface{}) 2268 if mc.AgentService != nil { 2269 objectMap["agentService"] = mc.AgentService 2270 } 2271 if mc.ModuleName != nil { 2272 objectMap["moduleName"] = mc.ModuleName 2273 } 2274 if mc.Properties != nil { 2275 objectMap["properties"] = mc.Properties 2276 } 2277 return json.Marshal(objectMap) 2278} 2279 2280// ModuleConfigurations the list of module configurations. 2281type ModuleConfigurations struct { 2282 // Value - The value returned by the operation. 2283 Value *[]ModuleConfiguration `json:"value,omitempty"` 2284} 2285 2286// ObjectWithSyncError the objects with sync errors. 2287type ObjectWithSyncError struct { 2288 // SourceOfAuthority - The source of authority. 2289 SourceOfAuthority *string `json:"sourceOfAuthority,omitempty"` 2290 // DisplayName - The display name. 2291 DisplayName *string `json:"displayName,omitempty"` 2292 // ObjectType - The object type. 2293 ObjectType *string `json:"objectType,omitempty"` 2294 // AttributeName - The attribute name. 2295 AttributeName *string `json:"attributeName,omitempty"` 2296 // AttributeValue - The attribute value. 2297 AttributeValue *string `json:"attributeValue,omitempty"` 2298 // ModififedValue - The modified value. 2299 ModififedValue *string `json:"modififedValue,omitempty"` 2300 // UserPrincipalName - The user principal name. 2301 UserPrincipalName *string `json:"userPrincipalName,omitempty"` 2302 // ObjectGUID - The object guid. 2303 ObjectGUID *string `json:"objectGuid,omitempty"` 2304 // AttributeMultiValues - Indicates if the attribute is multi-valued or not. 2305 AttributeMultiValues *bool `json:"attributeMultiValues,omitempty"` 2306 // MinLimit - The minimum limit. 2307 MinLimit *string `json:"minLimit,omitempty"` 2308 // MaxLimit - The maximum limit. 2309 MaxLimit *string `json:"maxLimit,omitempty"` 2310 // DistinguishedName - The distinguished name. 2311 DistinguishedName *string `json:"distinguishedName,omitempty"` 2312 // Mail - The email. 2313 Mail *string `json:"mail,omitempty"` 2314 // TimeOccured - The date and time of occurrence. 2315 TimeOccured *date.Time `json:"timeOccured,omitempty"` 2316 // ErrorType - The error type. 2317 ErrorType *string `json:"errorType,omitempty"` 2318 // SourceAnchor - The source anchor. 2319 SourceAnchor *string `json:"sourceAnchor,omitempty"` 2320} 2321 2322// Operation the details of the operation. 2323type Operation struct { 2324 // Name - The name of the operation. 2325 Name *string `json:"name,omitempty"` 2326 // Display - The display details for the operation. 2327 Display interface{} `json:"display,omitempty"` 2328} 2329 2330// OperationListResponse lists all of the available REST API operations for Azure Active Directory Connect 2331// Health. 2332type OperationListResponse struct { 2333 autorest.Response `json:"-"` 2334 // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. 2335 NextLink *string `json:"nextLink,omitempty"` 2336 // Value - READ-ONLY; List of operations supported by the Microsoft.ADHybridHealthService resource provider. 2337 Value *[]Operation `json:"value,omitempty"` 2338 // TotalCount - The total count of operations. 2339 TotalCount *int32 `json:"totalCount,omitempty"` 2340 // ContinuationToken - The continuation token to get next set of operations. 2341 ContinuationToken *string `json:"continuationToken,omitempty"` 2342} 2343 2344// MarshalJSON is the custom marshaler for OperationListResponse. 2345func (olr OperationListResponse) MarshalJSON() ([]byte, error) { 2346 objectMap := make(map[string]interface{}) 2347 if olr.TotalCount != nil { 2348 objectMap["totalCount"] = olr.TotalCount 2349 } 2350 if olr.ContinuationToken != nil { 2351 objectMap["continuationToken"] = olr.ContinuationToken 2352 } 2353 return json.Marshal(objectMap) 2354} 2355 2356// OperationListResponseIterator provides access to a complete listing of Operation values. 2357type OperationListResponseIterator struct { 2358 i int 2359 page OperationListResponsePage 2360} 2361 2362// NextWithContext advances to the next value. If there was an error making 2363// the request the iterator does not advance and the error is returned. 2364func (iter *OperationListResponseIterator) NextWithContext(ctx context.Context) (err error) { 2365 if tracing.IsEnabled() { 2366 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResponseIterator.NextWithContext") 2367 defer func() { 2368 sc := -1 2369 if iter.Response().Response.Response != nil { 2370 sc = iter.Response().Response.Response.StatusCode 2371 } 2372 tracing.EndSpan(ctx, sc, err) 2373 }() 2374 } 2375 iter.i++ 2376 if iter.i < len(iter.page.Values()) { 2377 return nil 2378 } 2379 err = iter.page.NextWithContext(ctx) 2380 if err != nil { 2381 iter.i-- 2382 return err 2383 } 2384 iter.i = 0 2385 return nil 2386} 2387 2388// Next advances to the next value. If there was an error making 2389// the request the iterator does not advance and the error is returned. 2390// Deprecated: Use NextWithContext() instead. 2391func (iter *OperationListResponseIterator) Next() error { 2392 return iter.NextWithContext(context.Background()) 2393} 2394 2395// NotDone returns true if the enumeration should be started or is not yet complete. 2396func (iter OperationListResponseIterator) NotDone() bool { 2397 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2398} 2399 2400// Response returns the raw server response from the last page request. 2401func (iter OperationListResponseIterator) Response() OperationListResponse { 2402 return iter.page.Response() 2403} 2404 2405// Value returns the current value or a zero-initialized value if the 2406// iterator has advanced beyond the end of the collection. 2407func (iter OperationListResponseIterator) Value() Operation { 2408 if !iter.page.NotDone() { 2409 return Operation{} 2410 } 2411 return iter.page.Values()[iter.i] 2412} 2413 2414// Creates a new instance of the OperationListResponseIterator type. 2415func NewOperationListResponseIterator(page OperationListResponsePage) OperationListResponseIterator { 2416 return OperationListResponseIterator{page: page} 2417} 2418 2419// IsEmpty returns true if the ListResult contains no values. 2420func (olr OperationListResponse) IsEmpty() bool { 2421 return olr.Value == nil || len(*olr.Value) == 0 2422} 2423 2424// hasNextLink returns true if the NextLink is not empty. 2425func (olr OperationListResponse) hasNextLink() bool { 2426 return olr.NextLink != nil && len(*olr.NextLink) != 0 2427} 2428 2429// operationListResponsePreparer prepares a request to retrieve the next set of results. 2430// It returns nil if no more results exist. 2431func (olr OperationListResponse) operationListResponsePreparer(ctx context.Context) (*http.Request, error) { 2432 if !olr.hasNextLink() { 2433 return nil, nil 2434 } 2435 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2436 autorest.AsJSON(), 2437 autorest.AsGet(), 2438 autorest.WithBaseURL(to.String(olr.NextLink))) 2439} 2440 2441// OperationListResponsePage contains a page of Operation values. 2442type OperationListResponsePage struct { 2443 fn func(context.Context, OperationListResponse) (OperationListResponse, error) 2444 olr OperationListResponse 2445} 2446 2447// NextWithContext advances to the next page of values. If there was an error making 2448// the request the page does not advance and the error is returned. 2449func (page *OperationListResponsePage) NextWithContext(ctx context.Context) (err error) { 2450 if tracing.IsEnabled() { 2451 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResponsePage.NextWithContext") 2452 defer func() { 2453 sc := -1 2454 if page.Response().Response.Response != nil { 2455 sc = page.Response().Response.Response.StatusCode 2456 } 2457 tracing.EndSpan(ctx, sc, err) 2458 }() 2459 } 2460 for { 2461 next, err := page.fn(ctx, page.olr) 2462 if err != nil { 2463 return err 2464 } 2465 page.olr = next 2466 if !next.hasNextLink() || !next.IsEmpty() { 2467 break 2468 } 2469 } 2470 return nil 2471} 2472 2473// Next advances to the next page of values. If there was an error making 2474// the request the page does not advance and the error is returned. 2475// Deprecated: Use NextWithContext() instead. 2476func (page *OperationListResponsePage) Next() error { 2477 return page.NextWithContext(context.Background()) 2478} 2479 2480// NotDone returns true if the page enumeration should be started or is not yet complete. 2481func (page OperationListResponsePage) NotDone() bool { 2482 return !page.olr.IsEmpty() 2483} 2484 2485// Response returns the raw server response from the last page request. 2486func (page OperationListResponsePage) Response() OperationListResponse { 2487 return page.olr 2488} 2489 2490// Values returns the slice of values for the current page or nil if there are no values. 2491func (page OperationListResponsePage) Values() []Operation { 2492 if page.olr.IsEmpty() { 2493 return nil 2494 } 2495 return *page.olr.Value 2496} 2497 2498// Creates a new instance of the OperationListResponsePage type. 2499func NewOperationListResponsePage(cur OperationListResponse, getNextPage func(context.Context, OperationListResponse) (OperationListResponse, error)) OperationListResponsePage { 2500 return OperationListResponsePage{ 2501 fn: getNextPage, 2502 olr: cur, 2503 } 2504} 2505 2506// Partition describes the partition in Synchronization service. 2507type Partition struct { 2508 // ID - The partition Id. 2509 ID *string `json:"id,omitempty"` 2510 // Dn - The distinguished name for the partition. 2511 Dn *string `json:"dn,omitempty"` 2512 // Enabled - Indicates if the partition object is selected or not. 2513 Enabled *bool `json:"enabled,omitempty"` 2514 // TimeCreated - The date and time when the partition is created. 2515 TimeCreated *date.Time `json:"timeCreated,omitempty"` 2516 // TimeLastModified - The time and date when the partition was last modified. 2517 TimeLastModified *date.Time `json:"timeLastModified,omitempty"` 2518 // PartitionScope - The scope of the partition. 2519 PartitionScope *PartitionScope `json:"partitionScope,omitempty"` 2520 // Name - The name of the partition. 2521 Name *string `json:"name,omitempty"` 2522 // IsDomain - Indicates if the partition is a domain or not. 2523 IsDomain *bool `json:"isDomain,omitempty"` 2524 // Type - The partition type. 2525 Type *string `json:"type,omitempty"` 2526} 2527 2528// PartitionScope the connector partition scope. 2529type PartitionScope struct { 2530 // IsDefault - Indicates if the partition scope is default or not. 2531 IsDefault *bool `json:"isDefault,omitempty"` 2532 // ObjectClasses - The in-scope object classes. 2533 ObjectClasses *[]string `json:"objectClasses,omitempty"` 2534 // ContainersIncluded - The list of containers included. 2535 ContainersIncluded *[]string `json:"containersIncluded,omitempty"` 2536 // ContainersExcluded - The list of containers excluded. 2537 ContainersExcluded *[]string `json:"containersExcluded,omitempty"` 2538} 2539 2540// PasswordHashSyncConfiguration the password has synchronization configuration settings. 2541type PasswordHashSyncConfiguration struct { 2542 // Enabled - Indicates if the password hash synchronization configuration settings is enabled. 2543 Enabled *bool `json:"enabled,omitempty"` 2544 // Target - The target. 2545 Target *string `json:"target,omitempty"` 2546} 2547 2548// PasswordManagementSettings the password management settings. 2549type PasswordManagementSettings struct { 2550 // Enabled - Indicates if the password extension is enabled. 2551 Enabled *bool `json:"enabled,omitempty"` 2552 // ExtensionFilePath - The file path of the password management extension. 2553 ExtensionFilePath *string `json:"extensionFilePath,omitempty"` 2554 // ConnectTo - Connection point of password management. 2555 ConnectTo *string `json:"connectTo,omitempty"` 2556 // ConnectionTimeout - Connection timeout for password extension. 2557 ConnectionTimeout *int32 `json:"connectionTimeout,omitempty"` 2558 // User - User to execute password extension. 2559 User *string `json:"user,omitempty"` 2560 // SupportedPasswordOperations - The supported password operations. Possible values include: 'PasswordOperationTypesUndefined', 'PasswordOperationTypesSet', 'PasswordOperationTypesChange' 2561 SupportedPasswordOperations PasswordOperationTypes `json:"supportedPasswordOperations,omitempty"` 2562 // MaximumRetryCount - The maximum number of retries. 2563 MaximumRetryCount *int32 `json:"maximumRetryCount,omitempty"` 2564 // RetryIntervalInSeconds - The time between retries. 2565 RetryIntervalInSeconds *int32 `json:"retryIntervalInSeconds,omitempty"` 2566 // RequiresSecureConnection - Indicates if a secure connection is required for password management. 2567 RequiresSecureConnection *bool `json:"requiresSecureConnection,omitempty"` 2568 // UnlockAccount - Indicates if accounts should be unlocked when resetting password. 2569 UnlockAccount *bool `json:"unlockAccount,omitempty"` 2570} 2571 2572// ReplicationDetailsList the list of replication details. 2573type ReplicationDetailsList struct { 2574 autorest.Response `json:"-"` 2575 // Value - The value returned by the operation. 2576 Value *[]ReplicationSummary `json:"value,omitempty"` 2577 // TotalCount - The total count of replication detail elements. 2578 TotalCount *int32 `json:"totalCount,omitempty"` 2579 // ContinuationToken - The continuation token for paginated calls. 2580 ContinuationToken *string `json:"continuationToken,omitempty"` 2581 // NextLink - The link used to get the next page of operations. 2582 NextLink *string `json:"nextLink,omitempty"` 2583} 2584 2585// ReplicationStatus replication summary for a domain controller. 2586type ReplicationStatus struct { 2587 autorest.Response `json:"-"` 2588 // ForestName - The forest name. 2589 ForestName *string `json:"forestName,omitempty"` 2590 // TotalDcCount - The total number of domain controllers for a given forest. 2591 TotalDcCount *int32 `json:"totalDcCount,omitempty"` 2592 // ErrorDcCount - The total number of domain controllers with error in a given forest. 2593 ErrorDcCount *int32 `json:"errorDcCount,omitempty"` 2594} 2595 2596// ReplicationSummary the replication summary for a domain controller. 2597type ReplicationSummary struct { 2598 // TargetServer - The domain controller name. 2599 TargetServer *string `json:"targetServer,omitempty"` 2600 // Site - The site name for a given domain controller. 2601 Site *string `json:"site,omitempty"` 2602 // Domain - The domain name for a given domain controller. 2603 Domain *string `json:"domain,omitempty"` 2604 // Status - The health status for a domain controller. 2605 Status *int32 `json:"status,omitempty"` 2606 // LastAttemptedSync - The last time when a sync was attempted for a given domain controller. 2607 LastAttemptedSync *date.Time `json:"lastAttemptedSync,omitempty"` 2608 // LastSuccessfulSync - The time when the last successful sync happened for a given domain controller. 2609 LastSuccessfulSync *date.Time `json:"lastSuccessfulSync,omitempty"` 2610 // InboundNeighborCollection - List of individual domain controller neighbor's inbound replication status. 2611 InboundNeighborCollection *[]InboundReplicationNeighbor `json:"inboundNeighborCollection,omitempty"` 2612} 2613 2614// ReplicationSummaryList the list of replication summary details. 2615type ReplicationSummaryList struct { 2616 autorest.Response `json:"-"` 2617 // Value - The value returned by the operation. 2618 Value *[]ReplicationSummary `json:"value,omitempty"` 2619} 2620 2621// Result the result for an operation. 2622type Result struct { 2623 autorest.Response `json:"-"` 2624 // Value - The value. 2625 Value *bool `json:"value,omitempty"` 2626} 2627 2628// RiskyIPBlobURI the blob uri pointing to Risky IP Report. 2629type RiskyIPBlobURI struct { 2630 // TenantID - The tenant id for whom the report belongs to. 2631 TenantID *string `json:"tenantId,omitempty"` 2632 // ServiceID - The service id for whom the report belongs to. 2633 ServiceID *string `json:"serviceId,omitempty"` 2634 // ResultSasURI - The blob uri for the report. 2635 ResultSasURI *string `json:"resultSasUri,omitempty"` 2636 // BlobCreateDateTime - Time at which the new Risky IP report was requested. 2637 BlobCreateDateTime *date.Time `json:"blobCreateDateTime,omitempty"` 2638 // JobCompletionTime - Time at which the blob creation job for the new Risky IP report was completed. 2639 JobCompletionTime *date.Time `json:"jobCompletionTime,omitempty"` 2640 // Status - Status of the Risky IP report generation. 2641 Status *string `json:"status,omitempty"` 2642} 2643 2644// RiskyIPBlobUris the list containing blob uris. 2645type RiskyIPBlobUris struct { 2646 autorest.Response `json:"-"` 2647 // Value - The list of blob uris. 2648 Value *[]RiskyIPBlobURI `json:"value,omitempty"` 2649} 2650 2651// RuleErrorInfo the error details in legacy rule processing. 2652type RuleErrorInfo struct { 2653 // AttributeMapping - The attribute mapping details. 2654 AttributeMapping *AttributeMapping `json:"attributeMapping,omitempty"` 2655 // ConnectorID - The connector Id. 2656 ConnectorID *string `json:"connectorId,omitempty"` 2657 // ConnectorName - The connector name. 2658 ConnectorName *string `json:"connectorName,omitempty"` 2659 // CsObjectID - The object Id. 2660 CsObjectID *string `json:"csObjectId,omitempty"` 2661 // Dn - The distinguished name. 2662 Dn *string `json:"dn,omitempty"` 2663} 2664 2665// RunProfile describes the run profile. 2666type RunProfile struct { 2667 // ID - The run profile Id. 2668 ID *string `json:"id,omitempty"` 2669 // Name - The run profile name 2670 Name *string `json:"name,omitempty"` 2671 // RunSteps - The run steps of the run profile. 2672 RunSteps *[]RunStep `json:"runSteps,omitempty"` 2673} 2674 2675// RunProfiles the list of run profiles. 2676type RunProfiles struct { 2677 // Value - The value returned by the operation. 2678 Value *[]RunProfile `json:"value,omitempty"` 2679} 2680 2681// RunStep the run step for a run profile. 2682type RunStep struct { 2683 // BatchSize - The batch size used by the run step. 2684 BatchSize *int32 `json:"batchSize,omitempty"` 2685 // ObjectProcessLimit - The object processing limit. 2686 ObjectProcessLimit *int32 `json:"objectProcessLimit,omitempty"` 2687 // ObjectDeleteLimit - The object deletion limit. 2688 ObjectDeleteLimit *int32 `json:"objectDeleteLimit,omitempty"` 2689 // PageSize - The page size of the run step. 2690 PageSize *int32 `json:"pageSize,omitempty"` 2691 // PartitionID - The Id of the partition that a current run step operation is executing. 2692 PartitionID *string `json:"partitionId,omitempty"` 2693 // OperationType - The run step operation types. 2694 OperationType *int32 `json:"operationType,omitempty"` 2695 // Timeout - The operation timeout. 2696 Timeout *int32 `json:"timeout,omitempty"` 2697} 2698 2699// ServiceConfiguration the service configuration 2700type ServiceConfiguration struct { 2701 autorest.Response `json:"-"` 2702 // Version - The version of the sync service. 2703 Version *string `json:"version,omitempty"` 2704 // ServiceType - The service type of the server. 2705 ServiceType *int32 `json:"serviceType,omitempty"` 2706 // ServiceAccount - The service account. 2707 ServiceAccount *string `json:"serviceAccount,omitempty"` 2708 // SQLServer - The SQL server information. 2709 SQLServer *string `json:"sqlServer,omitempty"` 2710 // SQLVersion - The SQL version. 2711 SQLVersion *string `json:"sqlVersion,omitempty"` 2712 // SQLEdition - The SQL edition 2713 SQLEdition *string `json:"sqlEdition,omitempty"` 2714 // SQLInstance - The SQL instance details. 2715 SQLInstance *string `json:"sqlInstance,omitempty"` 2716 // SQLDatabaseName - The SQL database. 2717 SQLDatabaseName *string `json:"sqlDatabaseName,omitempty"` 2718 // SQLDatabaseSize - The SQL database size. 2719 SQLDatabaseSize *int32 `json:"sqlDatabaseSize,omitempty"` 2720} 2721 2722// ServiceMember the server properties for a given service. 2723type ServiceMember struct { 2724 autorest.Response `json:"-"` 2725 // ServiceMemberID - The id of the server. 2726 ServiceMemberID *string `json:"serviceMemberId,omitempty"` 2727 // ServiceID - The service id to whom this server belongs. 2728 ServiceID *string `json:"serviceId,omitempty"` 2729 // TenantID - The tenant id to whom this server belongs. 2730 TenantID *string `json:"tenantId,omitempty"` 2731 // ActiveAlerts - The total number of alerts that are currently active for the server. 2732 ActiveAlerts *int32 `json:"activeAlerts,omitempty"` 2733 // AdditionalInformation - The additional information, if any, for the server. 2734 AdditionalInformation *string `json:"additionalInformation,omitempty"` 2735 // CreatedDate - The date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health. 2736 CreatedDate *date.Time `json:"createdDate,omitempty"` 2737 // Dimensions - The server specific configuration related dimensions. 2738 Dimensions interface{} `json:"dimensions,omitempty"` 2739 // Disabled - Indicates if the server is disabled or not. 2740 Disabled *bool `json:"disabled,omitempty"` 2741 // DisabledReason - The reason for disabling the server. 2742 DisabledReason *int32 `json:"disabledReason,omitempty"` 2743 // InstalledQfes - The list of installed QFEs for the server. 2744 InstalledQfes interface{} `json:"installedQfes,omitempty"` 2745 // LastDisabled - The date and time , in UTC, when the server was last disabled. 2746 LastDisabled *date.Time `json:"lastDisabled,omitempty"` 2747 // LastReboot - The date and time, in UTC, when the server was last rebooted. 2748 LastReboot *date.Time `json:"lastReboot,omitempty"` 2749 // LastServerReportedMonitoringLevelChange - The date and time, in UTC, when the server's data monitoring configuration was last changed. 2750 LastServerReportedMonitoringLevelChange *date.Time `json:"lastServerReportedMonitoringLevelChange,omitempty"` 2751 // LastUpdated - The date and time, in UTC, when the server properties were last updated. 2752 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 2753 // MachineID - The id of the machine. 2754 MachineID *string `json:"machineId,omitempty"` 2755 // MachineName - The name of the server. 2756 MachineName *string `json:"machineName,omitempty"` 2757 // MonitoringConfigurationsComputed - The monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. 2758 MonitoringConfigurationsComputed interface{} `json:"monitoringConfigurationsComputed,omitempty"` 2759 // MonitoringConfigurationsCustomized - The customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. 2760 MonitoringConfigurationsCustomized interface{} `json:"monitoringConfigurationsCustomized,omitempty"` 2761 // OsName - The name of the operating system installed in the machine. 2762 OsName *string `json:"osName,omitempty"` 2763 // OsVersion - The version of the operating system installed in the machine. 2764 OsVersion *string `json:"osVersion,omitempty"` 2765 // Properties - Server specific properties. 2766 Properties interface{} `json:"properties,omitempty"` 2767 // RecommendedQfes - The list of recommended hotfixes for the server. 2768 RecommendedQfes interface{} `json:"recommendedQfes,omitempty"` 2769 // ResolvedAlerts - The total count of alerts that are resolved for this server. 2770 ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"` 2771 // Role - The service role that is being monitored in the server. 2772 Role *string `json:"role,omitempty"` 2773 // ServerReportedMonitoringLevel - The monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off' 2774 ServerReportedMonitoringLevel MonitoringLevel `json:"serverReportedMonitoringLevel,omitempty"` 2775 // Status - The health status of the server. 2776 Status *string `json:"status,omitempty"` 2777} 2778 2779// ServiceMembers the list of servers that are onboarded for a given service. 2780type ServiceMembers struct { 2781 autorest.Response `json:"-"` 2782 // NextLink - The link used to get the next page of operations. 2783 NextLink *string `json:"nextLink,omitempty"` 2784 // Value - The value returned by the operation. 2785 Value *[]ServiceMember `json:"value,omitempty"` 2786 // TotalCount - The total count of service elements. 2787 TotalCount *int32 `json:"totalCount,omitempty"` 2788 // ContinuationToken - The continuation token for paginated calls. 2789 ContinuationToken *string `json:"continuationToken,omitempty"` 2790} 2791 2792// ServiceMembersIterator provides access to a complete listing of ServiceMember values. 2793type ServiceMembersIterator struct { 2794 i int 2795 page ServiceMembersPage 2796} 2797 2798// NextWithContext advances to the next value. If there was an error making 2799// the request the iterator does not advance and the error is returned. 2800func (iter *ServiceMembersIterator) NextWithContext(ctx context.Context) (err error) { 2801 if tracing.IsEnabled() { 2802 ctx = tracing.StartSpan(ctx, fqdn+"/ServiceMembersIterator.NextWithContext") 2803 defer func() { 2804 sc := -1 2805 if iter.Response().Response.Response != nil { 2806 sc = iter.Response().Response.Response.StatusCode 2807 } 2808 tracing.EndSpan(ctx, sc, err) 2809 }() 2810 } 2811 iter.i++ 2812 if iter.i < len(iter.page.Values()) { 2813 return nil 2814 } 2815 err = iter.page.NextWithContext(ctx) 2816 if err != nil { 2817 iter.i-- 2818 return err 2819 } 2820 iter.i = 0 2821 return nil 2822} 2823 2824// Next advances to the next value. If there was an error making 2825// the request the iterator does not advance and the error is returned. 2826// Deprecated: Use NextWithContext() instead. 2827func (iter *ServiceMembersIterator) Next() error { 2828 return iter.NextWithContext(context.Background()) 2829} 2830 2831// NotDone returns true if the enumeration should be started or is not yet complete. 2832func (iter ServiceMembersIterator) NotDone() bool { 2833 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2834} 2835 2836// Response returns the raw server response from the last page request. 2837func (iter ServiceMembersIterator) Response() ServiceMembers { 2838 return iter.page.Response() 2839} 2840 2841// Value returns the current value or a zero-initialized value if the 2842// iterator has advanced beyond the end of the collection. 2843func (iter ServiceMembersIterator) Value() ServiceMember { 2844 if !iter.page.NotDone() { 2845 return ServiceMember{} 2846 } 2847 return iter.page.Values()[iter.i] 2848} 2849 2850// Creates a new instance of the ServiceMembersIterator type. 2851func NewServiceMembersIterator(page ServiceMembersPage) ServiceMembersIterator { 2852 return ServiceMembersIterator{page: page} 2853} 2854 2855// IsEmpty returns true if the ListResult contains no values. 2856func (sm ServiceMembers) IsEmpty() bool { 2857 return sm.Value == nil || len(*sm.Value) == 0 2858} 2859 2860// hasNextLink returns true if the NextLink is not empty. 2861func (sm ServiceMembers) hasNextLink() bool { 2862 return sm.NextLink != nil && len(*sm.NextLink) != 0 2863} 2864 2865// serviceMembersPreparer prepares a request to retrieve the next set of results. 2866// It returns nil if no more results exist. 2867func (sm ServiceMembers) serviceMembersPreparer(ctx context.Context) (*http.Request, error) { 2868 if !sm.hasNextLink() { 2869 return nil, nil 2870 } 2871 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2872 autorest.AsJSON(), 2873 autorest.AsGet(), 2874 autorest.WithBaseURL(to.String(sm.NextLink))) 2875} 2876 2877// ServiceMembersPage contains a page of ServiceMember values. 2878type ServiceMembersPage struct { 2879 fn func(context.Context, ServiceMembers) (ServiceMembers, error) 2880 sm ServiceMembers 2881} 2882 2883// NextWithContext advances to the next page of values. If there was an error making 2884// the request the page does not advance and the error is returned. 2885func (page *ServiceMembersPage) NextWithContext(ctx context.Context) (err error) { 2886 if tracing.IsEnabled() { 2887 ctx = tracing.StartSpan(ctx, fqdn+"/ServiceMembersPage.NextWithContext") 2888 defer func() { 2889 sc := -1 2890 if page.Response().Response.Response != nil { 2891 sc = page.Response().Response.Response.StatusCode 2892 } 2893 tracing.EndSpan(ctx, sc, err) 2894 }() 2895 } 2896 for { 2897 next, err := page.fn(ctx, page.sm) 2898 if err != nil { 2899 return err 2900 } 2901 page.sm = next 2902 if !next.hasNextLink() || !next.IsEmpty() { 2903 break 2904 } 2905 } 2906 return nil 2907} 2908 2909// Next advances to the next page of values. If there was an error making 2910// the request the page does not advance and the error is returned. 2911// Deprecated: Use NextWithContext() instead. 2912func (page *ServiceMembersPage) Next() error { 2913 return page.NextWithContext(context.Background()) 2914} 2915 2916// NotDone returns true if the page enumeration should be started or is not yet complete. 2917func (page ServiceMembersPage) NotDone() bool { 2918 return !page.sm.IsEmpty() 2919} 2920 2921// Response returns the raw server response from the last page request. 2922func (page ServiceMembersPage) Response() ServiceMembers { 2923 return page.sm 2924} 2925 2926// Values returns the slice of values for the current page or nil if there are no values. 2927func (page ServiceMembersPage) Values() []ServiceMember { 2928 if page.sm.IsEmpty() { 2929 return nil 2930 } 2931 return *page.sm.Value 2932} 2933 2934// Creates a new instance of the ServiceMembersPage type. 2935func NewServiceMembersPage(cur ServiceMembers, getNextPage func(context.Context, ServiceMembers) (ServiceMembers, error)) ServiceMembersPage { 2936 return ServiceMembersPage{ 2937 fn: getNextPage, 2938 sm: cur, 2939 } 2940} 2941 2942// ServiceProperties the service properties for a given service. 2943type ServiceProperties struct { 2944 autorest.Response `json:"-"` 2945 // ID - The id of the service. 2946 ID *string `json:"id,omitempty"` 2947 // ActiveAlerts - The count of alerts that are currently active for the service. 2948 ActiveAlerts *int32 `json:"activeAlerts,omitempty"` 2949 // AdditionalInformation - The additional information related to the service. 2950 AdditionalInformation *string `json:"additionalInformation,omitempty"` 2951 // CreatedDate - The date and time, in UTC, when the service was onboarded to Azure Active Directory Connect Health. 2952 CreatedDate *date.Time `json:"createdDate,omitempty"` 2953 // CustomNotificationEmails - The list of additional emails that are configured to receive notifications about the service. 2954 CustomNotificationEmails *[]string `json:"customNotificationEmails,omitempty"` 2955 // Disabled - Indicates if the service is disabled or not. 2956 Disabled *bool `json:"disabled,omitempty"` 2957 // DisplayName - The display name of the service. 2958 DisplayName *string `json:"displayName,omitempty"` 2959 // Health - The health of the service. 2960 Health *string `json:"health,omitempty"` 2961 // LastDisabled - The date and time, in UTC, when the service was last disabled. 2962 LastDisabled *date.Time `json:"lastDisabled,omitempty"` 2963 // LastUpdated - The date or time , in UTC, when the service properties were last updated. 2964 LastUpdated *date.Time `json:"lastUpdated,omitempty"` 2965 // MonitoringConfigurationsComputed - The monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health. 2966 MonitoringConfigurationsComputed interface{} `json:"monitoringConfigurationsComputed,omitempty"` 2967 // MonitoringConfigurationsCustomized - The customized monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health. 2968 MonitoringConfigurationsCustomized interface{} `json:"monitoringConfigurationsCustomized,omitempty"` 2969 // NotificationEmailEnabled - Indicates if email notification is enabled or not. 2970 NotificationEmailEnabled *bool `json:"notificationEmailEnabled,omitempty"` 2971 // NotificationEmailEnabledForGlobalAdmins - Indicates if email notification is enabled for global administrators of the tenant. 2972 NotificationEmailEnabledForGlobalAdmins *bool `json:"notificationEmailEnabledForGlobalAdmins,omitempty"` 2973 // NotificationEmailsEnabledForGlobalAdmins - Indicates if email notification is enabled for global administrators of the tenant. 2974 NotificationEmailsEnabledForGlobalAdmins *bool `json:"notificationEmailsEnabledForGlobalAdmins,omitempty"` 2975 // NotificationEmails - The list of emails to whom service notifications will be sent. 2976 NotificationEmails *[]string `json:"notificationEmails,omitempty"` 2977 // OriginalDisabledState - Gets the original disable state. 2978 OriginalDisabledState *bool `json:"originalDisabledState,omitempty"` 2979 // ResolvedAlerts - The total count of alerts that has been resolved for the service. 2980 ResolvedAlerts *int32 `json:"resolvedAlerts,omitempty"` 2981 // ServiceID - The id of the service. 2982 ServiceID *string `json:"serviceId,omitempty"` 2983 // ServiceName - The name of the service. 2984 ServiceName *string `json:"serviceName,omitempty"` 2985 // Signature - The signature of the service. 2986 Signature *string `json:"signature,omitempty"` 2987 // SimpleProperties - List of service specific configuration properties. 2988 SimpleProperties interface{} `json:"simpleProperties,omitempty"` 2989 // TenantID - The id of the tenant to which the service is registered to. 2990 TenantID *string `json:"tenantId,omitempty"` 2991 // 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. 2992 Type *string `json:"type,omitempty"` 2993} 2994 2995// Services the list of services for a given onboarded tenant. 2996type Services struct { 2997 autorest.Response `json:"-"` 2998 // NextLink - The link used to get the next page of operations. 2999 NextLink *string `json:"nextLink,omitempty"` 3000 // Value - The value returned by the operation. 3001 Value *[]ServiceProperties `json:"value,omitempty"` 3002 // TotalCount - The total count of service elements. 3003 TotalCount *int32 `json:"totalCount,omitempty"` 3004 // ContinuationToken - The continuation token for paginated calls. 3005 ContinuationToken *string `json:"continuationToken,omitempty"` 3006} 3007 3008// ServicesIterator provides access to a complete listing of ServiceProperties values. 3009type ServicesIterator struct { 3010 i int 3011 page ServicesPage 3012} 3013 3014// NextWithContext advances to the next value. If there was an error making 3015// the request the iterator does not advance and the error is returned. 3016func (iter *ServicesIterator) NextWithContext(ctx context.Context) (err error) { 3017 if tracing.IsEnabled() { 3018 ctx = tracing.StartSpan(ctx, fqdn+"/ServicesIterator.NextWithContext") 3019 defer func() { 3020 sc := -1 3021 if iter.Response().Response.Response != nil { 3022 sc = iter.Response().Response.Response.StatusCode 3023 } 3024 tracing.EndSpan(ctx, sc, err) 3025 }() 3026 } 3027 iter.i++ 3028 if iter.i < len(iter.page.Values()) { 3029 return nil 3030 } 3031 err = iter.page.NextWithContext(ctx) 3032 if err != nil { 3033 iter.i-- 3034 return err 3035 } 3036 iter.i = 0 3037 return nil 3038} 3039 3040// Next advances to the next value. If there was an error making 3041// the request the iterator does not advance and the error is returned. 3042// Deprecated: Use NextWithContext() instead. 3043func (iter *ServicesIterator) Next() error { 3044 return iter.NextWithContext(context.Background()) 3045} 3046 3047// NotDone returns true if the enumeration should be started or is not yet complete. 3048func (iter ServicesIterator) NotDone() bool { 3049 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3050} 3051 3052// Response returns the raw server response from the last page request. 3053func (iter ServicesIterator) Response() Services { 3054 return iter.page.Response() 3055} 3056 3057// Value returns the current value or a zero-initialized value if the 3058// iterator has advanced beyond the end of the collection. 3059func (iter ServicesIterator) Value() ServiceProperties { 3060 if !iter.page.NotDone() { 3061 return ServiceProperties{} 3062 } 3063 return iter.page.Values()[iter.i] 3064} 3065 3066// Creates a new instance of the ServicesIterator type. 3067func NewServicesIterator(page ServicesPage) ServicesIterator { 3068 return ServicesIterator{page: page} 3069} 3070 3071// IsEmpty returns true if the ListResult contains no values. 3072func (s Services) IsEmpty() bool { 3073 return s.Value == nil || len(*s.Value) == 0 3074} 3075 3076// hasNextLink returns true if the NextLink is not empty. 3077func (s Services) hasNextLink() bool { 3078 return s.NextLink != nil && len(*s.NextLink) != 0 3079} 3080 3081// servicesPreparer prepares a request to retrieve the next set of results. 3082// It returns nil if no more results exist. 3083func (s Services) servicesPreparer(ctx context.Context) (*http.Request, error) { 3084 if !s.hasNextLink() { 3085 return nil, nil 3086 } 3087 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3088 autorest.AsJSON(), 3089 autorest.AsGet(), 3090 autorest.WithBaseURL(to.String(s.NextLink))) 3091} 3092 3093// ServicesPage contains a page of ServiceProperties values. 3094type ServicesPage struct { 3095 fn func(context.Context, Services) (Services, error) 3096 s Services 3097} 3098 3099// NextWithContext advances to the next page of values. If there was an error making 3100// the request the page does not advance and the error is returned. 3101func (page *ServicesPage) NextWithContext(ctx context.Context) (err error) { 3102 if tracing.IsEnabled() { 3103 ctx = tracing.StartSpan(ctx, fqdn+"/ServicesPage.NextWithContext") 3104 defer func() { 3105 sc := -1 3106 if page.Response().Response.Response != nil { 3107 sc = page.Response().Response.Response.StatusCode 3108 } 3109 tracing.EndSpan(ctx, sc, err) 3110 }() 3111 } 3112 for { 3113 next, err := page.fn(ctx, page.s) 3114 if err != nil { 3115 return err 3116 } 3117 page.s = next 3118 if !next.hasNextLink() || !next.IsEmpty() { 3119 break 3120 } 3121 } 3122 return nil 3123} 3124 3125// Next advances to the next page of values. If there was an error making 3126// the request the page does not advance and the error is returned. 3127// Deprecated: Use NextWithContext() instead. 3128func (page *ServicesPage) Next() error { 3129 return page.NextWithContext(context.Background()) 3130} 3131 3132// NotDone returns true if the page enumeration should be started or is not yet complete. 3133func (page ServicesPage) NotDone() bool { 3134 return !page.s.IsEmpty() 3135} 3136 3137// Response returns the raw server response from the last page request. 3138func (page ServicesPage) Response() Services { 3139 return page.s 3140} 3141 3142// Values returns the slice of values for the current page or nil if there are no values. 3143func (page ServicesPage) Values() []ServiceProperties { 3144 if page.s.IsEmpty() { 3145 return nil 3146 } 3147 return *page.s.Value 3148} 3149 3150// Creates a new instance of the ServicesPage type. 3151func NewServicesPage(cur Services, getNextPage func(context.Context, Services) (Services, error)) ServicesPage { 3152 return ServicesPage{ 3153 fn: getNextPage, 3154 s: cur, 3155 } 3156} 3157 3158// TabularExportError the details for export error. 3159type TabularExportError struct { 3160 // ServiceID - The service Id. 3161 ServiceID *uuid.UUID `json:"serviceId,omitempty"` 3162 // ServiceMemberID - The server Id. 3163 ServiceMemberID *uuid.UUID `json:"serviceMemberId,omitempty"` 3164 // MergedEntityID - The merged entity Id. 3165 MergedEntityID *uuid.UUID `json:"mergedEntityId,omitempty"` 3166 // TabularExportErrorData - The export error data. 3167 TabularExportErrorData *string `json:"tabularExportErrorData,omitempty"` 3168} 3169 3170// Tenant the details of the onboarded tenant. 3171type Tenant struct { 3172 autorest.Response `json:"-"` 3173 // TenantID - The Id of the tenant. 3174 TenantID *string `json:"tenantId,omitempty"` 3175 // AadLicense - The Azure Active Directory license of the tenant. 3176 AadLicense *string `json:"aadLicense,omitempty"` 3177 // AadPremium - Indicate if the tenant has Azure Active Directory Premium license or not. 3178 AadPremium *bool `json:"aadPremium,omitempty"` 3179 // AgentAutoUpdate - Indicates if the tenant is configured to automatically receive updates for Azure Active Directory Connect Health client side features. 3180 AgentAutoUpdate *bool `json:"agentAutoUpdate,omitempty"` 3181 // AlertSuppressionTimeInMins - The time in minutes after which an alert will be auto-suppressed. 3182 AlertSuppressionTimeInMins *int32 `json:"alertSuppressionTimeInMins,omitempty"` 3183 // ConsentedToMicrosoftDevOps - Indicates if the tenant data can be seen by Microsoft through Azure portal. 3184 ConsentedToMicrosoftDevOps *bool `json:"consentedToMicrosoftDevOps,omitempty"` 3185 // CountryLetterCode - The country letter code of the tenant. 3186 CountryLetterCode *string `json:"countryLetterCode,omitempty"` 3187 // CreatedDate - The date, in UTC, when the tenant was onboarded to Azure Active Directory Connect Health. 3188 CreatedDate *date.Time `json:"createdDate,omitempty"` 3189 // DevOpsTTL - The date and time, in UTC, till when the tenant data can be seen by Microsoft through Azure portal. 3190 DevOpsTTL *date.Time `json:"devOpsTtl,omitempty"` 3191 // Disabled - Indicates if the tenant is disabled in Azure Active Directory Connect Health. 3192 Disabled *bool `json:"disabled,omitempty"` 3193 // DisabledReason - The reason due to which the tenant was disabled in Azure Active Directory Connect Health. 3194 DisabledReason *int32 `json:"disabledReason,omitempty"` 3195 // GlobalAdminsEmail - The list of global administrators for the tenant. 3196 GlobalAdminsEmail *[]string `json:"globalAdminsEmail,omitempty"` 3197 // InitialDomain - The initial domain of the tenant. 3198 InitialDomain *string `json:"initialDomain,omitempty"` 3199 // LastDisabled - The date and time, in UTC, when the tenant was last disabled in Azure Active Directory Connect Health. 3200 LastDisabled *date.Time `json:"lastDisabled,omitempty"` 3201 // LastVerified - The date and time, in UTC, when the tenant onboarding status in Azure Active Directory Connect Health was last verified. 3202 LastVerified *date.Time `json:"lastVerified,omitempty"` 3203 // OnboardingAllowed - Indicates if the tenant is allowed to onboard to Azure Active Directory Connect Health. 3204 OnboardingAllowed *bool `json:"onboardingAllowed,omitempty"` 3205 // Onboarded - Indicates if the tenant is already onboarded to Azure Active Directory Connect Health. 3206 Onboarded *bool `json:"onboarded,omitempty"` 3207 // PksCertificate - The certificate associated with the tenant to onboard data to Azure Active Directory Connect Health. 3208 PksCertificate interface{} `json:"pksCertificate,omitempty"` 3209 // PrivatePreviewTenant - Indicates if the tenant has signed up for private preview of Azure Active Directory Connect Health features. 3210 PrivatePreviewTenant *bool `json:"privatePreviewTenant,omitempty"` 3211 // TenantInQuarantine - Indicates if data collection for this tenant is disabled or not. 3212 TenantInQuarantine *bool `json:"tenantInQuarantine,omitempty"` 3213 // TenantName - The name of the tenant. 3214 TenantName *string `json:"tenantName,omitempty"` 3215} 3216 3217// TenantOnboardingDetails the tenant onboarding details. 3218type TenantOnboardingDetails struct { 3219 // TenantOnboarded - Indicates if the tenant is onboarded to Azure Active Directory Connect Health or not. 3220 TenantOnboarded *bool `json:"tenantOnboarded,omitempty"` 3221 // OnboardingDisplayURL - The display url, to help tenant navigate or onboard to Azure Active Directory Connect Health blade, based on tenant onboarding status. 3222 OnboardingDisplayURL *string `json:"onboardingDisplayUrl,omitempty"` 3223} 3224 3225// UserPreference the user preference for a given feature. 3226type UserPreference struct { 3227 autorest.Response `json:"-"` 3228 // MetricNames - The name of the metric. 3229 MetricNames *[]string `json:"metricNames,omitempty"` 3230} 3231 3232// ValueDelta the value of the delta. 3233type ValueDelta struct { 3234 // OperationType - The operation type. Possible values include: 'ValueDeltaOperationTypeUndefined', 'ValueDeltaOperationTypeAdd', 'ValueDeltaOperationTypeUpdate', 'ValueDeltaOperationTypeDelete' 3235 OperationType ValueDeltaOperationType `json:"operationType,omitempty"` 3236 // Value - The value of the delta. 3237 Value *string `json:"value,omitempty"` 3238} 3239