1package synapse 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/azure" 14 "github.com/Azure/go-autorest/autorest/date" 15 "github.com/Azure/go-autorest/autorest/to" 16 "github.com/Azure/go-autorest/tracing" 17 "github.com/gofrs/uuid" 18 "net/http" 19) 20 21// The package's fully qualified name. 22const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2021-06-01-preview/synapse" 23 24// AadAdminProperties workspace active directory administrator properties 25type AadAdminProperties struct { 26 // TenantID - Tenant ID of the workspace active directory administrator 27 TenantID *string `json:"tenantId,omitempty"` 28 // Login - Login of the workspace active directory administrator 29 Login *string `json:"login,omitempty"` 30 // AdministratorType - Workspace active directory administrator type 31 AdministratorType *string `json:"administratorType,omitempty"` 32 // Sid - Object ID of the workspace active directory administrator 33 Sid *string `json:"sid,omitempty"` 34} 35 36// AutoPauseProperties auto-pausing properties of a Big Data pool powered by Apache Spark 37type AutoPauseProperties struct { 38 // DelayInMinutes - Number of minutes of idle time before the Big Data pool is automatically paused. 39 DelayInMinutes *int32 `json:"delayInMinutes,omitempty"` 40 // Enabled - Whether auto-pausing is enabled for the Big Data pool. 41 Enabled *bool `json:"enabled,omitempty"` 42} 43 44// AutoScaleProperties auto-scaling properties of a Big Data pool powered by Apache Spark 45type AutoScaleProperties struct { 46 // MinNodeCount - The minimum number of nodes the Big Data pool can support. 47 MinNodeCount *int32 `json:"minNodeCount,omitempty"` 48 // Enabled - Whether automatic scaling is enabled for the Big Data pool. 49 Enabled *bool `json:"enabled,omitempty"` 50 // MaxNodeCount - The maximum number of nodes the Big Data pool can support. 51 MaxNodeCount *int32 `json:"maxNodeCount,omitempty"` 52} 53 54// AvailableRpOperation an operation that is available in this resource provider 55type AvailableRpOperation struct { 56 // Display - Display properties of the operation 57 Display *AvailableRpOperationDisplayInfo `json:"display,omitempty"` 58 // IsDataAction - Whether this operation is a data action 59 IsDataAction *string `json:"isDataAction,omitempty"` 60 // Name - Operation name 61 Name *string `json:"name,omitempty"` 62 // OperationMetaPropertyInfo - Operation properties 63 *OperationMetaPropertyInfo `json:"properties,omitempty"` 64 // Origin - Operation origin 65 Origin *string `json:"origin,omitempty"` 66} 67 68// MarshalJSON is the custom marshaler for AvailableRpOperation. 69func (aro AvailableRpOperation) MarshalJSON() ([]byte, error) { 70 objectMap := make(map[string]interface{}) 71 if aro.Display != nil { 72 objectMap["display"] = aro.Display 73 } 74 if aro.IsDataAction != nil { 75 objectMap["isDataAction"] = aro.IsDataAction 76 } 77 if aro.Name != nil { 78 objectMap["name"] = aro.Name 79 } 80 if aro.OperationMetaPropertyInfo != nil { 81 objectMap["properties"] = aro.OperationMetaPropertyInfo 82 } 83 if aro.Origin != nil { 84 objectMap["origin"] = aro.Origin 85 } 86 return json.Marshal(objectMap) 87} 88 89// UnmarshalJSON is the custom unmarshaler for AvailableRpOperation struct. 90func (aro *AvailableRpOperation) UnmarshalJSON(body []byte) error { 91 var m map[string]*json.RawMessage 92 err := json.Unmarshal(body, &m) 93 if err != nil { 94 return err 95 } 96 for k, v := range m { 97 switch k { 98 case "display": 99 if v != nil { 100 var display AvailableRpOperationDisplayInfo 101 err = json.Unmarshal(*v, &display) 102 if err != nil { 103 return err 104 } 105 aro.Display = &display 106 } 107 case "isDataAction": 108 if v != nil { 109 var isDataAction string 110 err = json.Unmarshal(*v, &isDataAction) 111 if err != nil { 112 return err 113 } 114 aro.IsDataAction = &isDataAction 115 } 116 case "name": 117 if v != nil { 118 var name string 119 err = json.Unmarshal(*v, &name) 120 if err != nil { 121 return err 122 } 123 aro.Name = &name 124 } 125 case "properties": 126 if v != nil { 127 var operationMetaPropertyInfo OperationMetaPropertyInfo 128 err = json.Unmarshal(*v, &operationMetaPropertyInfo) 129 if err != nil { 130 return err 131 } 132 aro.OperationMetaPropertyInfo = &operationMetaPropertyInfo 133 } 134 case "origin": 135 if v != nil { 136 var origin string 137 err = json.Unmarshal(*v, &origin) 138 if err != nil { 139 return err 140 } 141 aro.Origin = &origin 142 } 143 } 144 } 145 146 return nil 147} 148 149// AvailableRpOperationDisplayInfo description of an available operation 150type AvailableRpOperationDisplayInfo struct { 151 // Description - Operation description 152 Description *string `json:"description,omitempty"` 153 // Resource - Resource type 154 Resource *string `json:"resource,omitempty"` 155 // Provider - Resource provider name 156 Provider *string `json:"provider,omitempty"` 157 // Operation - Operation name 158 Operation *string `json:"operation,omitempty"` 159} 160 161// AzureADOnlyAuthentication azure Active Directory Only Authentication Info 162type AzureADOnlyAuthentication struct { 163 autorest.Response `json:"-"` 164 // AzureADOnlyAuthenticationProperties - Azure Active Directory Only Authentication resource properties 165 *AzureADOnlyAuthenticationProperties `json:"properties,omitempty"` 166 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 167 ID *string `json:"id,omitempty"` 168 // Name - READ-ONLY; The name of the resource 169 Name *string `json:"name,omitempty"` 170 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 171 Type *string `json:"type,omitempty"` 172} 173 174// MarshalJSON is the custom marshaler for AzureADOnlyAuthentication. 175func (aaoa AzureADOnlyAuthentication) MarshalJSON() ([]byte, error) { 176 objectMap := make(map[string]interface{}) 177 if aaoa.AzureADOnlyAuthenticationProperties != nil { 178 objectMap["properties"] = aaoa.AzureADOnlyAuthenticationProperties 179 } 180 return json.Marshal(objectMap) 181} 182 183// UnmarshalJSON is the custom unmarshaler for AzureADOnlyAuthentication struct. 184func (aaoa *AzureADOnlyAuthentication) UnmarshalJSON(body []byte) error { 185 var m map[string]*json.RawMessage 186 err := json.Unmarshal(body, &m) 187 if err != nil { 188 return err 189 } 190 for k, v := range m { 191 switch k { 192 case "properties": 193 if v != nil { 194 var azureADOnlyAuthenticationProperties AzureADOnlyAuthenticationProperties 195 err = json.Unmarshal(*v, &azureADOnlyAuthenticationProperties) 196 if err != nil { 197 return err 198 } 199 aaoa.AzureADOnlyAuthenticationProperties = &azureADOnlyAuthenticationProperties 200 } 201 case "id": 202 if v != nil { 203 var ID string 204 err = json.Unmarshal(*v, &ID) 205 if err != nil { 206 return err 207 } 208 aaoa.ID = &ID 209 } 210 case "name": 211 if v != nil { 212 var name string 213 err = json.Unmarshal(*v, &name) 214 if err != nil { 215 return err 216 } 217 aaoa.Name = &name 218 } 219 case "type": 220 if v != nil { 221 var typeVar string 222 err = json.Unmarshal(*v, &typeVar) 223 if err != nil { 224 return err 225 } 226 aaoa.Type = &typeVar 227 } 228 } 229 } 230 231 return nil 232} 233 234// AzureADOnlyAuthenticationListResult a list of Azure Active Directory only authentications. 235type AzureADOnlyAuthenticationListResult struct { 236 autorest.Response `json:"-"` 237 // Value - READ-ONLY; Array of results. 238 Value *[]AzureADOnlyAuthentication `json:"value,omitempty"` 239 // NextLink - READ-ONLY; Link to retrieve next page of results. 240 NextLink *string `json:"nextLink,omitempty"` 241} 242 243// MarshalJSON is the custom marshaler for AzureADOnlyAuthenticationListResult. 244func (aaoalr AzureADOnlyAuthenticationListResult) MarshalJSON() ([]byte, error) { 245 objectMap := make(map[string]interface{}) 246 return json.Marshal(objectMap) 247} 248 249// AzureADOnlyAuthenticationListResultIterator provides access to a complete listing of 250// AzureADOnlyAuthentication values. 251type AzureADOnlyAuthenticationListResultIterator struct { 252 i int 253 page AzureADOnlyAuthenticationListResultPage 254} 255 256// NextWithContext advances to the next value. If there was an error making 257// the request the iterator does not advance and the error is returned. 258func (iter *AzureADOnlyAuthenticationListResultIterator) NextWithContext(ctx context.Context) (err error) { 259 if tracing.IsEnabled() { 260 ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationListResultIterator.NextWithContext") 261 defer func() { 262 sc := -1 263 if iter.Response().Response.Response != nil { 264 sc = iter.Response().Response.Response.StatusCode 265 } 266 tracing.EndSpan(ctx, sc, err) 267 }() 268 } 269 iter.i++ 270 if iter.i < len(iter.page.Values()) { 271 return nil 272 } 273 err = iter.page.NextWithContext(ctx) 274 if err != nil { 275 iter.i-- 276 return err 277 } 278 iter.i = 0 279 return nil 280} 281 282// Next advances to the next value. If there was an error making 283// the request the iterator does not advance and the error is returned. 284// Deprecated: Use NextWithContext() instead. 285func (iter *AzureADOnlyAuthenticationListResultIterator) Next() error { 286 return iter.NextWithContext(context.Background()) 287} 288 289// NotDone returns true if the enumeration should be started or is not yet complete. 290func (iter AzureADOnlyAuthenticationListResultIterator) NotDone() bool { 291 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 292} 293 294// Response returns the raw server response from the last page request. 295func (iter AzureADOnlyAuthenticationListResultIterator) Response() AzureADOnlyAuthenticationListResult { 296 return iter.page.Response() 297} 298 299// Value returns the current value or a zero-initialized value if the 300// iterator has advanced beyond the end of the collection. 301func (iter AzureADOnlyAuthenticationListResultIterator) Value() AzureADOnlyAuthentication { 302 if !iter.page.NotDone() { 303 return AzureADOnlyAuthentication{} 304 } 305 return iter.page.Values()[iter.i] 306} 307 308// Creates a new instance of the AzureADOnlyAuthenticationListResultIterator type. 309func NewAzureADOnlyAuthenticationListResultIterator(page AzureADOnlyAuthenticationListResultPage) AzureADOnlyAuthenticationListResultIterator { 310 return AzureADOnlyAuthenticationListResultIterator{page: page} 311} 312 313// IsEmpty returns true if the ListResult contains no values. 314func (aaoalr AzureADOnlyAuthenticationListResult) IsEmpty() bool { 315 return aaoalr.Value == nil || len(*aaoalr.Value) == 0 316} 317 318// hasNextLink returns true if the NextLink is not empty. 319func (aaoalr AzureADOnlyAuthenticationListResult) hasNextLink() bool { 320 return aaoalr.NextLink != nil && len(*aaoalr.NextLink) != 0 321} 322 323// azureADOnlyAuthenticationListResultPreparer prepares a request to retrieve the next set of results. 324// It returns nil if no more results exist. 325func (aaoalr AzureADOnlyAuthenticationListResult) azureADOnlyAuthenticationListResultPreparer(ctx context.Context) (*http.Request, error) { 326 if !aaoalr.hasNextLink() { 327 return nil, nil 328 } 329 return autorest.Prepare((&http.Request{}).WithContext(ctx), 330 autorest.AsJSON(), 331 autorest.AsGet(), 332 autorest.WithBaseURL(to.String(aaoalr.NextLink))) 333} 334 335// AzureADOnlyAuthenticationListResultPage contains a page of AzureADOnlyAuthentication values. 336type AzureADOnlyAuthenticationListResultPage struct { 337 fn func(context.Context, AzureADOnlyAuthenticationListResult) (AzureADOnlyAuthenticationListResult, error) 338 aaoalr AzureADOnlyAuthenticationListResult 339} 340 341// NextWithContext advances to the next page of values. If there was an error making 342// the request the page does not advance and the error is returned. 343func (page *AzureADOnlyAuthenticationListResultPage) NextWithContext(ctx context.Context) (err error) { 344 if tracing.IsEnabled() { 345 ctx = tracing.StartSpan(ctx, fqdn+"/AzureADOnlyAuthenticationListResultPage.NextWithContext") 346 defer func() { 347 sc := -1 348 if page.Response().Response.Response != nil { 349 sc = page.Response().Response.Response.StatusCode 350 } 351 tracing.EndSpan(ctx, sc, err) 352 }() 353 } 354 for { 355 next, err := page.fn(ctx, page.aaoalr) 356 if err != nil { 357 return err 358 } 359 page.aaoalr = next 360 if !next.hasNextLink() || !next.IsEmpty() { 361 break 362 } 363 } 364 return nil 365} 366 367// Next advances to the next page of values. If there was an error making 368// the request the page does not advance and the error is returned. 369// Deprecated: Use NextWithContext() instead. 370func (page *AzureADOnlyAuthenticationListResultPage) Next() error { 371 return page.NextWithContext(context.Background()) 372} 373 374// NotDone returns true if the page enumeration should be started or is not yet complete. 375func (page AzureADOnlyAuthenticationListResultPage) NotDone() bool { 376 return !page.aaoalr.IsEmpty() 377} 378 379// Response returns the raw server response from the last page request. 380func (page AzureADOnlyAuthenticationListResultPage) Response() AzureADOnlyAuthenticationListResult { 381 return page.aaoalr 382} 383 384// Values returns the slice of values for the current page or nil if there are no values. 385func (page AzureADOnlyAuthenticationListResultPage) Values() []AzureADOnlyAuthentication { 386 if page.aaoalr.IsEmpty() { 387 return nil 388 } 389 return *page.aaoalr.Value 390} 391 392// Creates a new instance of the AzureADOnlyAuthenticationListResultPage type. 393func NewAzureADOnlyAuthenticationListResultPage(cur AzureADOnlyAuthenticationListResult, getNextPage func(context.Context, AzureADOnlyAuthenticationListResult) (AzureADOnlyAuthenticationListResult, error)) AzureADOnlyAuthenticationListResultPage { 394 return AzureADOnlyAuthenticationListResultPage{ 395 fn: getNextPage, 396 aaoalr: cur, 397 } 398} 399 400// AzureADOnlyAuthenticationProperties azure Active Directory Only Authentication properties 401type AzureADOnlyAuthenticationProperties struct { 402 // AzureADOnlyAuthentication - Azure Active Directory Only Authentication enabled 403 AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` 404 // State - READ-ONLY; Azure Active Directory Only Authentication configuration state. Possible values include: 'AuthenticationStateConsistent', 'AuthenticationStateInConsistent', 'AuthenticationStateUpdating' 405 State AuthenticationState `json:"state,omitempty"` 406 // CreationDate - READ-ONLY; property configuration date 407 CreationDate *date.Time `json:"creationDate,omitempty"` 408} 409 410// MarshalJSON is the custom marshaler for AzureADOnlyAuthenticationProperties. 411func (aaoap AzureADOnlyAuthenticationProperties) MarshalJSON() ([]byte, error) { 412 objectMap := make(map[string]interface{}) 413 if aaoap.AzureADOnlyAuthentication != nil { 414 objectMap["azureADOnlyAuthentication"] = aaoap.AzureADOnlyAuthentication 415 } 416 return json.Marshal(objectMap) 417} 418 419// AzureADOnlyAuthenticationsCreateFuture an abstraction for monitoring and retrieving the results of a 420// long-running operation. 421type AzureADOnlyAuthenticationsCreateFuture struct { 422 azure.FutureAPI 423 // Result returns the result of the asynchronous operation. 424 // If the operation has not completed it will return an error. 425 Result func(AzureADOnlyAuthenticationsClient) (AzureADOnlyAuthentication, error) 426} 427 428// UnmarshalJSON is the custom unmarshaller for CreateFuture. 429func (future *AzureADOnlyAuthenticationsCreateFuture) UnmarshalJSON(body []byte) error { 430 var azFuture azure.Future 431 if err := json.Unmarshal(body, &azFuture); err != nil { 432 return err 433 } 434 future.FutureAPI = &azFuture 435 future.Result = future.result 436 return nil 437} 438 439// result is the default implementation for AzureADOnlyAuthenticationsCreateFuture.Result. 440func (future *AzureADOnlyAuthenticationsCreateFuture) result(client AzureADOnlyAuthenticationsClient) (aaoa AzureADOnlyAuthentication, err error) { 441 var done bool 442 done, err = future.DoneWithContext(context.Background(), client) 443 if err != nil { 444 err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsCreateFuture", "Result", future.Response(), "Polling failure") 445 return 446 } 447 if !done { 448 aaoa.Response.Response = future.Response() 449 err = azure.NewAsyncOpIncompleteError("synapse.AzureADOnlyAuthenticationsCreateFuture") 450 return 451 } 452 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 453 if aaoa.Response.Response, err = future.GetResult(sender); err == nil && aaoa.Response.Response.StatusCode != http.StatusNoContent { 454 aaoa, err = client.CreateResponder(aaoa.Response.Response) 455 if err != nil { 456 err = autorest.NewErrorWithError(err, "synapse.AzureADOnlyAuthenticationsCreateFuture", "Result", aaoa.Response.Response, "Failure responding to request") 457 } 458 } 459 return 460} 461 462// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. 463type AzureEntityResource struct { 464 // Etag - READ-ONLY; Resource Etag. 465 Etag *string `json:"etag,omitempty"` 466 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 467 ID *string `json:"id,omitempty"` 468 // Name - READ-ONLY; The name of the resource 469 Name *string `json:"name,omitempty"` 470 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 471 Type *string `json:"type,omitempty"` 472} 473 474// MarshalJSON is the custom marshaler for AzureEntityResource. 475func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { 476 objectMap := make(map[string]interface{}) 477 return json.Marshal(objectMap) 478} 479 480// BigDataPoolPatchInfo properties patch for a Big Data pool 481type BigDataPoolPatchInfo struct { 482 // Tags - Updated tags for the Big Data pool 483 Tags map[string]*string `json:"tags"` 484} 485 486// MarshalJSON is the custom marshaler for BigDataPoolPatchInfo. 487func (bdppi BigDataPoolPatchInfo) MarshalJSON() ([]byte, error) { 488 objectMap := make(map[string]interface{}) 489 if bdppi.Tags != nil { 490 objectMap["tags"] = bdppi.Tags 491 } 492 return json.Marshal(objectMap) 493} 494 495// BigDataPoolResourceInfo a Big Data pool 496type BigDataPoolResourceInfo struct { 497 autorest.Response `json:"-"` 498 // BigDataPoolResourceProperties - Big Data pool properties 499 *BigDataPoolResourceProperties `json:"properties,omitempty"` 500 // Tags - Resource tags. 501 Tags map[string]*string `json:"tags"` 502 // Location - The geo-location where the resource lives 503 Location *string `json:"location,omitempty"` 504 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 505 ID *string `json:"id,omitempty"` 506 // Name - READ-ONLY; The name of the resource 507 Name *string `json:"name,omitempty"` 508 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 509 Type *string `json:"type,omitempty"` 510} 511 512// MarshalJSON is the custom marshaler for BigDataPoolResourceInfo. 513func (bdpri BigDataPoolResourceInfo) MarshalJSON() ([]byte, error) { 514 objectMap := make(map[string]interface{}) 515 if bdpri.BigDataPoolResourceProperties != nil { 516 objectMap["properties"] = bdpri.BigDataPoolResourceProperties 517 } 518 if bdpri.Tags != nil { 519 objectMap["tags"] = bdpri.Tags 520 } 521 if bdpri.Location != nil { 522 objectMap["location"] = bdpri.Location 523 } 524 return json.Marshal(objectMap) 525} 526 527// UnmarshalJSON is the custom unmarshaler for BigDataPoolResourceInfo struct. 528func (bdpri *BigDataPoolResourceInfo) UnmarshalJSON(body []byte) error { 529 var m map[string]*json.RawMessage 530 err := json.Unmarshal(body, &m) 531 if err != nil { 532 return err 533 } 534 for k, v := range m { 535 switch k { 536 case "properties": 537 if v != nil { 538 var bigDataPoolResourceProperties BigDataPoolResourceProperties 539 err = json.Unmarshal(*v, &bigDataPoolResourceProperties) 540 if err != nil { 541 return err 542 } 543 bdpri.BigDataPoolResourceProperties = &bigDataPoolResourceProperties 544 } 545 case "tags": 546 if v != nil { 547 var tags map[string]*string 548 err = json.Unmarshal(*v, &tags) 549 if err != nil { 550 return err 551 } 552 bdpri.Tags = tags 553 } 554 case "location": 555 if v != nil { 556 var location string 557 err = json.Unmarshal(*v, &location) 558 if err != nil { 559 return err 560 } 561 bdpri.Location = &location 562 } 563 case "id": 564 if v != nil { 565 var ID string 566 err = json.Unmarshal(*v, &ID) 567 if err != nil { 568 return err 569 } 570 bdpri.ID = &ID 571 } 572 case "name": 573 if v != nil { 574 var name string 575 err = json.Unmarshal(*v, &name) 576 if err != nil { 577 return err 578 } 579 bdpri.Name = &name 580 } 581 case "type": 582 if v != nil { 583 var typeVar string 584 err = json.Unmarshal(*v, &typeVar) 585 if err != nil { 586 return err 587 } 588 bdpri.Type = &typeVar 589 } 590 } 591 } 592 593 return nil 594} 595 596// BigDataPoolResourceInfoListResult collection of Big Data pool information 597type BigDataPoolResourceInfoListResult struct { 598 autorest.Response `json:"-"` 599 // NextLink - Link to the next page of results 600 NextLink *string `json:"nextLink,omitempty"` 601 // Value - List of Big Data pools 602 Value *[]BigDataPoolResourceInfo `json:"value,omitempty"` 603} 604 605// BigDataPoolResourceInfoListResultIterator provides access to a complete listing of 606// BigDataPoolResourceInfo values. 607type BigDataPoolResourceInfoListResultIterator struct { 608 i int 609 page BigDataPoolResourceInfoListResultPage 610} 611 612// NextWithContext advances to the next value. If there was an error making 613// the request the iterator does not advance and the error is returned. 614func (iter *BigDataPoolResourceInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { 615 if tracing.IsEnabled() { 616 ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolResourceInfoListResultIterator.NextWithContext") 617 defer func() { 618 sc := -1 619 if iter.Response().Response.Response != nil { 620 sc = iter.Response().Response.Response.StatusCode 621 } 622 tracing.EndSpan(ctx, sc, err) 623 }() 624 } 625 iter.i++ 626 if iter.i < len(iter.page.Values()) { 627 return nil 628 } 629 err = iter.page.NextWithContext(ctx) 630 if err != nil { 631 iter.i-- 632 return err 633 } 634 iter.i = 0 635 return nil 636} 637 638// Next advances to the next value. If there was an error making 639// the request the iterator does not advance and the error is returned. 640// Deprecated: Use NextWithContext() instead. 641func (iter *BigDataPoolResourceInfoListResultIterator) Next() error { 642 return iter.NextWithContext(context.Background()) 643} 644 645// NotDone returns true if the enumeration should be started or is not yet complete. 646func (iter BigDataPoolResourceInfoListResultIterator) NotDone() bool { 647 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 648} 649 650// Response returns the raw server response from the last page request. 651func (iter BigDataPoolResourceInfoListResultIterator) Response() BigDataPoolResourceInfoListResult { 652 return iter.page.Response() 653} 654 655// Value returns the current value or a zero-initialized value if the 656// iterator has advanced beyond the end of the collection. 657func (iter BigDataPoolResourceInfoListResultIterator) Value() BigDataPoolResourceInfo { 658 if !iter.page.NotDone() { 659 return BigDataPoolResourceInfo{} 660 } 661 return iter.page.Values()[iter.i] 662} 663 664// Creates a new instance of the BigDataPoolResourceInfoListResultIterator type. 665func NewBigDataPoolResourceInfoListResultIterator(page BigDataPoolResourceInfoListResultPage) BigDataPoolResourceInfoListResultIterator { 666 return BigDataPoolResourceInfoListResultIterator{page: page} 667} 668 669// IsEmpty returns true if the ListResult contains no values. 670func (bdprilr BigDataPoolResourceInfoListResult) IsEmpty() bool { 671 return bdprilr.Value == nil || len(*bdprilr.Value) == 0 672} 673 674// hasNextLink returns true if the NextLink is not empty. 675func (bdprilr BigDataPoolResourceInfoListResult) hasNextLink() bool { 676 return bdprilr.NextLink != nil && len(*bdprilr.NextLink) != 0 677} 678 679// bigDataPoolResourceInfoListResultPreparer prepares a request to retrieve the next set of results. 680// It returns nil if no more results exist. 681func (bdprilr BigDataPoolResourceInfoListResult) bigDataPoolResourceInfoListResultPreparer(ctx context.Context) (*http.Request, error) { 682 if !bdprilr.hasNextLink() { 683 return nil, nil 684 } 685 return autorest.Prepare((&http.Request{}).WithContext(ctx), 686 autorest.AsJSON(), 687 autorest.AsGet(), 688 autorest.WithBaseURL(to.String(bdprilr.NextLink))) 689} 690 691// BigDataPoolResourceInfoListResultPage contains a page of BigDataPoolResourceInfo values. 692type BigDataPoolResourceInfoListResultPage struct { 693 fn func(context.Context, BigDataPoolResourceInfoListResult) (BigDataPoolResourceInfoListResult, error) 694 bdprilr BigDataPoolResourceInfoListResult 695} 696 697// NextWithContext advances to the next page of values. If there was an error making 698// the request the page does not advance and the error is returned. 699func (page *BigDataPoolResourceInfoListResultPage) NextWithContext(ctx context.Context) (err error) { 700 if tracing.IsEnabled() { 701 ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolResourceInfoListResultPage.NextWithContext") 702 defer func() { 703 sc := -1 704 if page.Response().Response.Response != nil { 705 sc = page.Response().Response.Response.StatusCode 706 } 707 tracing.EndSpan(ctx, sc, err) 708 }() 709 } 710 for { 711 next, err := page.fn(ctx, page.bdprilr) 712 if err != nil { 713 return err 714 } 715 page.bdprilr = next 716 if !next.hasNextLink() || !next.IsEmpty() { 717 break 718 } 719 } 720 return nil 721} 722 723// Next advances to the next page of values. If there was an error making 724// the request the page does not advance and the error is returned. 725// Deprecated: Use NextWithContext() instead. 726func (page *BigDataPoolResourceInfoListResultPage) Next() error { 727 return page.NextWithContext(context.Background()) 728} 729 730// NotDone returns true if the page enumeration should be started or is not yet complete. 731func (page BigDataPoolResourceInfoListResultPage) NotDone() bool { 732 return !page.bdprilr.IsEmpty() 733} 734 735// Response returns the raw server response from the last page request. 736func (page BigDataPoolResourceInfoListResultPage) Response() BigDataPoolResourceInfoListResult { 737 return page.bdprilr 738} 739 740// Values returns the slice of values for the current page or nil if there are no values. 741func (page BigDataPoolResourceInfoListResultPage) Values() []BigDataPoolResourceInfo { 742 if page.bdprilr.IsEmpty() { 743 return nil 744 } 745 return *page.bdprilr.Value 746} 747 748// Creates a new instance of the BigDataPoolResourceInfoListResultPage type. 749func NewBigDataPoolResourceInfoListResultPage(cur BigDataPoolResourceInfoListResult, getNextPage func(context.Context, BigDataPoolResourceInfoListResult) (BigDataPoolResourceInfoListResult, error)) BigDataPoolResourceInfoListResultPage { 750 return BigDataPoolResourceInfoListResultPage{ 751 fn: getNextPage, 752 bdprilr: cur, 753 } 754} 755 756// BigDataPoolResourceProperties properties of a Big Data pool powered by Apache Spark 757type BigDataPoolResourceProperties struct { 758 // ProvisioningState - The state of the Big Data pool. 759 ProvisioningState *string `json:"provisioningState,omitempty"` 760 // AutoScale - Auto-scaling properties 761 AutoScale *AutoScaleProperties `json:"autoScale,omitempty"` 762 // CreationDate - The time when the Big Data pool was created. 763 CreationDate *date.Time `json:"creationDate,omitempty"` 764 // AutoPause - Auto-pausing properties 765 AutoPause *AutoPauseProperties `json:"autoPause,omitempty"` 766 // IsComputeIsolationEnabled - Whether compute isolation is required or not. 767 IsComputeIsolationEnabled *bool `json:"isComputeIsolationEnabled,omitempty"` 768 // SessionLevelPackagesEnabled - Whether session level packages enabled. 769 SessionLevelPackagesEnabled *bool `json:"sessionLevelPackagesEnabled,omitempty"` 770 // CacheSize - The cache size 771 CacheSize *int32 `json:"cacheSize,omitempty"` 772 // DynamicExecutorAllocation - Dynamic Executor Allocation 773 DynamicExecutorAllocation *DynamicExecutorAllocation `json:"dynamicExecutorAllocation,omitempty"` 774 // SparkEventsFolder - The Spark events folder 775 SparkEventsFolder *string `json:"sparkEventsFolder,omitempty"` 776 // NodeCount - The number of nodes in the Big Data pool. 777 NodeCount *int32 `json:"nodeCount,omitempty"` 778 // LibraryRequirements - Library version requirements 779 LibraryRequirements *LibraryRequirements `json:"libraryRequirements,omitempty"` 780 // CustomLibraries - List of custom libraries/packages associated with the spark pool. 781 CustomLibraries *[]LibraryInfo `json:"customLibraries,omitempty"` 782 // SparkConfigProperties - Spark configuration file to specify additional properties 783 SparkConfigProperties *SparkConfigProperties `json:"sparkConfigProperties,omitempty"` 784 // SparkVersion - The Apache Spark version. 785 SparkVersion *string `json:"sparkVersion,omitempty"` 786 // DefaultSparkLogFolder - The default folder where Spark logs will be written. 787 DefaultSparkLogFolder *string `json:"defaultSparkLogFolder,omitempty"` 788 // NodeSize - The level of compute power that each node in the Big Data pool has. Possible values include: 'NodeSizeNone', 'NodeSizeSmall', 'NodeSizeMedium', 'NodeSizeLarge', 'NodeSizeXLarge', 'NodeSizeXXLarge', 'NodeSizeXXXLarge' 789 NodeSize NodeSize `json:"nodeSize,omitempty"` 790 // NodeSizeFamily - The kind of nodes that the Big Data pool provides. Possible values include: 'NodeSizeFamilyNone', 'NodeSizeFamilyMemoryOptimized', 'NodeSizeFamilyHardwareAcceleratedFPGA', 'NodeSizeFamilyHardwareAcceleratedGPU' 791 NodeSizeFamily NodeSizeFamily `json:"nodeSizeFamily,omitempty"` 792 // LastSucceededTimestamp - READ-ONLY; The time when the Big Data pool was updated successfully. 793 LastSucceededTimestamp *date.Time `json:"lastSucceededTimestamp,omitempty"` 794} 795 796// MarshalJSON is the custom marshaler for BigDataPoolResourceProperties. 797func (bdprp BigDataPoolResourceProperties) MarshalJSON() ([]byte, error) { 798 objectMap := make(map[string]interface{}) 799 if bdprp.ProvisioningState != nil { 800 objectMap["provisioningState"] = bdprp.ProvisioningState 801 } 802 if bdprp.AutoScale != nil { 803 objectMap["autoScale"] = bdprp.AutoScale 804 } 805 if bdprp.CreationDate != nil { 806 objectMap["creationDate"] = bdprp.CreationDate 807 } 808 if bdprp.AutoPause != nil { 809 objectMap["autoPause"] = bdprp.AutoPause 810 } 811 if bdprp.IsComputeIsolationEnabled != nil { 812 objectMap["isComputeIsolationEnabled"] = bdprp.IsComputeIsolationEnabled 813 } 814 if bdprp.SessionLevelPackagesEnabled != nil { 815 objectMap["sessionLevelPackagesEnabled"] = bdprp.SessionLevelPackagesEnabled 816 } 817 if bdprp.CacheSize != nil { 818 objectMap["cacheSize"] = bdprp.CacheSize 819 } 820 if bdprp.DynamicExecutorAllocation != nil { 821 objectMap["dynamicExecutorAllocation"] = bdprp.DynamicExecutorAllocation 822 } 823 if bdprp.SparkEventsFolder != nil { 824 objectMap["sparkEventsFolder"] = bdprp.SparkEventsFolder 825 } 826 if bdprp.NodeCount != nil { 827 objectMap["nodeCount"] = bdprp.NodeCount 828 } 829 if bdprp.LibraryRequirements != nil { 830 objectMap["libraryRequirements"] = bdprp.LibraryRequirements 831 } 832 if bdprp.CustomLibraries != nil { 833 objectMap["customLibraries"] = bdprp.CustomLibraries 834 } 835 if bdprp.SparkConfigProperties != nil { 836 objectMap["sparkConfigProperties"] = bdprp.SparkConfigProperties 837 } 838 if bdprp.SparkVersion != nil { 839 objectMap["sparkVersion"] = bdprp.SparkVersion 840 } 841 if bdprp.DefaultSparkLogFolder != nil { 842 objectMap["defaultSparkLogFolder"] = bdprp.DefaultSparkLogFolder 843 } 844 if bdprp.NodeSize != "" { 845 objectMap["nodeSize"] = bdprp.NodeSize 846 } 847 if bdprp.NodeSizeFamily != "" { 848 objectMap["nodeSizeFamily"] = bdprp.NodeSizeFamily 849 } 850 return json.Marshal(objectMap) 851} 852 853// BigDataPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 854// long-running operation. 855type BigDataPoolsCreateOrUpdateFuture struct { 856 azure.FutureAPI 857 // Result returns the result of the asynchronous operation. 858 // If the operation has not completed it will return an error. 859 Result func(BigDataPoolsClient) (BigDataPoolResourceInfo, error) 860} 861 862// UnmarshalJSON is the custom unmarshaller for CreateFuture. 863func (future *BigDataPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 864 var azFuture azure.Future 865 if err := json.Unmarshal(body, &azFuture); err != nil { 866 return err 867 } 868 future.FutureAPI = &azFuture 869 future.Result = future.result 870 return nil 871} 872 873// result is the default implementation for BigDataPoolsCreateOrUpdateFuture.Result. 874func (future *BigDataPoolsCreateOrUpdateFuture) result(client BigDataPoolsClient) (bdpri BigDataPoolResourceInfo, err error) { 875 var done bool 876 done, err = future.DoneWithContext(context.Background(), client) 877 if err != nil { 878 err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 879 return 880 } 881 if !done { 882 bdpri.Response.Response = future.Response() 883 err = azure.NewAsyncOpIncompleteError("synapse.BigDataPoolsCreateOrUpdateFuture") 884 return 885 } 886 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 887 if bdpri.Response.Response, err = future.GetResult(sender); err == nil && bdpri.Response.Response.StatusCode != http.StatusNoContent { 888 bdpri, err = client.CreateOrUpdateResponder(bdpri.Response.Response) 889 if err != nil { 890 err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsCreateOrUpdateFuture", "Result", bdpri.Response.Response, "Failure responding to request") 891 } 892 } 893 return 894} 895 896// BigDataPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 897// operation. 898type BigDataPoolsDeleteFuture struct { 899 azure.FutureAPI 900 // Result returns the result of the asynchronous operation. 901 // If the operation has not completed it will return an error. 902 Result func(BigDataPoolsClient) (SetObject, error) 903} 904 905// UnmarshalJSON is the custom unmarshaller for CreateFuture. 906func (future *BigDataPoolsDeleteFuture) UnmarshalJSON(body []byte) error { 907 var azFuture azure.Future 908 if err := json.Unmarshal(body, &azFuture); err != nil { 909 return err 910 } 911 future.FutureAPI = &azFuture 912 future.Result = future.result 913 return nil 914} 915 916// result is the default implementation for BigDataPoolsDeleteFuture.Result. 917func (future *BigDataPoolsDeleteFuture) result(client BigDataPoolsClient) (so SetObject, err error) { 918 var done bool 919 done, err = future.DoneWithContext(context.Background(), client) 920 if err != nil { 921 err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsDeleteFuture", "Result", future.Response(), "Polling failure") 922 return 923 } 924 if !done { 925 so.Response.Response = future.Response() 926 err = azure.NewAsyncOpIncompleteError("synapse.BigDataPoolsDeleteFuture") 927 return 928 } 929 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 930 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 931 so, err = client.DeleteResponder(so.Response.Response) 932 if err != nil { 933 err = autorest.NewErrorWithError(err, "synapse.BigDataPoolsDeleteFuture", "Result", so.Response.Response, "Failure responding to request") 934 } 935 } 936 return 937} 938 939// CheckNameAvailabilityRequest a request about whether a workspace name is available 940type CheckNameAvailabilityRequest struct { 941 // Name - Workspace name 942 Name *string `json:"name,omitempty"` 943 // Type - Type: workspace 944 Type *string `json:"type,omitempty"` 945} 946 947// CheckNameAvailabilityResponse a response saying whether the workspace name is available 948type CheckNameAvailabilityResponse struct { 949 autorest.Response `json:"-"` 950 // Message - Validation message 951 Message *string `json:"message,omitempty"` 952 // Available - Whether the workspace name is available 953 Available *bool `json:"available,omitempty"` 954 // Reason - Reason the workspace name is or is not available 955 Reason *string `json:"reason,omitempty"` 956 // Name - Workspace name 957 Name *string `json:"name,omitempty"` 958} 959 960// CmdkeySetup the custom setup of running cmdkey commands. 961type CmdkeySetup struct { 962 // CmdkeySetupTypeProperties - Cmdkey command custom setup type properties. 963 *CmdkeySetupTypeProperties `json:"typeProperties,omitempty"` 964 // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' 965 Type TypeBasicCustomSetupBase `json:"type,omitempty"` 966} 967 968// MarshalJSON is the custom marshaler for CmdkeySetup. 969func (cs CmdkeySetup) MarshalJSON() ([]byte, error) { 970 cs.Type = TypeBasicCustomSetupBaseTypeCmdkeySetup 971 objectMap := make(map[string]interface{}) 972 if cs.CmdkeySetupTypeProperties != nil { 973 objectMap["typeProperties"] = cs.CmdkeySetupTypeProperties 974 } 975 if cs.Type != "" { 976 objectMap["type"] = cs.Type 977 } 978 return json.Marshal(objectMap) 979} 980 981// AsCmdkeySetup is the BasicCustomSetupBase implementation for CmdkeySetup. 982func (cs CmdkeySetup) AsCmdkeySetup() (*CmdkeySetup, bool) { 983 return &cs, true 984} 985 986// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for CmdkeySetup. 987func (cs CmdkeySetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { 988 return nil, false 989} 990 991// AsComponentSetup is the BasicCustomSetupBase implementation for CmdkeySetup. 992func (cs CmdkeySetup) AsComponentSetup() (*ComponentSetup, bool) { 993 return nil, false 994} 995 996// AsCustomSetupBase is the BasicCustomSetupBase implementation for CmdkeySetup. 997func (cs CmdkeySetup) AsCustomSetupBase() (*CustomSetupBase, bool) { 998 return nil, false 999} 1000 1001// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for CmdkeySetup. 1002func (cs CmdkeySetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { 1003 return &cs, true 1004} 1005 1006// UnmarshalJSON is the custom unmarshaler for CmdkeySetup struct. 1007func (cs *CmdkeySetup) UnmarshalJSON(body []byte) error { 1008 var m map[string]*json.RawMessage 1009 err := json.Unmarshal(body, &m) 1010 if err != nil { 1011 return err 1012 } 1013 for k, v := range m { 1014 switch k { 1015 case "typeProperties": 1016 if v != nil { 1017 var cmdkeySetupTypeProperties CmdkeySetupTypeProperties 1018 err = json.Unmarshal(*v, &cmdkeySetupTypeProperties) 1019 if err != nil { 1020 return err 1021 } 1022 cs.CmdkeySetupTypeProperties = &cmdkeySetupTypeProperties 1023 } 1024 case "type": 1025 if v != nil { 1026 var typeVar TypeBasicCustomSetupBase 1027 err = json.Unmarshal(*v, &typeVar) 1028 if err != nil { 1029 return err 1030 } 1031 cs.Type = typeVar 1032 } 1033 } 1034 } 1035 1036 return nil 1037} 1038 1039// CmdkeySetupTypeProperties cmdkey command custom setup type properties. 1040type CmdkeySetupTypeProperties struct { 1041 // TargetName - The server name of data source access. 1042 TargetName interface{} `json:"targetName,omitempty"` 1043 // UserName - The user name of data source access. 1044 UserName interface{} `json:"userName,omitempty"` 1045 // Password - The password of data source access. 1046 Password BasicSecretBase `json:"password,omitempty"` 1047} 1048 1049// UnmarshalJSON is the custom unmarshaler for CmdkeySetupTypeProperties struct. 1050func (cstp *CmdkeySetupTypeProperties) UnmarshalJSON(body []byte) error { 1051 var m map[string]*json.RawMessage 1052 err := json.Unmarshal(body, &m) 1053 if err != nil { 1054 return err 1055 } 1056 for k, v := range m { 1057 switch k { 1058 case "targetName": 1059 if v != nil { 1060 var targetName interface{} 1061 err = json.Unmarshal(*v, &targetName) 1062 if err != nil { 1063 return err 1064 } 1065 cstp.TargetName = targetName 1066 } 1067 case "userName": 1068 if v != nil { 1069 var userName interface{} 1070 err = json.Unmarshal(*v, &userName) 1071 if err != nil { 1072 return err 1073 } 1074 cstp.UserName = userName 1075 } 1076 case "password": 1077 if v != nil { 1078 password, err := unmarshalBasicSecretBase(*v) 1079 if err != nil { 1080 return err 1081 } 1082 cstp.Password = password 1083 } 1084 } 1085 } 1086 1087 return nil 1088} 1089 1090// ComponentSetup the custom setup of installing 3rd party components. 1091type ComponentSetup struct { 1092 // LicensedComponentSetupTypeProperties - Install 3rd party component type properties. 1093 *LicensedComponentSetupTypeProperties `json:"typeProperties,omitempty"` 1094 // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' 1095 Type TypeBasicCustomSetupBase `json:"type,omitempty"` 1096} 1097 1098// MarshalJSON is the custom marshaler for ComponentSetup. 1099func (cs ComponentSetup) MarshalJSON() ([]byte, error) { 1100 cs.Type = TypeBasicCustomSetupBaseTypeComponentSetup 1101 objectMap := make(map[string]interface{}) 1102 if cs.LicensedComponentSetupTypeProperties != nil { 1103 objectMap["typeProperties"] = cs.LicensedComponentSetupTypeProperties 1104 } 1105 if cs.Type != "" { 1106 objectMap["type"] = cs.Type 1107 } 1108 return json.Marshal(objectMap) 1109} 1110 1111// AsCmdkeySetup is the BasicCustomSetupBase implementation for ComponentSetup. 1112func (cs ComponentSetup) AsCmdkeySetup() (*CmdkeySetup, bool) { 1113 return nil, false 1114} 1115 1116// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for ComponentSetup. 1117func (cs ComponentSetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { 1118 return nil, false 1119} 1120 1121// AsComponentSetup is the BasicCustomSetupBase implementation for ComponentSetup. 1122func (cs ComponentSetup) AsComponentSetup() (*ComponentSetup, bool) { 1123 return &cs, true 1124} 1125 1126// AsCustomSetupBase is the BasicCustomSetupBase implementation for ComponentSetup. 1127func (cs ComponentSetup) AsCustomSetupBase() (*CustomSetupBase, bool) { 1128 return nil, false 1129} 1130 1131// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for ComponentSetup. 1132func (cs ComponentSetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { 1133 return &cs, true 1134} 1135 1136// UnmarshalJSON is the custom unmarshaler for ComponentSetup struct. 1137func (cs *ComponentSetup) UnmarshalJSON(body []byte) error { 1138 var m map[string]*json.RawMessage 1139 err := json.Unmarshal(body, &m) 1140 if err != nil { 1141 return err 1142 } 1143 for k, v := range m { 1144 switch k { 1145 case "typeProperties": 1146 if v != nil { 1147 var licensedComponentSetupTypeProperties LicensedComponentSetupTypeProperties 1148 err = json.Unmarshal(*v, &licensedComponentSetupTypeProperties) 1149 if err != nil { 1150 return err 1151 } 1152 cs.LicensedComponentSetupTypeProperties = &licensedComponentSetupTypeProperties 1153 } 1154 case "type": 1155 if v != nil { 1156 var typeVar TypeBasicCustomSetupBase 1157 err = json.Unmarshal(*v, &typeVar) 1158 if err != nil { 1159 return err 1160 } 1161 cs.Type = typeVar 1162 } 1163 } 1164 } 1165 1166 return nil 1167} 1168 1169// CreateSQLPoolRestorePointDefinition contains the information necessary to perform a create Sql pool 1170// restore point operation. 1171type CreateSQLPoolRestorePointDefinition struct { 1172 // RestorePointLabel - The restore point label to apply 1173 RestorePointLabel *string `json:"restorePointLabel,omitempty"` 1174} 1175 1176// CspWorkspaceAdminProperties initial workspace AAD admin properties for a CSP subscription 1177type CspWorkspaceAdminProperties struct { 1178 // InitialWorkspaceAdminObjectID - AAD object ID of initial workspace admin 1179 InitialWorkspaceAdminObjectID *string `json:"initialWorkspaceAdminObjectId,omitempty"` 1180} 1181 1182// CustomerManagedKeyDetails details of the customer managed key associated with the workspace 1183type CustomerManagedKeyDetails struct { 1184 // Status - READ-ONLY; The customer managed key status on the workspace 1185 Status *string `json:"status,omitempty"` 1186 // Key - The key object of the workspace 1187 Key *WorkspaceKeyDetails `json:"key,omitempty"` 1188 // KekIdentity - Key encryption key 1189 KekIdentity *KekIdentityProperties `json:"kekIdentity,omitempty"` 1190} 1191 1192// MarshalJSON is the custom marshaler for CustomerManagedKeyDetails. 1193func (cmkd CustomerManagedKeyDetails) MarshalJSON() ([]byte, error) { 1194 objectMap := make(map[string]interface{}) 1195 if cmkd.Key != nil { 1196 objectMap["key"] = cmkd.Key 1197 } 1198 if cmkd.KekIdentity != nil { 1199 objectMap["kekIdentity"] = cmkd.KekIdentity 1200 } 1201 return json.Marshal(objectMap) 1202} 1203 1204// BasicCustomSetupBase the base definition of the custom setup. 1205type BasicCustomSetupBase interface { 1206 AsCmdkeySetup() (*CmdkeySetup, bool) 1207 AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) 1208 AsComponentSetup() (*ComponentSetup, bool) 1209 AsCustomSetupBase() (*CustomSetupBase, bool) 1210} 1211 1212// CustomSetupBase the base definition of the custom setup. 1213type CustomSetupBase struct { 1214 // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' 1215 Type TypeBasicCustomSetupBase `json:"type,omitempty"` 1216} 1217 1218func unmarshalBasicCustomSetupBase(body []byte) (BasicCustomSetupBase, error) { 1219 var m map[string]interface{} 1220 err := json.Unmarshal(body, &m) 1221 if err != nil { 1222 return nil, err 1223 } 1224 1225 switch m["type"] { 1226 case string(TypeBasicCustomSetupBaseTypeCmdkeySetup): 1227 var cs CmdkeySetup 1228 err := json.Unmarshal(body, &cs) 1229 return cs, err 1230 case string(TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup): 1231 var evs EnvironmentVariableSetup 1232 err := json.Unmarshal(body, &evs) 1233 return evs, err 1234 case string(TypeBasicCustomSetupBaseTypeComponentSetup): 1235 var cs ComponentSetup 1236 err := json.Unmarshal(body, &cs) 1237 return cs, err 1238 default: 1239 var csb CustomSetupBase 1240 err := json.Unmarshal(body, &csb) 1241 return csb, err 1242 } 1243} 1244func unmarshalBasicCustomSetupBaseArray(body []byte) ([]BasicCustomSetupBase, error) { 1245 var rawMessages []*json.RawMessage 1246 err := json.Unmarshal(body, &rawMessages) 1247 if err != nil { 1248 return nil, err 1249 } 1250 1251 csbArray := make([]BasicCustomSetupBase, len(rawMessages)) 1252 1253 for index, rawMessage := range rawMessages { 1254 csb, err := unmarshalBasicCustomSetupBase(*rawMessage) 1255 if err != nil { 1256 return nil, err 1257 } 1258 csbArray[index] = csb 1259 } 1260 return csbArray, nil 1261} 1262 1263// MarshalJSON is the custom marshaler for CustomSetupBase. 1264func (csb CustomSetupBase) MarshalJSON() ([]byte, error) { 1265 csb.Type = TypeBasicCustomSetupBaseTypeCustomSetupBase 1266 objectMap := make(map[string]interface{}) 1267 if csb.Type != "" { 1268 objectMap["type"] = csb.Type 1269 } 1270 return json.Marshal(objectMap) 1271} 1272 1273// AsCmdkeySetup is the BasicCustomSetupBase implementation for CustomSetupBase. 1274func (csb CustomSetupBase) AsCmdkeySetup() (*CmdkeySetup, bool) { 1275 return nil, false 1276} 1277 1278// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for CustomSetupBase. 1279func (csb CustomSetupBase) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { 1280 return nil, false 1281} 1282 1283// AsComponentSetup is the BasicCustomSetupBase implementation for CustomSetupBase. 1284func (csb CustomSetupBase) AsComponentSetup() (*ComponentSetup, bool) { 1285 return nil, false 1286} 1287 1288// AsCustomSetupBase is the BasicCustomSetupBase implementation for CustomSetupBase. 1289func (csb CustomSetupBase) AsCustomSetupBase() (*CustomSetupBase, bool) { 1290 return &csb, true 1291} 1292 1293// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for CustomSetupBase. 1294func (csb CustomSetupBase) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { 1295 return &csb, true 1296} 1297 1298// DataLakeStorageAccountDetails details of the data lake storage account associated with the workspace 1299type DataLakeStorageAccountDetails struct { 1300 // AccountURL - Account URL 1301 AccountURL *string `json:"accountUrl,omitempty"` 1302 // Filesystem - Filesystem name 1303 Filesystem *string `json:"filesystem,omitempty"` 1304 // ResourceID - ARM resource Id of this storage account 1305 ResourceID *string `json:"resourceId,omitempty"` 1306 // CreateManagedPrivateEndpoint - Create managed private endpoint to this storage account or not 1307 CreateManagedPrivateEndpoint *bool `json:"createManagedPrivateEndpoint,omitempty"` 1308} 1309 1310// DataMaskingPolicy ... 1311type DataMaskingPolicy struct { 1312 autorest.Response `json:"-"` 1313 // DataMaskingPolicyProperties - The properties of the data masking policy. 1314 *DataMaskingPolicyProperties `json:"properties,omitempty"` 1315 // Location - READ-ONLY; The location of the data masking policy. 1316 Location *string `json:"location,omitempty"` 1317 // Kind - READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal. 1318 Kind *string `json:"kind,omitempty"` 1319 // ManagedBy - READ-ONLY; Fully qualified resource ID of the sql pool 1320 ManagedBy *string `json:"managedBy,omitempty"` 1321 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1322 ID *string `json:"id,omitempty"` 1323 // Name - READ-ONLY; The name of the resource 1324 Name *string `json:"name,omitempty"` 1325 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1326 Type *string `json:"type,omitempty"` 1327} 1328 1329// MarshalJSON is the custom marshaler for DataMaskingPolicy. 1330func (dmp DataMaskingPolicy) MarshalJSON() ([]byte, error) { 1331 objectMap := make(map[string]interface{}) 1332 if dmp.DataMaskingPolicyProperties != nil { 1333 objectMap["properties"] = dmp.DataMaskingPolicyProperties 1334 } 1335 return json.Marshal(objectMap) 1336} 1337 1338// UnmarshalJSON is the custom unmarshaler for DataMaskingPolicy struct. 1339func (dmp *DataMaskingPolicy) UnmarshalJSON(body []byte) error { 1340 var m map[string]*json.RawMessage 1341 err := json.Unmarshal(body, &m) 1342 if err != nil { 1343 return err 1344 } 1345 for k, v := range m { 1346 switch k { 1347 case "properties": 1348 if v != nil { 1349 var dataMaskingPolicyProperties DataMaskingPolicyProperties 1350 err = json.Unmarshal(*v, &dataMaskingPolicyProperties) 1351 if err != nil { 1352 return err 1353 } 1354 dmp.DataMaskingPolicyProperties = &dataMaskingPolicyProperties 1355 } 1356 case "location": 1357 if v != nil { 1358 var location string 1359 err = json.Unmarshal(*v, &location) 1360 if err != nil { 1361 return err 1362 } 1363 dmp.Location = &location 1364 } 1365 case "kind": 1366 if v != nil { 1367 var kind string 1368 err = json.Unmarshal(*v, &kind) 1369 if err != nil { 1370 return err 1371 } 1372 dmp.Kind = &kind 1373 } 1374 case "managedBy": 1375 if v != nil { 1376 var managedBy string 1377 err = json.Unmarshal(*v, &managedBy) 1378 if err != nil { 1379 return err 1380 } 1381 dmp.ManagedBy = &managedBy 1382 } 1383 case "id": 1384 if v != nil { 1385 var ID string 1386 err = json.Unmarshal(*v, &ID) 1387 if err != nil { 1388 return err 1389 } 1390 dmp.ID = &ID 1391 } 1392 case "name": 1393 if v != nil { 1394 var name string 1395 err = json.Unmarshal(*v, &name) 1396 if err != nil { 1397 return err 1398 } 1399 dmp.Name = &name 1400 } 1401 case "type": 1402 if v != nil { 1403 var typeVar string 1404 err = json.Unmarshal(*v, &typeVar) 1405 if err != nil { 1406 return err 1407 } 1408 dmp.Type = &typeVar 1409 } 1410 } 1411 } 1412 1413 return nil 1414} 1415 1416// DataMaskingPolicyProperties the properties of a database data masking policy. 1417type DataMaskingPolicyProperties struct { 1418 // DataMaskingState - The state of the data masking policy. Possible values include: 'DataMaskingStateDisabled', 'DataMaskingStateEnabled' 1419 DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"` 1420 // ExemptPrincipals - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries. 1421 ExemptPrincipals *string `json:"exemptPrincipals,omitempty"` 1422 // ApplicationPrincipals - READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used. 1423 ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"` 1424 // MaskingLevel - READ-ONLY; The masking level. This is a legacy parameter and is no longer used. 1425 MaskingLevel *string `json:"maskingLevel,omitempty"` 1426} 1427 1428// MarshalJSON is the custom marshaler for DataMaskingPolicyProperties. 1429func (dmpp DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) { 1430 objectMap := make(map[string]interface{}) 1431 if dmpp.DataMaskingState != "" { 1432 objectMap["dataMaskingState"] = dmpp.DataMaskingState 1433 } 1434 if dmpp.ExemptPrincipals != nil { 1435 objectMap["exemptPrincipals"] = dmpp.ExemptPrincipals 1436 } 1437 return json.Marshal(objectMap) 1438} 1439 1440// DataMaskingRule represents a Sql pool data masking rule. 1441type DataMaskingRule struct { 1442 autorest.Response `json:"-"` 1443 // DataMaskingRuleProperties - The properties of the resource. 1444 *DataMaskingRuleProperties `json:"properties,omitempty"` 1445 // Location - READ-ONLY; The location of the data masking rule. 1446 Location *string `json:"location,omitempty"` 1447 // Kind - READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal. 1448 Kind *string `json:"kind,omitempty"` 1449 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1450 ID *string `json:"id,omitempty"` 1451 // Name - READ-ONLY; The name of the resource 1452 Name *string `json:"name,omitempty"` 1453 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1454 Type *string `json:"type,omitempty"` 1455} 1456 1457// MarshalJSON is the custom marshaler for DataMaskingRule. 1458func (dmr DataMaskingRule) MarshalJSON() ([]byte, error) { 1459 objectMap := make(map[string]interface{}) 1460 if dmr.DataMaskingRuleProperties != nil { 1461 objectMap["properties"] = dmr.DataMaskingRuleProperties 1462 } 1463 return json.Marshal(objectMap) 1464} 1465 1466// UnmarshalJSON is the custom unmarshaler for DataMaskingRule struct. 1467func (dmr *DataMaskingRule) UnmarshalJSON(body []byte) error { 1468 var m map[string]*json.RawMessage 1469 err := json.Unmarshal(body, &m) 1470 if err != nil { 1471 return err 1472 } 1473 for k, v := range m { 1474 switch k { 1475 case "properties": 1476 if v != nil { 1477 var dataMaskingRuleProperties DataMaskingRuleProperties 1478 err = json.Unmarshal(*v, &dataMaskingRuleProperties) 1479 if err != nil { 1480 return err 1481 } 1482 dmr.DataMaskingRuleProperties = &dataMaskingRuleProperties 1483 } 1484 case "location": 1485 if v != nil { 1486 var location string 1487 err = json.Unmarshal(*v, &location) 1488 if err != nil { 1489 return err 1490 } 1491 dmr.Location = &location 1492 } 1493 case "kind": 1494 if v != nil { 1495 var kind string 1496 err = json.Unmarshal(*v, &kind) 1497 if err != nil { 1498 return err 1499 } 1500 dmr.Kind = &kind 1501 } 1502 case "id": 1503 if v != nil { 1504 var ID string 1505 err = json.Unmarshal(*v, &ID) 1506 if err != nil { 1507 return err 1508 } 1509 dmr.ID = &ID 1510 } 1511 case "name": 1512 if v != nil { 1513 var name string 1514 err = json.Unmarshal(*v, &name) 1515 if err != nil { 1516 return err 1517 } 1518 dmr.Name = &name 1519 } 1520 case "type": 1521 if v != nil { 1522 var typeVar string 1523 err = json.Unmarshal(*v, &typeVar) 1524 if err != nil { 1525 return err 1526 } 1527 dmr.Type = &typeVar 1528 } 1529 } 1530 } 1531 1532 return nil 1533} 1534 1535// DataMaskingRuleListResult the response to a list data masking rules request. 1536type DataMaskingRuleListResult struct { 1537 autorest.Response `json:"-"` 1538 // Value - The list of Sql pool data masking rules. 1539 Value *[]DataMaskingRule `json:"value,omitempty"` 1540} 1541 1542// DataMaskingRuleProperties the properties of a Sql pool data masking rule. 1543type DataMaskingRuleProperties struct { 1544 // ID - READ-ONLY; The rule Id. 1545 ID *string `json:"id,omitempty"` 1546 // AliasName - The alias name. This is a legacy parameter and is no longer used. 1547 AliasName *string `json:"aliasName,omitempty"` 1548 // RuleState - The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'DataMaskingRuleStateDisabled', 'DataMaskingRuleStateEnabled' 1549 RuleState DataMaskingRuleState `json:"ruleState,omitempty"` 1550 // SchemaName - The schema name on which the data masking rule is applied. 1551 SchemaName *string `json:"schemaName,omitempty"` 1552 // TableName - The table name on which the data masking rule is applied. 1553 TableName *string `json:"tableName,omitempty"` 1554 // ColumnName - The column name on which the data masking rule is applied. 1555 ColumnName *string `json:"columnName,omitempty"` 1556 // MaskingFunction - The masking function that is used for the data masking rule. Possible values include: 'DataMaskingFunctionDefault', 'DataMaskingFunctionCCN', 'DataMaskingFunctionEmail', 'DataMaskingFunctionNumber', 'DataMaskingFunctionSSN', 'DataMaskingFunctionText' 1557 MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"` 1558 // NumberFrom - The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. 1559 NumberFrom *string `json:"numberFrom,omitempty"` 1560 // NumberTo - The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. 1561 NumberTo *string `json:"numberTo,omitempty"` 1562 // PrefixSize - If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. 1563 PrefixSize *string `json:"prefixSize,omitempty"` 1564 // SuffixSize - If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. 1565 SuffixSize *string `json:"suffixSize,omitempty"` 1566 // ReplacementString - If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. 1567 ReplacementString *string `json:"replacementString,omitempty"` 1568} 1569 1570// MarshalJSON is the custom marshaler for DataMaskingRuleProperties. 1571func (dmrp DataMaskingRuleProperties) MarshalJSON() ([]byte, error) { 1572 objectMap := make(map[string]interface{}) 1573 if dmrp.AliasName != nil { 1574 objectMap["aliasName"] = dmrp.AliasName 1575 } 1576 if dmrp.RuleState != "" { 1577 objectMap["ruleState"] = dmrp.RuleState 1578 } 1579 if dmrp.SchemaName != nil { 1580 objectMap["schemaName"] = dmrp.SchemaName 1581 } 1582 if dmrp.TableName != nil { 1583 objectMap["tableName"] = dmrp.TableName 1584 } 1585 if dmrp.ColumnName != nil { 1586 objectMap["columnName"] = dmrp.ColumnName 1587 } 1588 if dmrp.MaskingFunction != "" { 1589 objectMap["maskingFunction"] = dmrp.MaskingFunction 1590 } 1591 if dmrp.NumberFrom != nil { 1592 objectMap["numberFrom"] = dmrp.NumberFrom 1593 } 1594 if dmrp.NumberTo != nil { 1595 objectMap["numberTo"] = dmrp.NumberTo 1596 } 1597 if dmrp.PrefixSize != nil { 1598 objectMap["prefixSize"] = dmrp.PrefixSize 1599 } 1600 if dmrp.SuffixSize != nil { 1601 objectMap["suffixSize"] = dmrp.SuffixSize 1602 } 1603 if dmrp.ReplacementString != nil { 1604 objectMap["replacementString"] = dmrp.ReplacementString 1605 } 1606 return json.Marshal(objectMap) 1607} 1608 1609// DataWarehouseUserActivities user activities of a data warehouse 1610type DataWarehouseUserActivities struct { 1611 autorest.Response `json:"-"` 1612 // DataWarehouseUserActivitiesProperties - Resource properties. 1613 *DataWarehouseUserActivitiesProperties `json:"properties,omitempty"` 1614 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1615 ID *string `json:"id,omitempty"` 1616 // Name - READ-ONLY; The name of the resource 1617 Name *string `json:"name,omitempty"` 1618 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1619 Type *string `json:"type,omitempty"` 1620} 1621 1622// MarshalJSON is the custom marshaler for DataWarehouseUserActivities. 1623func (dwua DataWarehouseUserActivities) MarshalJSON() ([]byte, error) { 1624 objectMap := make(map[string]interface{}) 1625 if dwua.DataWarehouseUserActivitiesProperties != nil { 1626 objectMap["properties"] = dwua.DataWarehouseUserActivitiesProperties 1627 } 1628 return json.Marshal(objectMap) 1629} 1630 1631// UnmarshalJSON is the custom unmarshaler for DataWarehouseUserActivities struct. 1632func (dwua *DataWarehouseUserActivities) UnmarshalJSON(body []byte) error { 1633 var m map[string]*json.RawMessage 1634 err := json.Unmarshal(body, &m) 1635 if err != nil { 1636 return err 1637 } 1638 for k, v := range m { 1639 switch k { 1640 case "properties": 1641 if v != nil { 1642 var dataWarehouseUserActivitiesProperties DataWarehouseUserActivitiesProperties 1643 err = json.Unmarshal(*v, &dataWarehouseUserActivitiesProperties) 1644 if err != nil { 1645 return err 1646 } 1647 dwua.DataWarehouseUserActivitiesProperties = &dataWarehouseUserActivitiesProperties 1648 } 1649 case "id": 1650 if v != nil { 1651 var ID string 1652 err = json.Unmarshal(*v, &ID) 1653 if err != nil { 1654 return err 1655 } 1656 dwua.ID = &ID 1657 } 1658 case "name": 1659 if v != nil { 1660 var name string 1661 err = json.Unmarshal(*v, &name) 1662 if err != nil { 1663 return err 1664 } 1665 dwua.Name = &name 1666 } 1667 case "type": 1668 if v != nil { 1669 var typeVar string 1670 err = json.Unmarshal(*v, &typeVar) 1671 if err != nil { 1672 return err 1673 } 1674 dwua.Type = &typeVar 1675 } 1676 } 1677 } 1678 1679 return nil 1680} 1681 1682// DataWarehouseUserActivitiesProperties user activities of a data warehouse. This currently includes the 1683// count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests 1684// dynamic management view (DMV). 1685type DataWarehouseUserActivitiesProperties struct { 1686 // ActiveQueriesCount - READ-ONLY; Count of running and suspended queries. 1687 ActiveQueriesCount *int32 `json:"activeQueriesCount,omitempty"` 1688} 1689 1690// MarshalJSON is the custom marshaler for DataWarehouseUserActivitiesProperties. 1691func (dwuap DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error) { 1692 objectMap := make(map[string]interface{}) 1693 return json.Marshal(objectMap) 1694} 1695 1696// DynamicExecutorAllocation dynamic Executor Allocation Properties 1697type DynamicExecutorAllocation struct { 1698 // Enabled - Indicates whether Dynamic Executor Allocation is enabled or not. 1699 Enabled *bool `json:"enabled,omitempty"` 1700} 1701 1702// EncryptionDetails details of the encryption associated with the workspace 1703type EncryptionDetails struct { 1704 // DoubleEncryptionEnabled - READ-ONLY; Double Encryption enabled 1705 DoubleEncryptionEnabled *bool `json:"doubleEncryptionEnabled,omitempty"` 1706 // Cmk - Customer Managed Key Details 1707 Cmk *CustomerManagedKeyDetails `json:"cmk,omitempty"` 1708} 1709 1710// MarshalJSON is the custom marshaler for EncryptionDetails. 1711func (ed EncryptionDetails) MarshalJSON() ([]byte, error) { 1712 objectMap := make(map[string]interface{}) 1713 if ed.Cmk != nil { 1714 objectMap["cmk"] = ed.Cmk 1715 } 1716 return json.Marshal(objectMap) 1717} 1718 1719// EncryptionProtector the server encryption protector. 1720type EncryptionProtector struct { 1721 autorest.Response `json:"-"` 1722 // Kind - READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. 1723 Kind *string `json:"kind,omitempty"` 1724 // Location - READ-ONLY; Resource location. 1725 Location *string `json:"location,omitempty"` 1726 // EncryptionProtectorProperties - Resource properties. 1727 *EncryptionProtectorProperties `json:"properties,omitempty"` 1728 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1729 ID *string `json:"id,omitempty"` 1730 // Name - READ-ONLY; The name of the resource 1731 Name *string `json:"name,omitempty"` 1732 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1733 Type *string `json:"type,omitempty"` 1734} 1735 1736// MarshalJSON is the custom marshaler for EncryptionProtector. 1737func (ep EncryptionProtector) MarshalJSON() ([]byte, error) { 1738 objectMap := make(map[string]interface{}) 1739 if ep.EncryptionProtectorProperties != nil { 1740 objectMap["properties"] = ep.EncryptionProtectorProperties 1741 } 1742 return json.Marshal(objectMap) 1743} 1744 1745// UnmarshalJSON is the custom unmarshaler for EncryptionProtector struct. 1746func (ep *EncryptionProtector) UnmarshalJSON(body []byte) error { 1747 var m map[string]*json.RawMessage 1748 err := json.Unmarshal(body, &m) 1749 if err != nil { 1750 return err 1751 } 1752 for k, v := range m { 1753 switch k { 1754 case "kind": 1755 if v != nil { 1756 var kind string 1757 err = json.Unmarshal(*v, &kind) 1758 if err != nil { 1759 return err 1760 } 1761 ep.Kind = &kind 1762 } 1763 case "location": 1764 if v != nil { 1765 var location string 1766 err = json.Unmarshal(*v, &location) 1767 if err != nil { 1768 return err 1769 } 1770 ep.Location = &location 1771 } 1772 case "properties": 1773 if v != nil { 1774 var encryptionProtectorProperties EncryptionProtectorProperties 1775 err = json.Unmarshal(*v, &encryptionProtectorProperties) 1776 if err != nil { 1777 return err 1778 } 1779 ep.EncryptionProtectorProperties = &encryptionProtectorProperties 1780 } 1781 case "id": 1782 if v != nil { 1783 var ID string 1784 err = json.Unmarshal(*v, &ID) 1785 if err != nil { 1786 return err 1787 } 1788 ep.ID = &ID 1789 } 1790 case "name": 1791 if v != nil { 1792 var name string 1793 err = json.Unmarshal(*v, &name) 1794 if err != nil { 1795 return err 1796 } 1797 ep.Name = &name 1798 } 1799 case "type": 1800 if v != nil { 1801 var typeVar string 1802 err = json.Unmarshal(*v, &typeVar) 1803 if err != nil { 1804 return err 1805 } 1806 ep.Type = &typeVar 1807 } 1808 } 1809 } 1810 1811 return nil 1812} 1813 1814// EncryptionProtectorListResult a list of server encryption protectors. 1815type EncryptionProtectorListResult struct { 1816 autorest.Response `json:"-"` 1817 // Value - READ-ONLY; Array of results. 1818 Value *[]EncryptionProtector `json:"value,omitempty"` 1819 // NextLink - READ-ONLY; Link to retrieve next page of results. 1820 NextLink *string `json:"nextLink,omitempty"` 1821} 1822 1823// MarshalJSON is the custom marshaler for EncryptionProtectorListResult. 1824func (eplr EncryptionProtectorListResult) MarshalJSON() ([]byte, error) { 1825 objectMap := make(map[string]interface{}) 1826 return json.Marshal(objectMap) 1827} 1828 1829// EncryptionProtectorListResultIterator provides access to a complete listing of EncryptionProtector 1830// values. 1831type EncryptionProtectorListResultIterator struct { 1832 i int 1833 page EncryptionProtectorListResultPage 1834} 1835 1836// NextWithContext advances to the next value. If there was an error making 1837// the request the iterator does not advance and the error is returned. 1838func (iter *EncryptionProtectorListResultIterator) NextWithContext(ctx context.Context) (err error) { 1839 if tracing.IsEnabled() { 1840 ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultIterator.NextWithContext") 1841 defer func() { 1842 sc := -1 1843 if iter.Response().Response.Response != nil { 1844 sc = iter.Response().Response.Response.StatusCode 1845 } 1846 tracing.EndSpan(ctx, sc, err) 1847 }() 1848 } 1849 iter.i++ 1850 if iter.i < len(iter.page.Values()) { 1851 return nil 1852 } 1853 err = iter.page.NextWithContext(ctx) 1854 if err != nil { 1855 iter.i-- 1856 return err 1857 } 1858 iter.i = 0 1859 return nil 1860} 1861 1862// Next advances to the next value. If there was an error making 1863// the request the iterator does not advance and the error is returned. 1864// Deprecated: Use NextWithContext() instead. 1865func (iter *EncryptionProtectorListResultIterator) Next() error { 1866 return iter.NextWithContext(context.Background()) 1867} 1868 1869// NotDone returns true if the enumeration should be started or is not yet complete. 1870func (iter EncryptionProtectorListResultIterator) NotDone() bool { 1871 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1872} 1873 1874// Response returns the raw server response from the last page request. 1875func (iter EncryptionProtectorListResultIterator) Response() EncryptionProtectorListResult { 1876 return iter.page.Response() 1877} 1878 1879// Value returns the current value or a zero-initialized value if the 1880// iterator has advanced beyond the end of the collection. 1881func (iter EncryptionProtectorListResultIterator) Value() EncryptionProtector { 1882 if !iter.page.NotDone() { 1883 return EncryptionProtector{} 1884 } 1885 return iter.page.Values()[iter.i] 1886} 1887 1888// Creates a new instance of the EncryptionProtectorListResultIterator type. 1889func NewEncryptionProtectorListResultIterator(page EncryptionProtectorListResultPage) EncryptionProtectorListResultIterator { 1890 return EncryptionProtectorListResultIterator{page: page} 1891} 1892 1893// IsEmpty returns true if the ListResult contains no values. 1894func (eplr EncryptionProtectorListResult) IsEmpty() bool { 1895 return eplr.Value == nil || len(*eplr.Value) == 0 1896} 1897 1898// hasNextLink returns true if the NextLink is not empty. 1899func (eplr EncryptionProtectorListResult) hasNextLink() bool { 1900 return eplr.NextLink != nil && len(*eplr.NextLink) != 0 1901} 1902 1903// encryptionProtectorListResultPreparer prepares a request to retrieve the next set of results. 1904// It returns nil if no more results exist. 1905func (eplr EncryptionProtectorListResult) encryptionProtectorListResultPreparer(ctx context.Context) (*http.Request, error) { 1906 if !eplr.hasNextLink() { 1907 return nil, nil 1908 } 1909 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1910 autorest.AsJSON(), 1911 autorest.AsGet(), 1912 autorest.WithBaseURL(to.String(eplr.NextLink))) 1913} 1914 1915// EncryptionProtectorListResultPage contains a page of EncryptionProtector values. 1916type EncryptionProtectorListResultPage struct { 1917 fn func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error) 1918 eplr EncryptionProtectorListResult 1919} 1920 1921// NextWithContext advances to the next page of values. If there was an error making 1922// the request the page does not advance and the error is returned. 1923func (page *EncryptionProtectorListResultPage) NextWithContext(ctx context.Context) (err error) { 1924 if tracing.IsEnabled() { 1925 ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultPage.NextWithContext") 1926 defer func() { 1927 sc := -1 1928 if page.Response().Response.Response != nil { 1929 sc = page.Response().Response.Response.StatusCode 1930 } 1931 tracing.EndSpan(ctx, sc, err) 1932 }() 1933 } 1934 for { 1935 next, err := page.fn(ctx, page.eplr) 1936 if err != nil { 1937 return err 1938 } 1939 page.eplr = next 1940 if !next.hasNextLink() || !next.IsEmpty() { 1941 break 1942 } 1943 } 1944 return nil 1945} 1946 1947// Next advances to the next page of values. If there was an error making 1948// the request the page does not advance and the error is returned. 1949// Deprecated: Use NextWithContext() instead. 1950func (page *EncryptionProtectorListResultPage) Next() error { 1951 return page.NextWithContext(context.Background()) 1952} 1953 1954// NotDone returns true if the page enumeration should be started or is not yet complete. 1955func (page EncryptionProtectorListResultPage) NotDone() bool { 1956 return !page.eplr.IsEmpty() 1957} 1958 1959// Response returns the raw server response from the last page request. 1960func (page EncryptionProtectorListResultPage) Response() EncryptionProtectorListResult { 1961 return page.eplr 1962} 1963 1964// Values returns the slice of values for the current page or nil if there are no values. 1965func (page EncryptionProtectorListResultPage) Values() []EncryptionProtector { 1966 if page.eplr.IsEmpty() { 1967 return nil 1968 } 1969 return *page.eplr.Value 1970} 1971 1972// Creates a new instance of the EncryptionProtectorListResultPage type. 1973func NewEncryptionProtectorListResultPage(cur EncryptionProtectorListResult, getNextPage func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)) EncryptionProtectorListResultPage { 1974 return EncryptionProtectorListResultPage{ 1975 fn: getNextPage, 1976 eplr: cur, 1977 } 1978} 1979 1980// EncryptionProtectorProperties properties for an encryption protector execution. 1981type EncryptionProtectorProperties struct { 1982 // Subregion - READ-ONLY; Subregion of the encryption protector. 1983 Subregion *string `json:"subregion,omitempty"` 1984 // ServerKeyName - The name of the server key. 1985 ServerKeyName *string `json:"serverKeyName,omitempty"` 1986 // ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServerKeyTypeServiceManaged', 'ServerKeyTypeAzureKeyVault' 1987 ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"` 1988 // URI - READ-ONLY; The URI of the server key. 1989 URI *string `json:"uri,omitempty"` 1990 // Thumbprint - READ-ONLY; Thumbprint of the server key. 1991 Thumbprint *string `json:"thumbprint,omitempty"` 1992} 1993 1994// MarshalJSON is the custom marshaler for EncryptionProtectorProperties. 1995func (epp EncryptionProtectorProperties) MarshalJSON() ([]byte, error) { 1996 objectMap := make(map[string]interface{}) 1997 if epp.ServerKeyName != nil { 1998 objectMap["serverKeyName"] = epp.ServerKeyName 1999 } 2000 if epp.ServerKeyType != "" { 2001 objectMap["serverKeyType"] = epp.ServerKeyType 2002 } 2003 return json.Marshal(objectMap) 2004} 2005 2006// EntityReference the entity reference. 2007type EntityReference struct { 2008 // Type - The type of this referenced entity. Possible values include: 'IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference', 'IntegrationRuntimeEntityReferenceTypeLinkedServiceReference' 2009 Type IntegrationRuntimeEntityReferenceType `json:"type,omitempty"` 2010 // ReferenceName - The name of this referenced entity. 2011 ReferenceName *string `json:"referenceName,omitempty"` 2012} 2013 2014// EnvironmentVariableSetup the custom setup of setting environment variable. 2015type EnvironmentVariableSetup struct { 2016 // EnvironmentVariableSetupTypeProperties - Add environment variable type properties. 2017 *EnvironmentVariableSetupTypeProperties `json:"typeProperties,omitempty"` 2018 // Type - Possible values include: 'TypeBasicCustomSetupBaseTypeCustomSetupBase', 'TypeBasicCustomSetupBaseTypeCmdkeySetup', 'TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup', 'TypeBasicCustomSetupBaseTypeComponentSetup' 2019 Type TypeBasicCustomSetupBase `json:"type,omitempty"` 2020} 2021 2022// MarshalJSON is the custom marshaler for EnvironmentVariableSetup. 2023func (evs EnvironmentVariableSetup) MarshalJSON() ([]byte, error) { 2024 evs.Type = TypeBasicCustomSetupBaseTypeEnvironmentVariableSetup 2025 objectMap := make(map[string]interface{}) 2026 if evs.EnvironmentVariableSetupTypeProperties != nil { 2027 objectMap["typeProperties"] = evs.EnvironmentVariableSetupTypeProperties 2028 } 2029 if evs.Type != "" { 2030 objectMap["type"] = evs.Type 2031 } 2032 return json.Marshal(objectMap) 2033} 2034 2035// AsCmdkeySetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. 2036func (evs EnvironmentVariableSetup) AsCmdkeySetup() (*CmdkeySetup, bool) { 2037 return nil, false 2038} 2039 2040// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. 2041func (evs EnvironmentVariableSetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) { 2042 return &evs, true 2043} 2044 2045// AsComponentSetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. 2046func (evs EnvironmentVariableSetup) AsComponentSetup() (*ComponentSetup, bool) { 2047 return nil, false 2048} 2049 2050// AsCustomSetupBase is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. 2051func (evs EnvironmentVariableSetup) AsCustomSetupBase() (*CustomSetupBase, bool) { 2052 return nil, false 2053} 2054 2055// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for EnvironmentVariableSetup. 2056func (evs EnvironmentVariableSetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) { 2057 return &evs, true 2058} 2059 2060// UnmarshalJSON is the custom unmarshaler for EnvironmentVariableSetup struct. 2061func (evs *EnvironmentVariableSetup) UnmarshalJSON(body []byte) error { 2062 var m map[string]*json.RawMessage 2063 err := json.Unmarshal(body, &m) 2064 if err != nil { 2065 return err 2066 } 2067 for k, v := range m { 2068 switch k { 2069 case "typeProperties": 2070 if v != nil { 2071 var environmentVariableSetupTypeProperties EnvironmentVariableSetupTypeProperties 2072 err = json.Unmarshal(*v, &environmentVariableSetupTypeProperties) 2073 if err != nil { 2074 return err 2075 } 2076 evs.EnvironmentVariableSetupTypeProperties = &environmentVariableSetupTypeProperties 2077 } 2078 case "type": 2079 if v != nil { 2080 var typeVar TypeBasicCustomSetupBase 2081 err = json.Unmarshal(*v, &typeVar) 2082 if err != nil { 2083 return err 2084 } 2085 evs.Type = typeVar 2086 } 2087 } 2088 } 2089 2090 return nil 2091} 2092 2093// EnvironmentVariableSetupTypeProperties environment variable custom setup type properties. 2094type EnvironmentVariableSetupTypeProperties struct { 2095 // VariableName - The name of the environment variable. 2096 VariableName *string `json:"variableName,omitempty"` 2097 // VariableValue - The value of the environment variable. 2098 VariableValue *string `json:"variableValue,omitempty"` 2099} 2100 2101// ErrorAdditionalInfo the resource management error additional info. 2102type ErrorAdditionalInfo struct { 2103 // Type - READ-ONLY; The additional info type. 2104 Type *string `json:"type,omitempty"` 2105 // Info - READ-ONLY; The additional info. 2106 Info interface{} `json:"info,omitempty"` 2107} 2108 2109// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. 2110func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { 2111 objectMap := make(map[string]interface{}) 2112 return json.Marshal(objectMap) 2113} 2114 2115// ErrorDetail the error detail. 2116type ErrorDetail struct { 2117 // Code - READ-ONLY; The error code. 2118 Code *string `json:"code,omitempty"` 2119 // Message - READ-ONLY; The error message. 2120 Message *string `json:"message,omitempty"` 2121 // Target - READ-ONLY; The error target. 2122 Target *string `json:"target,omitempty"` 2123 // Details - READ-ONLY; The error details. 2124 Details *[]ErrorDetail `json:"details,omitempty"` 2125 // AdditionalInfo - READ-ONLY; The error additional info. 2126 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` 2127} 2128 2129// MarshalJSON is the custom marshaler for ErrorDetail. 2130func (ed ErrorDetail) MarshalJSON() ([]byte, error) { 2131 objectMap := make(map[string]interface{}) 2132 return json.Marshal(objectMap) 2133} 2134 2135// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for 2136// failed operations. (This also follows the OData error response format.). 2137type ErrorResponse struct { 2138 // Error - The error object. 2139 Error *ErrorDetail `json:"error,omitempty"` 2140} 2141 2142// ExtendedServerBlobAuditingPolicy an extended server blob auditing policy. 2143type ExtendedServerBlobAuditingPolicy struct { 2144 autorest.Response `json:"-"` 2145 // ExtendedServerBlobAuditingPolicyProperties - Resource properties. 2146 *ExtendedServerBlobAuditingPolicyProperties `json:"properties,omitempty"` 2147 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 2148 ID *string `json:"id,omitempty"` 2149 // Name - READ-ONLY; The name of the resource 2150 Name *string `json:"name,omitempty"` 2151 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 2152 Type *string `json:"type,omitempty"` 2153} 2154 2155// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicy. 2156func (esbap ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { 2157 objectMap := make(map[string]interface{}) 2158 if esbap.ExtendedServerBlobAuditingPolicyProperties != nil { 2159 objectMap["properties"] = esbap.ExtendedServerBlobAuditingPolicyProperties 2160 } 2161 return json.Marshal(objectMap) 2162} 2163 2164// UnmarshalJSON is the custom unmarshaler for ExtendedServerBlobAuditingPolicy struct. 2165func (esbap *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error { 2166 var m map[string]*json.RawMessage 2167 err := json.Unmarshal(body, &m) 2168 if err != nil { 2169 return err 2170 } 2171 for k, v := range m { 2172 switch k { 2173 case "properties": 2174 if v != nil { 2175 var extendedServerBlobAuditingPolicyProperties ExtendedServerBlobAuditingPolicyProperties 2176 err = json.Unmarshal(*v, &extendedServerBlobAuditingPolicyProperties) 2177 if err != nil { 2178 return err 2179 } 2180 esbap.ExtendedServerBlobAuditingPolicyProperties = &extendedServerBlobAuditingPolicyProperties 2181 } 2182 case "id": 2183 if v != nil { 2184 var ID string 2185 err = json.Unmarshal(*v, &ID) 2186 if err != nil { 2187 return err 2188 } 2189 esbap.ID = &ID 2190 } 2191 case "name": 2192 if v != nil { 2193 var name string 2194 err = json.Unmarshal(*v, &name) 2195 if err != nil { 2196 return err 2197 } 2198 esbap.Name = &name 2199 } 2200 case "type": 2201 if v != nil { 2202 var typeVar string 2203 err = json.Unmarshal(*v, &typeVar) 2204 if err != nil { 2205 return err 2206 } 2207 esbap.Type = &typeVar 2208 } 2209 } 2210 } 2211 2212 return nil 2213} 2214 2215// ExtendedServerBlobAuditingPolicyListResult a list of server extended auditing settings. 2216type ExtendedServerBlobAuditingPolicyListResult struct { 2217 autorest.Response `json:"-"` 2218 // Value - READ-ONLY; Array of results. 2219 Value *[]ExtendedServerBlobAuditingPolicy `json:"value,omitempty"` 2220 // NextLink - READ-ONLY; Link to retrieve next page of results. 2221 NextLink *string `json:"nextLink,omitempty"` 2222} 2223 2224// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicyListResult. 2225func (esbaplr ExtendedServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { 2226 objectMap := make(map[string]interface{}) 2227 return json.Marshal(objectMap) 2228} 2229 2230// ExtendedServerBlobAuditingPolicyListResultIterator provides access to a complete listing of 2231// ExtendedServerBlobAuditingPolicy values. 2232type ExtendedServerBlobAuditingPolicyListResultIterator struct { 2233 i int 2234 page ExtendedServerBlobAuditingPolicyListResultPage 2235} 2236 2237// NextWithContext advances to the next value. If there was an error making 2238// the request the iterator does not advance and the error is returned. 2239func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { 2240 if tracing.IsEnabled() { 2241 ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultIterator.NextWithContext") 2242 defer func() { 2243 sc := -1 2244 if iter.Response().Response.Response != nil { 2245 sc = iter.Response().Response.Response.StatusCode 2246 } 2247 tracing.EndSpan(ctx, sc, err) 2248 }() 2249 } 2250 iter.i++ 2251 if iter.i < len(iter.page.Values()) { 2252 return nil 2253 } 2254 err = iter.page.NextWithContext(ctx) 2255 if err != nil { 2256 iter.i-- 2257 return err 2258 } 2259 iter.i = 0 2260 return nil 2261} 2262 2263// Next advances to the next value. If there was an error making 2264// the request the iterator does not advance and the error is returned. 2265// Deprecated: Use NextWithContext() instead. 2266func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) Next() error { 2267 return iter.NextWithContext(context.Background()) 2268} 2269 2270// NotDone returns true if the enumeration should be started or is not yet complete. 2271func (iter ExtendedServerBlobAuditingPolicyListResultIterator) NotDone() bool { 2272 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2273} 2274 2275// Response returns the raw server response from the last page request. 2276func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Response() ExtendedServerBlobAuditingPolicyListResult { 2277 return iter.page.Response() 2278} 2279 2280// Value returns the current value or a zero-initialized value if the 2281// iterator has advanced beyond the end of the collection. 2282func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Value() ExtendedServerBlobAuditingPolicy { 2283 if !iter.page.NotDone() { 2284 return ExtendedServerBlobAuditingPolicy{} 2285 } 2286 return iter.page.Values()[iter.i] 2287} 2288 2289// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultIterator type. 2290func NewExtendedServerBlobAuditingPolicyListResultIterator(page ExtendedServerBlobAuditingPolicyListResultPage) ExtendedServerBlobAuditingPolicyListResultIterator { 2291 return ExtendedServerBlobAuditingPolicyListResultIterator{page: page} 2292} 2293 2294// IsEmpty returns true if the ListResult contains no values. 2295func (esbaplr ExtendedServerBlobAuditingPolicyListResult) IsEmpty() bool { 2296 return esbaplr.Value == nil || len(*esbaplr.Value) == 0 2297} 2298 2299// hasNextLink returns true if the NextLink is not empty. 2300func (esbaplr ExtendedServerBlobAuditingPolicyListResult) hasNextLink() bool { 2301 return esbaplr.NextLink != nil && len(*esbaplr.NextLink) != 0 2302} 2303 2304// extendedServerBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. 2305// It returns nil if no more results exist. 2306func (esbaplr ExtendedServerBlobAuditingPolicyListResult) extendedServerBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { 2307 if !esbaplr.hasNextLink() { 2308 return nil, nil 2309 } 2310 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2311 autorest.AsJSON(), 2312 autorest.AsGet(), 2313 autorest.WithBaseURL(to.String(esbaplr.NextLink))) 2314} 2315 2316// ExtendedServerBlobAuditingPolicyListResultPage contains a page of ExtendedServerBlobAuditingPolicy 2317// values. 2318type ExtendedServerBlobAuditingPolicyListResultPage struct { 2319 fn func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error) 2320 esbaplr ExtendedServerBlobAuditingPolicyListResult 2321} 2322 2323// NextWithContext advances to the next page of values. If there was an error making 2324// the request the page does not advance and the error is returned. 2325func (page *ExtendedServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { 2326 if tracing.IsEnabled() { 2327 ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultPage.NextWithContext") 2328 defer func() { 2329 sc := -1 2330 if page.Response().Response.Response != nil { 2331 sc = page.Response().Response.Response.StatusCode 2332 } 2333 tracing.EndSpan(ctx, sc, err) 2334 }() 2335 } 2336 for { 2337 next, err := page.fn(ctx, page.esbaplr) 2338 if err != nil { 2339 return err 2340 } 2341 page.esbaplr = next 2342 if !next.hasNextLink() || !next.IsEmpty() { 2343 break 2344 } 2345 } 2346 return nil 2347} 2348 2349// Next advances to the next page of values. If there was an error making 2350// the request the page does not advance and the error is returned. 2351// Deprecated: Use NextWithContext() instead. 2352func (page *ExtendedServerBlobAuditingPolicyListResultPage) Next() error { 2353 return page.NextWithContext(context.Background()) 2354} 2355 2356// NotDone returns true if the page enumeration should be started or is not yet complete. 2357func (page ExtendedServerBlobAuditingPolicyListResultPage) NotDone() bool { 2358 return !page.esbaplr.IsEmpty() 2359} 2360 2361// Response returns the raw server response from the last page request. 2362func (page ExtendedServerBlobAuditingPolicyListResultPage) Response() ExtendedServerBlobAuditingPolicyListResult { 2363 return page.esbaplr 2364} 2365 2366// Values returns the slice of values for the current page or nil if there are no values. 2367func (page ExtendedServerBlobAuditingPolicyListResultPage) Values() []ExtendedServerBlobAuditingPolicy { 2368 if page.esbaplr.IsEmpty() { 2369 return nil 2370 } 2371 return *page.esbaplr.Value 2372} 2373 2374// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultPage type. 2375func NewExtendedServerBlobAuditingPolicyListResultPage(cur ExtendedServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error)) ExtendedServerBlobAuditingPolicyListResultPage { 2376 return ExtendedServerBlobAuditingPolicyListResultPage{ 2377 fn: getNextPage, 2378 esbaplr: cur, 2379 } 2380} 2381 2382// ExtendedServerBlobAuditingPolicyProperties properties of an extended server blob auditing policy. 2383type ExtendedServerBlobAuditingPolicyProperties struct { 2384 // PredicateExpression - Specifies condition of where clause when creating an audit. 2385 PredicateExpression *string `json:"predicateExpression,omitempty"` 2386 // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' 2387 State BlobAuditingPolicyState `json:"state,omitempty"` 2388 // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. 2389 StorageEndpoint *string `json:"storageEndpoint,omitempty"` 2390 // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. 2391 // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. 2392 // Prerequisites for using managed identity authentication: 2393 // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2394 // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. 2395 // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) 2396 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 2397 // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. 2398 RetentionDays *int32 `json:"retentionDays,omitempty"` 2399 // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. 2400 // 2401 // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: 2402 // 2403 // BATCH_COMPLETED_GROUP, 2404 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 2405 // FAILED_DATABASE_AUTHENTICATION_GROUP. 2406 // 2407 // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. 2408 // 2409 // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 2410 // 2411 // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 2412 // BACKUP_RESTORE_GROUP 2413 // DATABASE_LOGOUT_GROUP 2414 // DATABASE_OBJECT_CHANGE_GROUP 2415 // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 2416 // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 2417 // DATABASE_OPERATION_GROUP 2418 // DATABASE_PERMISSION_CHANGE_GROUP 2419 // DATABASE_PRINCIPAL_CHANGE_GROUP 2420 // DATABASE_PRINCIPAL_IMPERSONATION_GROUP 2421 // DATABASE_ROLE_MEMBER_CHANGE_GROUP 2422 // FAILED_DATABASE_AUTHENTICATION_GROUP 2423 // SCHEMA_OBJECT_ACCESS_GROUP 2424 // SCHEMA_OBJECT_CHANGE_GROUP 2425 // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 2426 // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 2427 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 2428 // USER_CHANGE_PASSWORD_GROUP 2429 // BATCH_STARTED_GROUP 2430 // BATCH_COMPLETED_GROUP 2431 // 2432 // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. 2433 // 2434 // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). 2435 // 2436 // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: 2437 // SELECT 2438 // UPDATE 2439 // INSERT 2440 // DELETE 2441 // EXECUTE 2442 // RECEIVE 2443 // REFERENCES 2444 // 2445 // The general form for defining an action to be audited is: 2446 // {action} ON {object} BY {principal} 2447 // 2448 // Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 2449 // 2450 // For example: 2451 // SELECT on dbo.myTable by public 2452 // SELECT on DATABASE::myDatabase by public 2453 // SELECT on SCHEMA::mySchema by public 2454 // 2455 // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) 2456 AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` 2457 // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. 2458 StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` 2459 // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. 2460 IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` 2461 // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. 2462 // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. 2463 // 2464 // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. 2465 // Note that for server level audit you should use the 'master' database as {databaseName}. 2466 // 2467 // Diagnostic Settings URI format: 2468 // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 2469 // 2470 // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) 2471 // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) 2472 IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` 2473 // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. 2474 // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 2475 QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` 2476} 2477 2478// ExtendedSQLPoolBlobAuditingPolicy an extended Sql pool blob auditing policy. 2479type ExtendedSQLPoolBlobAuditingPolicy struct { 2480 autorest.Response `json:"-"` 2481 // ExtendedSQLPoolBlobAuditingPolicyProperties - Resource properties. 2482 *ExtendedSQLPoolBlobAuditingPolicyProperties `json:"properties,omitempty"` 2483 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 2484 ID *string `json:"id,omitempty"` 2485 // Name - READ-ONLY; The name of the resource 2486 Name *string `json:"name,omitempty"` 2487 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 2488 Type *string `json:"type,omitempty"` 2489} 2490 2491// MarshalJSON is the custom marshaler for ExtendedSQLPoolBlobAuditingPolicy. 2492func (espbap ExtendedSQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { 2493 objectMap := make(map[string]interface{}) 2494 if espbap.ExtendedSQLPoolBlobAuditingPolicyProperties != nil { 2495 objectMap["properties"] = espbap.ExtendedSQLPoolBlobAuditingPolicyProperties 2496 } 2497 return json.Marshal(objectMap) 2498} 2499 2500// UnmarshalJSON is the custom unmarshaler for ExtendedSQLPoolBlobAuditingPolicy struct. 2501func (espbap *ExtendedSQLPoolBlobAuditingPolicy) UnmarshalJSON(body []byte) error { 2502 var m map[string]*json.RawMessage 2503 err := json.Unmarshal(body, &m) 2504 if err != nil { 2505 return err 2506 } 2507 for k, v := range m { 2508 switch k { 2509 case "properties": 2510 if v != nil { 2511 var extendedSQLPoolBlobAuditingPolicyProperties ExtendedSQLPoolBlobAuditingPolicyProperties 2512 err = json.Unmarshal(*v, &extendedSQLPoolBlobAuditingPolicyProperties) 2513 if err != nil { 2514 return err 2515 } 2516 espbap.ExtendedSQLPoolBlobAuditingPolicyProperties = &extendedSQLPoolBlobAuditingPolicyProperties 2517 } 2518 case "id": 2519 if v != nil { 2520 var ID string 2521 err = json.Unmarshal(*v, &ID) 2522 if err != nil { 2523 return err 2524 } 2525 espbap.ID = &ID 2526 } 2527 case "name": 2528 if v != nil { 2529 var name string 2530 err = json.Unmarshal(*v, &name) 2531 if err != nil { 2532 return err 2533 } 2534 espbap.Name = &name 2535 } 2536 case "type": 2537 if v != nil { 2538 var typeVar string 2539 err = json.Unmarshal(*v, &typeVar) 2540 if err != nil { 2541 return err 2542 } 2543 espbap.Type = &typeVar 2544 } 2545 } 2546 } 2547 2548 return nil 2549} 2550 2551// ExtendedSQLPoolBlobAuditingPolicyListResult a list of sql pool extended auditing settings. 2552type ExtendedSQLPoolBlobAuditingPolicyListResult struct { 2553 autorest.Response `json:"-"` 2554 // Value - READ-ONLY; Array of results. 2555 Value *[]ExtendedSQLPoolBlobAuditingPolicy `json:"value,omitempty"` 2556 // NextLink - READ-ONLY; Link to retrieve next page of results. 2557 NextLink *string `json:"nextLink,omitempty"` 2558} 2559 2560// MarshalJSON is the custom marshaler for ExtendedSQLPoolBlobAuditingPolicyListResult. 2561func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { 2562 objectMap := make(map[string]interface{}) 2563 return json.Marshal(objectMap) 2564} 2565 2566// ExtendedSQLPoolBlobAuditingPolicyListResultIterator provides access to a complete listing of 2567// ExtendedSQLPoolBlobAuditingPolicy values. 2568type ExtendedSQLPoolBlobAuditingPolicyListResultIterator struct { 2569 i int 2570 page ExtendedSQLPoolBlobAuditingPolicyListResultPage 2571} 2572 2573// NextWithContext advances to the next value. If there was an error making 2574// the request the iterator does not advance and the error is returned. 2575func (iter *ExtendedSQLPoolBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { 2576 if tracing.IsEnabled() { 2577 ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPolicyListResultIterator.NextWithContext") 2578 defer func() { 2579 sc := -1 2580 if iter.Response().Response.Response != nil { 2581 sc = iter.Response().Response.Response.StatusCode 2582 } 2583 tracing.EndSpan(ctx, sc, err) 2584 }() 2585 } 2586 iter.i++ 2587 if iter.i < len(iter.page.Values()) { 2588 return nil 2589 } 2590 err = iter.page.NextWithContext(ctx) 2591 if err != nil { 2592 iter.i-- 2593 return err 2594 } 2595 iter.i = 0 2596 return nil 2597} 2598 2599// Next advances to the next value. If there was an error making 2600// the request the iterator does not advance and the error is returned. 2601// Deprecated: Use NextWithContext() instead. 2602func (iter *ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Next() error { 2603 return iter.NextWithContext(context.Background()) 2604} 2605 2606// NotDone returns true if the enumeration should be started or is not yet complete. 2607func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) NotDone() bool { 2608 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2609} 2610 2611// Response returns the raw server response from the last page request. 2612func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Response() ExtendedSQLPoolBlobAuditingPolicyListResult { 2613 return iter.page.Response() 2614} 2615 2616// Value returns the current value or a zero-initialized value if the 2617// iterator has advanced beyond the end of the collection. 2618func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Value() ExtendedSQLPoolBlobAuditingPolicy { 2619 if !iter.page.NotDone() { 2620 return ExtendedSQLPoolBlobAuditingPolicy{} 2621 } 2622 return iter.page.Values()[iter.i] 2623} 2624 2625// Creates a new instance of the ExtendedSQLPoolBlobAuditingPolicyListResultIterator type. 2626func NewExtendedSQLPoolBlobAuditingPolicyListResultIterator(page ExtendedSQLPoolBlobAuditingPolicyListResultPage) ExtendedSQLPoolBlobAuditingPolicyListResultIterator { 2627 return ExtendedSQLPoolBlobAuditingPolicyListResultIterator{page: page} 2628} 2629 2630// IsEmpty returns true if the ListResult contains no values. 2631func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) IsEmpty() bool { 2632 return espbaplr.Value == nil || len(*espbaplr.Value) == 0 2633} 2634 2635// hasNextLink returns true if the NextLink is not empty. 2636func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) hasNextLink() bool { 2637 return espbaplr.NextLink != nil && len(*espbaplr.NextLink) != 0 2638} 2639 2640// extendedSQLPoolBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. 2641// It returns nil if no more results exist. 2642func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) extendedSQLPoolBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { 2643 if !espbaplr.hasNextLink() { 2644 return nil, nil 2645 } 2646 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2647 autorest.AsJSON(), 2648 autorest.AsGet(), 2649 autorest.WithBaseURL(to.String(espbaplr.NextLink))) 2650} 2651 2652// ExtendedSQLPoolBlobAuditingPolicyListResultPage contains a page of ExtendedSQLPoolBlobAuditingPolicy 2653// values. 2654type ExtendedSQLPoolBlobAuditingPolicyListResultPage struct { 2655 fn func(context.Context, ExtendedSQLPoolBlobAuditingPolicyListResult) (ExtendedSQLPoolBlobAuditingPolicyListResult, error) 2656 espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult 2657} 2658 2659// NextWithContext advances to the next page of values. If there was an error making 2660// the request the page does not advance and the error is returned. 2661func (page *ExtendedSQLPoolBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { 2662 if tracing.IsEnabled() { 2663 ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPolicyListResultPage.NextWithContext") 2664 defer func() { 2665 sc := -1 2666 if page.Response().Response.Response != nil { 2667 sc = page.Response().Response.Response.StatusCode 2668 } 2669 tracing.EndSpan(ctx, sc, err) 2670 }() 2671 } 2672 for { 2673 next, err := page.fn(ctx, page.espbaplr) 2674 if err != nil { 2675 return err 2676 } 2677 page.espbaplr = next 2678 if !next.hasNextLink() || !next.IsEmpty() { 2679 break 2680 } 2681 } 2682 return nil 2683} 2684 2685// Next advances to the next page of values. If there was an error making 2686// the request the page does not advance and the error is returned. 2687// Deprecated: Use NextWithContext() instead. 2688func (page *ExtendedSQLPoolBlobAuditingPolicyListResultPage) Next() error { 2689 return page.NextWithContext(context.Background()) 2690} 2691 2692// NotDone returns true if the page enumeration should be started or is not yet complete. 2693func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) NotDone() bool { 2694 return !page.espbaplr.IsEmpty() 2695} 2696 2697// Response returns the raw server response from the last page request. 2698func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) Response() ExtendedSQLPoolBlobAuditingPolicyListResult { 2699 return page.espbaplr 2700} 2701 2702// Values returns the slice of values for the current page or nil if there are no values. 2703func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) Values() []ExtendedSQLPoolBlobAuditingPolicy { 2704 if page.espbaplr.IsEmpty() { 2705 return nil 2706 } 2707 return *page.espbaplr.Value 2708} 2709 2710// Creates a new instance of the ExtendedSQLPoolBlobAuditingPolicyListResultPage type. 2711func NewExtendedSQLPoolBlobAuditingPolicyListResultPage(cur ExtendedSQLPoolBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedSQLPoolBlobAuditingPolicyListResult) (ExtendedSQLPoolBlobAuditingPolicyListResult, error)) ExtendedSQLPoolBlobAuditingPolicyListResultPage { 2712 return ExtendedSQLPoolBlobAuditingPolicyListResultPage{ 2713 fn: getNextPage, 2714 espbaplr: cur, 2715 } 2716} 2717 2718// ExtendedSQLPoolBlobAuditingPolicyProperties properties of an extended Sql pool blob auditing policy. 2719type ExtendedSQLPoolBlobAuditingPolicyProperties struct { 2720 // PredicateExpression - Specifies condition of where clause when creating an audit. 2721 PredicateExpression *string `json:"predicateExpression,omitempty"` 2722 // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' 2723 State BlobAuditingPolicyState `json:"state,omitempty"` 2724 // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. 2725 StorageEndpoint *string `json:"storageEndpoint,omitempty"` 2726 // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. 2727 // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. 2728 // Prerequisites for using managed identity authentication: 2729 // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2730 // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. 2731 // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) 2732 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 2733 // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. 2734 RetentionDays *int32 `json:"retentionDays,omitempty"` 2735 // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. 2736 // 2737 // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: 2738 // 2739 // BATCH_COMPLETED_GROUP, 2740 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 2741 // FAILED_DATABASE_AUTHENTICATION_GROUP. 2742 // 2743 // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. 2744 // 2745 // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 2746 // 2747 // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 2748 // BACKUP_RESTORE_GROUP 2749 // DATABASE_LOGOUT_GROUP 2750 // DATABASE_OBJECT_CHANGE_GROUP 2751 // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 2752 // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 2753 // DATABASE_OPERATION_GROUP 2754 // DATABASE_PERMISSION_CHANGE_GROUP 2755 // DATABASE_PRINCIPAL_CHANGE_GROUP 2756 // DATABASE_PRINCIPAL_IMPERSONATION_GROUP 2757 // DATABASE_ROLE_MEMBER_CHANGE_GROUP 2758 // FAILED_DATABASE_AUTHENTICATION_GROUP 2759 // SCHEMA_OBJECT_ACCESS_GROUP 2760 // SCHEMA_OBJECT_CHANGE_GROUP 2761 // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 2762 // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 2763 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 2764 // USER_CHANGE_PASSWORD_GROUP 2765 // BATCH_STARTED_GROUP 2766 // BATCH_COMPLETED_GROUP 2767 // 2768 // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. 2769 // 2770 // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). 2771 // 2772 // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: 2773 // SELECT 2774 // UPDATE 2775 // INSERT 2776 // DELETE 2777 // EXECUTE 2778 // RECEIVE 2779 // REFERENCES 2780 // 2781 // The general form for defining an action to be audited is: 2782 // {action} ON {object} BY {principal} 2783 // 2784 // Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 2785 // 2786 // For example: 2787 // SELECT on dbo.myTable by public 2788 // SELECT on DATABASE::myDatabase by public 2789 // SELECT on SCHEMA::mySchema by public 2790 // 2791 // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) 2792 AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` 2793 // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. 2794 StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` 2795 // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. 2796 IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` 2797 // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. 2798 // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. 2799 // 2800 // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. 2801 // Note that for server level audit you should use the 'master' database as {databaseName}. 2802 // 2803 // Diagnostic Settings URI format: 2804 // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 2805 // 2806 // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) 2807 // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) 2808 IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` 2809 // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. 2810 // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 2811 QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` 2812} 2813 2814// GeoBackupPolicy a database geo backup policy. 2815type GeoBackupPolicy struct { 2816 autorest.Response `json:"-"` 2817 // GeoBackupPolicyProperties - The properties of the geo backup policy. 2818 *GeoBackupPolicyProperties `json:"properties,omitempty"` 2819 // Kind - READ-ONLY; Kind of geo backup policy. This is metadata used for the Azure portal experience. 2820 Kind *string `json:"kind,omitempty"` 2821 // Location - READ-ONLY; Backup policy location. 2822 Location *string `json:"location,omitempty"` 2823 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 2824 ID *string `json:"id,omitempty"` 2825 // Name - READ-ONLY; The name of the resource 2826 Name *string `json:"name,omitempty"` 2827 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 2828 Type *string `json:"type,omitempty"` 2829} 2830 2831// MarshalJSON is the custom marshaler for GeoBackupPolicy. 2832func (gbp GeoBackupPolicy) MarshalJSON() ([]byte, error) { 2833 objectMap := make(map[string]interface{}) 2834 if gbp.GeoBackupPolicyProperties != nil { 2835 objectMap["properties"] = gbp.GeoBackupPolicyProperties 2836 } 2837 return json.Marshal(objectMap) 2838} 2839 2840// UnmarshalJSON is the custom unmarshaler for GeoBackupPolicy struct. 2841func (gbp *GeoBackupPolicy) UnmarshalJSON(body []byte) error { 2842 var m map[string]*json.RawMessage 2843 err := json.Unmarshal(body, &m) 2844 if err != nil { 2845 return err 2846 } 2847 for k, v := range m { 2848 switch k { 2849 case "properties": 2850 if v != nil { 2851 var geoBackupPolicyProperties GeoBackupPolicyProperties 2852 err = json.Unmarshal(*v, &geoBackupPolicyProperties) 2853 if err != nil { 2854 return err 2855 } 2856 gbp.GeoBackupPolicyProperties = &geoBackupPolicyProperties 2857 } 2858 case "kind": 2859 if v != nil { 2860 var kind string 2861 err = json.Unmarshal(*v, &kind) 2862 if err != nil { 2863 return err 2864 } 2865 gbp.Kind = &kind 2866 } 2867 case "location": 2868 if v != nil { 2869 var location string 2870 err = json.Unmarshal(*v, &location) 2871 if err != nil { 2872 return err 2873 } 2874 gbp.Location = &location 2875 } 2876 case "id": 2877 if v != nil { 2878 var ID string 2879 err = json.Unmarshal(*v, &ID) 2880 if err != nil { 2881 return err 2882 } 2883 gbp.ID = &ID 2884 } 2885 case "name": 2886 if v != nil { 2887 var name string 2888 err = json.Unmarshal(*v, &name) 2889 if err != nil { 2890 return err 2891 } 2892 gbp.Name = &name 2893 } 2894 case "type": 2895 if v != nil { 2896 var typeVar string 2897 err = json.Unmarshal(*v, &typeVar) 2898 if err != nil { 2899 return err 2900 } 2901 gbp.Type = &typeVar 2902 } 2903 } 2904 } 2905 2906 return nil 2907} 2908 2909// GeoBackupPolicyListResult the response to a list geo backup policies request. 2910type GeoBackupPolicyListResult struct { 2911 autorest.Response `json:"-"` 2912 // Value - The list of geo backup policies. 2913 Value *[]GeoBackupPolicy `json:"value,omitempty"` 2914} 2915 2916// GeoBackupPolicyProperties the properties of the geo backup policy. 2917type GeoBackupPolicyProperties struct { 2918 // State - The state of the geo backup policy. Possible values include: 'GeoBackupPolicyStateDisabled', 'GeoBackupPolicyStateEnabled' 2919 State GeoBackupPolicyState `json:"state,omitempty"` 2920 // StorageType - READ-ONLY; The storage type of the geo backup policy. 2921 StorageType *string `json:"storageType,omitempty"` 2922} 2923 2924// MarshalJSON is the custom marshaler for GeoBackupPolicyProperties. 2925func (gbpp GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) { 2926 objectMap := make(map[string]interface{}) 2927 if gbpp.State != "" { 2928 objectMap["state"] = gbpp.State 2929 } 2930 return json.Marshal(objectMap) 2931} 2932 2933// GetSsisObjectMetadataRequest the request payload of get SSIS object metadata. 2934type GetSsisObjectMetadataRequest struct { 2935 // MetadataPath - Metadata path. 2936 MetadataPath *string `json:"metadataPath,omitempty"` 2937} 2938 2939// BasicIntegrationRuntime azure Synapse nested object which serves as a compute resource for activities. 2940type BasicIntegrationRuntime interface { 2941 AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) 2942 AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) 2943 AsIntegrationRuntime() (*IntegrationRuntime, bool) 2944} 2945 2946// IntegrationRuntime azure Synapse nested object which serves as a compute resource for activities. 2947type IntegrationRuntime struct { 2948 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 2949 AdditionalProperties map[string]interface{} `json:""` 2950 // Description - Integration runtime description. 2951 Description *string `json:"description,omitempty"` 2952 // Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted' 2953 Type Type `json:"type,omitempty"` 2954} 2955 2956func unmarshalBasicIntegrationRuntime(body []byte) (BasicIntegrationRuntime, error) { 2957 var m map[string]interface{} 2958 err := json.Unmarshal(body, &m) 2959 if err != nil { 2960 return nil, err 2961 } 2962 2963 switch m["type"] { 2964 case string(TypeManaged): 2965 var mir ManagedIntegrationRuntime 2966 err := json.Unmarshal(body, &mir) 2967 return mir, err 2968 case string(TypeSelfHosted): 2969 var shir SelfHostedIntegrationRuntime 2970 err := json.Unmarshal(body, &shir) 2971 return shir, err 2972 default: 2973 var ir IntegrationRuntime 2974 err := json.Unmarshal(body, &ir) 2975 return ir, err 2976 } 2977} 2978func unmarshalBasicIntegrationRuntimeArray(body []byte) ([]BasicIntegrationRuntime, error) { 2979 var rawMessages []*json.RawMessage 2980 err := json.Unmarshal(body, &rawMessages) 2981 if err != nil { 2982 return nil, err 2983 } 2984 2985 irArray := make([]BasicIntegrationRuntime, len(rawMessages)) 2986 2987 for index, rawMessage := range rawMessages { 2988 ir, err := unmarshalBasicIntegrationRuntime(*rawMessage) 2989 if err != nil { 2990 return nil, err 2991 } 2992 irArray[index] = ir 2993 } 2994 return irArray, nil 2995} 2996 2997// MarshalJSON is the custom marshaler for IntegrationRuntime. 2998func (ir IntegrationRuntime) MarshalJSON() ([]byte, error) { 2999 ir.Type = TypeIntegrationRuntime 3000 objectMap := make(map[string]interface{}) 3001 if ir.Description != nil { 3002 objectMap["description"] = ir.Description 3003 } 3004 if ir.Type != "" { 3005 objectMap["type"] = ir.Type 3006 } 3007 for k, v := range ir.AdditionalProperties { 3008 objectMap[k] = v 3009 } 3010 return json.Marshal(objectMap) 3011} 3012 3013// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. 3014func (ir IntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) { 3015 return nil, false 3016} 3017 3018// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. 3019func (ir IntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) { 3020 return nil, false 3021} 3022 3023// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. 3024func (ir IntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) { 3025 return &ir, true 3026} 3027 3028// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime. 3029func (ir IntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) { 3030 return &ir, true 3031} 3032 3033// UnmarshalJSON is the custom unmarshaler for IntegrationRuntime struct. 3034func (ir *IntegrationRuntime) UnmarshalJSON(body []byte) error { 3035 var m map[string]*json.RawMessage 3036 err := json.Unmarshal(body, &m) 3037 if err != nil { 3038 return err 3039 } 3040 for k, v := range m { 3041 switch k { 3042 default: 3043 if v != nil { 3044 var additionalProperties interface{} 3045 err = json.Unmarshal(*v, &additionalProperties) 3046 if err != nil { 3047 return err 3048 } 3049 if ir.AdditionalProperties == nil { 3050 ir.AdditionalProperties = make(map[string]interface{}) 3051 } 3052 ir.AdditionalProperties[k] = additionalProperties 3053 } 3054 case "description": 3055 if v != nil { 3056 var description string 3057 err = json.Unmarshal(*v, &description) 3058 if err != nil { 3059 return err 3060 } 3061 ir.Description = &description 3062 } 3063 case "type": 3064 if v != nil { 3065 var typeVar Type 3066 err = json.Unmarshal(*v, &typeVar) 3067 if err != nil { 3068 return err 3069 } 3070 ir.Type = typeVar 3071 } 3072 } 3073 } 3074 3075 return nil 3076} 3077 3078// IntegrationRuntimeAuthKeys the integration runtime authentication keys. 3079type IntegrationRuntimeAuthKeys struct { 3080 autorest.Response `json:"-"` 3081 // AuthKey1 - The primary integration runtime authentication key. 3082 AuthKey1 *string `json:"authKey1,omitempty"` 3083 // AuthKey2 - The secondary integration runtime authentication key. 3084 AuthKey2 *string `json:"authKey2,omitempty"` 3085} 3086 3087// IntegrationRuntimeComputeProperties the compute resource properties for managed integration runtime. 3088type IntegrationRuntimeComputeProperties struct { 3089 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 3090 AdditionalProperties map[string]interface{} `json:""` 3091 // Location - The location for managed integration runtime. The supported regions could be found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities 3092 Location *string `json:"location,omitempty"` 3093 // NodeSize - The node size requirement to managed integration runtime. 3094 NodeSize *string `json:"nodeSize,omitempty"` 3095 // NumberOfNodes - The required number of nodes for managed integration runtime. 3096 NumberOfNodes *int32 `json:"numberOfNodes,omitempty"` 3097 // MaxParallelExecutionsPerNode - Maximum parallel executions count per node for managed integration runtime. 3098 MaxParallelExecutionsPerNode *int32 `json:"maxParallelExecutionsPerNode,omitempty"` 3099 // DataFlowProperties - Data flow properties for managed integration runtime. 3100 DataFlowProperties *IntegrationRuntimeDataFlowProperties `json:"dataFlowProperties,omitempty"` 3101 // VNetProperties - VNet properties for managed integration runtime. 3102 VNetProperties *IntegrationRuntimeVNetProperties `json:"vNetProperties,omitempty"` 3103} 3104 3105// MarshalJSON is the custom marshaler for IntegrationRuntimeComputeProperties. 3106func (ircp IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) { 3107 objectMap := make(map[string]interface{}) 3108 if ircp.Location != nil { 3109 objectMap["location"] = ircp.Location 3110 } 3111 if ircp.NodeSize != nil { 3112 objectMap["nodeSize"] = ircp.NodeSize 3113 } 3114 if ircp.NumberOfNodes != nil { 3115 objectMap["numberOfNodes"] = ircp.NumberOfNodes 3116 } 3117 if ircp.MaxParallelExecutionsPerNode != nil { 3118 objectMap["maxParallelExecutionsPerNode"] = ircp.MaxParallelExecutionsPerNode 3119 } 3120 if ircp.DataFlowProperties != nil { 3121 objectMap["dataFlowProperties"] = ircp.DataFlowProperties 3122 } 3123 if ircp.VNetProperties != nil { 3124 objectMap["vNetProperties"] = ircp.VNetProperties 3125 } 3126 for k, v := range ircp.AdditionalProperties { 3127 objectMap[k] = v 3128 } 3129 return json.Marshal(objectMap) 3130} 3131 3132// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeComputeProperties struct. 3133func (ircp *IntegrationRuntimeComputeProperties) UnmarshalJSON(body []byte) error { 3134 var m map[string]*json.RawMessage 3135 err := json.Unmarshal(body, &m) 3136 if err != nil { 3137 return err 3138 } 3139 for k, v := range m { 3140 switch k { 3141 default: 3142 if v != nil { 3143 var additionalProperties interface{} 3144 err = json.Unmarshal(*v, &additionalProperties) 3145 if err != nil { 3146 return err 3147 } 3148 if ircp.AdditionalProperties == nil { 3149 ircp.AdditionalProperties = make(map[string]interface{}) 3150 } 3151 ircp.AdditionalProperties[k] = additionalProperties 3152 } 3153 case "location": 3154 if v != nil { 3155 var location string 3156 err = json.Unmarshal(*v, &location) 3157 if err != nil { 3158 return err 3159 } 3160 ircp.Location = &location 3161 } 3162 case "nodeSize": 3163 if v != nil { 3164 var nodeSize string 3165 err = json.Unmarshal(*v, &nodeSize) 3166 if err != nil { 3167 return err 3168 } 3169 ircp.NodeSize = &nodeSize 3170 } 3171 case "numberOfNodes": 3172 if v != nil { 3173 var numberOfNodes int32 3174 err = json.Unmarshal(*v, &numberOfNodes) 3175 if err != nil { 3176 return err 3177 } 3178 ircp.NumberOfNodes = &numberOfNodes 3179 } 3180 case "maxParallelExecutionsPerNode": 3181 if v != nil { 3182 var maxParallelExecutionsPerNode int32 3183 err = json.Unmarshal(*v, &maxParallelExecutionsPerNode) 3184 if err != nil { 3185 return err 3186 } 3187 ircp.MaxParallelExecutionsPerNode = &maxParallelExecutionsPerNode 3188 } 3189 case "dataFlowProperties": 3190 if v != nil { 3191 var dataFlowProperties IntegrationRuntimeDataFlowProperties 3192 err = json.Unmarshal(*v, &dataFlowProperties) 3193 if err != nil { 3194 return err 3195 } 3196 ircp.DataFlowProperties = &dataFlowProperties 3197 } 3198 case "vNetProperties": 3199 if v != nil { 3200 var vNetProperties IntegrationRuntimeVNetProperties 3201 err = json.Unmarshal(*v, &vNetProperties) 3202 if err != nil { 3203 return err 3204 } 3205 ircp.VNetProperties = &vNetProperties 3206 } 3207 } 3208 } 3209 3210 return nil 3211} 3212 3213// IntegrationRuntimeConnectionInfo connection information for encrypting the on-premises data source 3214// credentials. 3215type IntegrationRuntimeConnectionInfo struct { 3216 autorest.Response `json:"-"` 3217 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 3218 AdditionalProperties map[string]interface{} `json:""` 3219 // ServiceToken - READ-ONLY; The token generated in service. Callers use this token to authenticate to integration runtime. 3220 ServiceToken *string `json:"serviceToken,omitempty"` 3221 // IdentityCertThumbprint - READ-ONLY; The integration runtime SSL certificate thumbprint. Click-Once application uses it to do server validation. 3222 IdentityCertThumbprint *string `json:"identityCertThumbprint,omitempty"` 3223 // HostServiceURI - READ-ONLY; The on-premises integration runtime host URL. 3224 HostServiceURI *string `json:"hostServiceUri,omitempty"` 3225 // Version - READ-ONLY; The integration runtime version. 3226 Version *string `json:"version,omitempty"` 3227 // PublicKey - READ-ONLY; The public key for encrypting a credential when transferring the credential to the integration runtime. 3228 PublicKey *string `json:"publicKey,omitempty"` 3229 // IsIdentityCertExprired - READ-ONLY; Whether the identity certificate is expired. 3230 IsIdentityCertExprired *bool `json:"isIdentityCertExprired,omitempty"` 3231} 3232 3233// MarshalJSON is the custom marshaler for IntegrationRuntimeConnectionInfo. 3234func (irci IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) { 3235 objectMap := make(map[string]interface{}) 3236 for k, v := range irci.AdditionalProperties { 3237 objectMap[k] = v 3238 } 3239 return json.Marshal(objectMap) 3240} 3241 3242// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeConnectionInfo struct. 3243func (irci *IntegrationRuntimeConnectionInfo) UnmarshalJSON(body []byte) error { 3244 var m map[string]*json.RawMessage 3245 err := json.Unmarshal(body, &m) 3246 if err != nil { 3247 return err 3248 } 3249 for k, v := range m { 3250 switch k { 3251 default: 3252 if v != nil { 3253 var additionalProperties interface{} 3254 err = json.Unmarshal(*v, &additionalProperties) 3255 if err != nil { 3256 return err 3257 } 3258 if irci.AdditionalProperties == nil { 3259 irci.AdditionalProperties = make(map[string]interface{}) 3260 } 3261 irci.AdditionalProperties[k] = additionalProperties 3262 } 3263 case "serviceToken": 3264 if v != nil { 3265 var serviceToken string 3266 err = json.Unmarshal(*v, &serviceToken) 3267 if err != nil { 3268 return err 3269 } 3270 irci.ServiceToken = &serviceToken 3271 } 3272 case "identityCertThumbprint": 3273 if v != nil { 3274 var identityCertThumbprint string 3275 err = json.Unmarshal(*v, &identityCertThumbprint) 3276 if err != nil { 3277 return err 3278 } 3279 irci.IdentityCertThumbprint = &identityCertThumbprint 3280 } 3281 case "hostServiceUri": 3282 if v != nil { 3283 var hostServiceURI string 3284 err = json.Unmarshal(*v, &hostServiceURI) 3285 if err != nil { 3286 return err 3287 } 3288 irci.HostServiceURI = &hostServiceURI 3289 } 3290 case "version": 3291 if v != nil { 3292 var version string 3293 err = json.Unmarshal(*v, &version) 3294 if err != nil { 3295 return err 3296 } 3297 irci.Version = &version 3298 } 3299 case "publicKey": 3300 if v != nil { 3301 var publicKey string 3302 err = json.Unmarshal(*v, &publicKey) 3303 if err != nil { 3304 return err 3305 } 3306 irci.PublicKey = &publicKey 3307 } 3308 case "isIdentityCertExprired": 3309 if v != nil { 3310 var isIdentityCertExprired bool 3311 err = json.Unmarshal(*v, &isIdentityCertExprired) 3312 if err != nil { 3313 return err 3314 } 3315 irci.IsIdentityCertExprired = &isIdentityCertExprired 3316 } 3317 } 3318 } 3319 3320 return nil 3321} 3322 3323// IntegrationRuntimeCustomSetupScriptProperties custom setup script properties for a managed dedicated 3324// integration runtime. 3325type IntegrationRuntimeCustomSetupScriptProperties struct { 3326 // BlobContainerURI - The URI of the Azure blob container that contains the custom setup script. 3327 BlobContainerURI *string `json:"blobContainerUri,omitempty"` 3328 // SasToken - The SAS token of the Azure blob container. 3329 SasToken *SecureString `json:"sasToken,omitempty"` 3330} 3331 3332// IntegrationRuntimeDataFlowProperties data flow properties for managed integration runtime. 3333type IntegrationRuntimeDataFlowProperties struct { 3334 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 3335 AdditionalProperties map[string]interface{} `json:""` 3336 // ComputeType - Compute type of the cluster which will execute data flow job. Possible values include: 'DataFlowComputeTypeGeneral', 'DataFlowComputeTypeMemoryOptimized', 'DataFlowComputeTypeComputeOptimized' 3337 ComputeType DataFlowComputeType `json:"computeType,omitempty"` 3338 // CoreCount - Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. 3339 CoreCount *int32 `json:"coreCount,omitempty"` 3340 // TimeToLive - Time to live (in minutes) setting of the cluster which will execute data flow job. 3341 TimeToLive *int32 `json:"timeToLive,omitempty"` 3342} 3343 3344// MarshalJSON is the custom marshaler for IntegrationRuntimeDataFlowProperties. 3345func (irdfp IntegrationRuntimeDataFlowProperties) MarshalJSON() ([]byte, error) { 3346 objectMap := make(map[string]interface{}) 3347 if irdfp.ComputeType != "" { 3348 objectMap["computeType"] = irdfp.ComputeType 3349 } 3350 if irdfp.CoreCount != nil { 3351 objectMap["coreCount"] = irdfp.CoreCount 3352 } 3353 if irdfp.TimeToLive != nil { 3354 objectMap["timeToLive"] = irdfp.TimeToLive 3355 } 3356 for k, v := range irdfp.AdditionalProperties { 3357 objectMap[k] = v 3358 } 3359 return json.Marshal(objectMap) 3360} 3361 3362// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeDataFlowProperties struct. 3363func (irdfp *IntegrationRuntimeDataFlowProperties) UnmarshalJSON(body []byte) error { 3364 var m map[string]*json.RawMessage 3365 err := json.Unmarshal(body, &m) 3366 if err != nil { 3367 return err 3368 } 3369 for k, v := range m { 3370 switch k { 3371 default: 3372 if v != nil { 3373 var additionalProperties interface{} 3374 err = json.Unmarshal(*v, &additionalProperties) 3375 if err != nil { 3376 return err 3377 } 3378 if irdfp.AdditionalProperties == nil { 3379 irdfp.AdditionalProperties = make(map[string]interface{}) 3380 } 3381 irdfp.AdditionalProperties[k] = additionalProperties 3382 } 3383 case "computeType": 3384 if v != nil { 3385 var computeType DataFlowComputeType 3386 err = json.Unmarshal(*v, &computeType) 3387 if err != nil { 3388 return err 3389 } 3390 irdfp.ComputeType = computeType 3391 } 3392 case "coreCount": 3393 if v != nil { 3394 var coreCount int32 3395 err = json.Unmarshal(*v, &coreCount) 3396 if err != nil { 3397 return err 3398 } 3399 irdfp.CoreCount = &coreCount 3400 } 3401 case "timeToLive": 3402 if v != nil { 3403 var timeToLive int32 3404 err = json.Unmarshal(*v, &timeToLive) 3405 if err != nil { 3406 return err 3407 } 3408 irdfp.TimeToLive = &timeToLive 3409 } 3410 } 3411 } 3412 3413 return nil 3414} 3415 3416// IntegrationRuntimeDataProxyProperties data proxy properties for a managed dedicated integration runtime. 3417type IntegrationRuntimeDataProxyProperties struct { 3418 // ConnectVia - The self-hosted integration runtime reference. 3419 ConnectVia *EntityReference `json:"connectVia,omitempty"` 3420 // StagingLinkedService - The staging linked service reference. 3421 StagingLinkedService *EntityReference `json:"stagingLinkedService,omitempty"` 3422 // Path - The path to contain the staged data in the Blob storage. 3423 Path *string `json:"path,omitempty"` 3424} 3425 3426// IntegrationRuntimeListResponse a list of integration runtime resources. 3427type IntegrationRuntimeListResponse struct { 3428 autorest.Response `json:"-"` 3429 // Value - List of integration runtimes. 3430 Value *[]IntegrationRuntimeResource `json:"value,omitempty"` 3431 // NextLink - The link to the next page of results, if any remaining results exist. 3432 NextLink *string `json:"nextLink,omitempty"` 3433} 3434 3435// IntegrationRuntimeListResponseIterator provides access to a complete listing of 3436// IntegrationRuntimeResource values. 3437type IntegrationRuntimeListResponseIterator struct { 3438 i int 3439 page IntegrationRuntimeListResponsePage 3440} 3441 3442// NextWithContext advances to the next value. If there was an error making 3443// the request the iterator does not advance and the error is returned. 3444func (iter *IntegrationRuntimeListResponseIterator) NextWithContext(ctx context.Context) (err error) { 3445 if tracing.IsEnabled() { 3446 ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeListResponseIterator.NextWithContext") 3447 defer func() { 3448 sc := -1 3449 if iter.Response().Response.Response != nil { 3450 sc = iter.Response().Response.Response.StatusCode 3451 } 3452 tracing.EndSpan(ctx, sc, err) 3453 }() 3454 } 3455 iter.i++ 3456 if iter.i < len(iter.page.Values()) { 3457 return nil 3458 } 3459 err = iter.page.NextWithContext(ctx) 3460 if err != nil { 3461 iter.i-- 3462 return err 3463 } 3464 iter.i = 0 3465 return nil 3466} 3467 3468// Next advances to the next value. If there was an error making 3469// the request the iterator does not advance and the error is returned. 3470// Deprecated: Use NextWithContext() instead. 3471func (iter *IntegrationRuntimeListResponseIterator) Next() error { 3472 return iter.NextWithContext(context.Background()) 3473} 3474 3475// NotDone returns true if the enumeration should be started or is not yet complete. 3476func (iter IntegrationRuntimeListResponseIterator) NotDone() bool { 3477 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3478} 3479 3480// Response returns the raw server response from the last page request. 3481func (iter IntegrationRuntimeListResponseIterator) Response() IntegrationRuntimeListResponse { 3482 return iter.page.Response() 3483} 3484 3485// Value returns the current value or a zero-initialized value if the 3486// iterator has advanced beyond the end of the collection. 3487func (iter IntegrationRuntimeListResponseIterator) Value() IntegrationRuntimeResource { 3488 if !iter.page.NotDone() { 3489 return IntegrationRuntimeResource{} 3490 } 3491 return iter.page.Values()[iter.i] 3492} 3493 3494// Creates a new instance of the IntegrationRuntimeListResponseIterator type. 3495func NewIntegrationRuntimeListResponseIterator(page IntegrationRuntimeListResponsePage) IntegrationRuntimeListResponseIterator { 3496 return IntegrationRuntimeListResponseIterator{page: page} 3497} 3498 3499// IsEmpty returns true if the ListResult contains no values. 3500func (irlr IntegrationRuntimeListResponse) IsEmpty() bool { 3501 return irlr.Value == nil || len(*irlr.Value) == 0 3502} 3503 3504// hasNextLink returns true if the NextLink is not empty. 3505func (irlr IntegrationRuntimeListResponse) hasNextLink() bool { 3506 return irlr.NextLink != nil && len(*irlr.NextLink) != 0 3507} 3508 3509// integrationRuntimeListResponsePreparer prepares a request to retrieve the next set of results. 3510// It returns nil if no more results exist. 3511func (irlr IntegrationRuntimeListResponse) integrationRuntimeListResponsePreparer(ctx context.Context) (*http.Request, error) { 3512 if !irlr.hasNextLink() { 3513 return nil, nil 3514 } 3515 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3516 autorest.AsJSON(), 3517 autorest.AsGet(), 3518 autorest.WithBaseURL(to.String(irlr.NextLink))) 3519} 3520 3521// IntegrationRuntimeListResponsePage contains a page of IntegrationRuntimeResource values. 3522type IntegrationRuntimeListResponsePage struct { 3523 fn func(context.Context, IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error) 3524 irlr IntegrationRuntimeListResponse 3525} 3526 3527// NextWithContext advances to the next page of values. If there was an error making 3528// the request the page does not advance and the error is returned. 3529func (page *IntegrationRuntimeListResponsePage) NextWithContext(ctx context.Context) (err error) { 3530 if tracing.IsEnabled() { 3531 ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeListResponsePage.NextWithContext") 3532 defer func() { 3533 sc := -1 3534 if page.Response().Response.Response != nil { 3535 sc = page.Response().Response.Response.StatusCode 3536 } 3537 tracing.EndSpan(ctx, sc, err) 3538 }() 3539 } 3540 for { 3541 next, err := page.fn(ctx, page.irlr) 3542 if err != nil { 3543 return err 3544 } 3545 page.irlr = next 3546 if !next.hasNextLink() || !next.IsEmpty() { 3547 break 3548 } 3549 } 3550 return nil 3551} 3552 3553// Next advances to the next page of values. If there was an error making 3554// the request the page does not advance and the error is returned. 3555// Deprecated: Use NextWithContext() instead. 3556func (page *IntegrationRuntimeListResponsePage) Next() error { 3557 return page.NextWithContext(context.Background()) 3558} 3559 3560// NotDone returns true if the page enumeration should be started or is not yet complete. 3561func (page IntegrationRuntimeListResponsePage) NotDone() bool { 3562 return !page.irlr.IsEmpty() 3563} 3564 3565// Response returns the raw server response from the last page request. 3566func (page IntegrationRuntimeListResponsePage) Response() IntegrationRuntimeListResponse { 3567 return page.irlr 3568} 3569 3570// Values returns the slice of values for the current page or nil if there are no values. 3571func (page IntegrationRuntimeListResponsePage) Values() []IntegrationRuntimeResource { 3572 if page.irlr.IsEmpty() { 3573 return nil 3574 } 3575 return *page.irlr.Value 3576} 3577 3578// Creates a new instance of the IntegrationRuntimeListResponsePage type. 3579func NewIntegrationRuntimeListResponsePage(cur IntegrationRuntimeListResponse, getNextPage func(context.Context, IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error)) IntegrationRuntimeListResponsePage { 3580 return IntegrationRuntimeListResponsePage{ 3581 fn: getNextPage, 3582 irlr: cur, 3583 } 3584} 3585 3586// IntegrationRuntimeMonitoringData get monitoring data response. 3587type IntegrationRuntimeMonitoringData struct { 3588 autorest.Response `json:"-"` 3589 // Name - Integration runtime name. 3590 Name *string `json:"name,omitempty"` 3591 // Nodes - Integration runtime node monitoring data. 3592 Nodes *[]IntegrationRuntimeNodeMonitoringData `json:"nodes,omitempty"` 3593} 3594 3595// IntegrationRuntimeNodeIPAddress the IP address of self-hosted integration runtime node. 3596type IntegrationRuntimeNodeIPAddress struct { 3597 autorest.Response `json:"-"` 3598 // IPAddress - READ-ONLY; The IP address of self-hosted integration runtime node. 3599 IPAddress *string `json:"ipAddress,omitempty"` 3600} 3601 3602// MarshalJSON is the custom marshaler for IntegrationRuntimeNodeIPAddress. 3603func (irnia IntegrationRuntimeNodeIPAddress) MarshalJSON() ([]byte, error) { 3604 objectMap := make(map[string]interface{}) 3605 return json.Marshal(objectMap) 3606} 3607 3608// IntegrationRuntimeNodeMonitoringData monitoring data for integration runtime node. 3609type IntegrationRuntimeNodeMonitoringData struct { 3610 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 3611 AdditionalProperties map[string]interface{} `json:""` 3612 // NodeName - READ-ONLY; Name of the integration runtime node. 3613 NodeName *string `json:"nodeName,omitempty"` 3614 // AvailableMemoryInMB - READ-ONLY; Available memory (MB) on the integration runtime node. 3615 AvailableMemoryInMB *int32 `json:"availableMemoryInMB,omitempty"` 3616 // CPUUtilization - READ-ONLY; CPU percentage on the integration runtime node. 3617 CPUUtilization *int32 `json:"cpuUtilization,omitempty"` 3618 // ConcurrentJobsLimit - READ-ONLY; Maximum concurrent jobs on the integration runtime node. 3619 ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"` 3620 // ConcurrentJobsRunning - READ-ONLY; The number of jobs currently running on the integration runtime node. 3621 ConcurrentJobsRunning *int32 `json:"concurrentJobsRunning,omitempty"` 3622 // MaxConcurrentJobs - READ-ONLY; The maximum concurrent jobs in this integration runtime. 3623 MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"` 3624 // SentBytes - READ-ONLY; Sent bytes on the integration runtime node. 3625 SentBytes *float64 `json:"sentBytes,omitempty"` 3626 // ReceivedBytes - READ-ONLY; Received bytes on the integration runtime node. 3627 ReceivedBytes *float64 `json:"receivedBytes,omitempty"` 3628} 3629 3630// MarshalJSON is the custom marshaler for IntegrationRuntimeNodeMonitoringData. 3631func (irnmd IntegrationRuntimeNodeMonitoringData) MarshalJSON() ([]byte, error) { 3632 objectMap := make(map[string]interface{}) 3633 for k, v := range irnmd.AdditionalProperties { 3634 objectMap[k] = v 3635 } 3636 return json.Marshal(objectMap) 3637} 3638 3639// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeNodeMonitoringData struct. 3640func (irnmd *IntegrationRuntimeNodeMonitoringData) UnmarshalJSON(body []byte) error { 3641 var m map[string]*json.RawMessage 3642 err := json.Unmarshal(body, &m) 3643 if err != nil { 3644 return err 3645 } 3646 for k, v := range m { 3647 switch k { 3648 default: 3649 if v != nil { 3650 var additionalProperties interface{} 3651 err = json.Unmarshal(*v, &additionalProperties) 3652 if err != nil { 3653 return err 3654 } 3655 if irnmd.AdditionalProperties == nil { 3656 irnmd.AdditionalProperties = make(map[string]interface{}) 3657 } 3658 irnmd.AdditionalProperties[k] = additionalProperties 3659 } 3660 case "nodeName": 3661 if v != nil { 3662 var nodeName string 3663 err = json.Unmarshal(*v, &nodeName) 3664 if err != nil { 3665 return err 3666 } 3667 irnmd.NodeName = &nodeName 3668 } 3669 case "availableMemoryInMB": 3670 if v != nil { 3671 var availableMemoryInMB int32 3672 err = json.Unmarshal(*v, &availableMemoryInMB) 3673 if err != nil { 3674 return err 3675 } 3676 irnmd.AvailableMemoryInMB = &availableMemoryInMB 3677 } 3678 case "cpuUtilization": 3679 if v != nil { 3680 var CPUUtilization int32 3681 err = json.Unmarshal(*v, &CPUUtilization) 3682 if err != nil { 3683 return err 3684 } 3685 irnmd.CPUUtilization = &CPUUtilization 3686 } 3687 case "concurrentJobsLimit": 3688 if v != nil { 3689 var concurrentJobsLimit int32 3690 err = json.Unmarshal(*v, &concurrentJobsLimit) 3691 if err != nil { 3692 return err 3693 } 3694 irnmd.ConcurrentJobsLimit = &concurrentJobsLimit 3695 } 3696 case "concurrentJobsRunning": 3697 if v != nil { 3698 var concurrentJobsRunning int32 3699 err = json.Unmarshal(*v, &concurrentJobsRunning) 3700 if err != nil { 3701 return err 3702 } 3703 irnmd.ConcurrentJobsRunning = &concurrentJobsRunning 3704 } 3705 case "maxConcurrentJobs": 3706 if v != nil { 3707 var maxConcurrentJobs int32 3708 err = json.Unmarshal(*v, &maxConcurrentJobs) 3709 if err != nil { 3710 return err 3711 } 3712 irnmd.MaxConcurrentJobs = &maxConcurrentJobs 3713 } 3714 case "sentBytes": 3715 if v != nil { 3716 var sentBytes float64 3717 err = json.Unmarshal(*v, &sentBytes) 3718 if err != nil { 3719 return err 3720 } 3721 irnmd.SentBytes = &sentBytes 3722 } 3723 case "receivedBytes": 3724 if v != nil { 3725 var receivedBytes float64 3726 err = json.Unmarshal(*v, &receivedBytes) 3727 if err != nil { 3728 return err 3729 } 3730 irnmd.ReceivedBytes = &receivedBytes 3731 } 3732 } 3733 } 3734 3735 return nil 3736} 3737 3738// IntegrationRuntimeObjectMetadataRefreshFuture an abstraction for monitoring and retrieving the results 3739// of a long-running operation. 3740type IntegrationRuntimeObjectMetadataRefreshFuture struct { 3741 azure.FutureAPI 3742 // Result returns the result of the asynchronous operation. 3743 // If the operation has not completed it will return an error. 3744 Result func(IntegrationRuntimeObjectMetadataClient) (SsisObjectMetadataStatusResponse, error) 3745} 3746 3747// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3748func (future *IntegrationRuntimeObjectMetadataRefreshFuture) UnmarshalJSON(body []byte) error { 3749 var azFuture azure.Future 3750 if err := json.Unmarshal(body, &azFuture); err != nil { 3751 return err 3752 } 3753 future.FutureAPI = &azFuture 3754 future.Result = future.result 3755 return nil 3756} 3757 3758// result is the default implementation for IntegrationRuntimeObjectMetadataRefreshFuture.Result. 3759func (future *IntegrationRuntimeObjectMetadataRefreshFuture) result(client IntegrationRuntimeObjectMetadataClient) (somsr SsisObjectMetadataStatusResponse, err error) { 3760 var done bool 3761 done, err = future.DoneWithContext(context.Background(), client) 3762 if err != nil { 3763 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataRefreshFuture", "Result", future.Response(), "Polling failure") 3764 return 3765 } 3766 if !done { 3767 somsr.Response.Response = future.Response() 3768 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimeObjectMetadataRefreshFuture") 3769 return 3770 } 3771 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3772 if somsr.Response.Response, err = future.GetResult(sender); err == nil && somsr.Response.Response.StatusCode != http.StatusNoContent { 3773 somsr, err = client.RefreshResponder(somsr.Response.Response) 3774 if err != nil { 3775 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimeObjectMetadataRefreshFuture", "Result", somsr.Response.Response, "Failure responding to request") 3776 } 3777 } 3778 return 3779} 3780 3781// IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint azure-SSIS integration runtime outbound 3782// network dependency endpoints for one category. 3783type IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint struct { 3784 // Category - The category of outbound network dependency. 3785 Category *string `json:"category,omitempty"` 3786 // Endpoints - The endpoints for outbound network dependency. 3787 Endpoints *[]IntegrationRuntimeOutboundNetworkDependenciesEndpoint `json:"endpoints,omitempty"` 3788} 3789 3790// IntegrationRuntimeOutboundNetworkDependenciesEndpoint the endpoint for Azure-SSIS integration runtime 3791// outbound network dependency. 3792type IntegrationRuntimeOutboundNetworkDependenciesEndpoint struct { 3793 // DomainName - The domain name of endpoint. 3794 DomainName *string `json:"domainName,omitempty"` 3795 // EndpointDetails - The details of endpoint. 3796 EndpointDetails *[]IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails `json:"endpointDetails,omitempty"` 3797} 3798 3799// IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails the details of Azure-SSIS integration 3800// runtime outbound network dependency endpoint. 3801type IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails struct { 3802 // Port - The port of endpoint. 3803 Port *int32 `json:"port,omitempty"` 3804} 3805 3806// IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse azure-SSIS integration runtime outbound 3807// network dependency endpoints. 3808type IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse struct { 3809 autorest.Response `json:"-"` 3810 // Value - The list of outbound network dependency endpoints. 3811 Value *[]IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint `json:"value,omitempty"` 3812} 3813 3814// IntegrationRuntimeRegenerateKeyParameters parameters to regenerate the authentication key. 3815type IntegrationRuntimeRegenerateKeyParameters struct { 3816 // KeyName - The name of the authentication key to regenerate. Possible values include: 'IntegrationRuntimeAuthKeyNameAuthKey1', 'IntegrationRuntimeAuthKeyNameAuthKey2' 3817 KeyName IntegrationRuntimeAuthKeyName `json:"keyName,omitempty"` 3818} 3819 3820// IntegrationRuntimeResource integration runtime resource type. 3821type IntegrationRuntimeResource struct { 3822 autorest.Response `json:"-"` 3823 // Properties - Integration runtime properties. 3824 Properties BasicIntegrationRuntime `json:"properties,omitempty"` 3825 // Etag - READ-ONLY; Resource Etag. 3826 Etag *string `json:"etag,omitempty"` 3827 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3828 ID *string `json:"id,omitempty"` 3829 // Name - READ-ONLY; The name of the resource 3830 Name *string `json:"name,omitempty"` 3831 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3832 Type *string `json:"type,omitempty"` 3833} 3834 3835// MarshalJSON is the custom marshaler for IntegrationRuntimeResource. 3836func (irr IntegrationRuntimeResource) MarshalJSON() ([]byte, error) { 3837 objectMap := make(map[string]interface{}) 3838 objectMap["properties"] = irr.Properties 3839 return json.Marshal(objectMap) 3840} 3841 3842// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeResource struct. 3843func (irr *IntegrationRuntimeResource) UnmarshalJSON(body []byte) error { 3844 var m map[string]*json.RawMessage 3845 err := json.Unmarshal(body, &m) 3846 if err != nil { 3847 return err 3848 } 3849 for k, v := range m { 3850 switch k { 3851 case "properties": 3852 if v != nil { 3853 properties, err := unmarshalBasicIntegrationRuntime(*v) 3854 if err != nil { 3855 return err 3856 } 3857 irr.Properties = properties 3858 } 3859 case "etag": 3860 if v != nil { 3861 var etag string 3862 err = json.Unmarshal(*v, &etag) 3863 if err != nil { 3864 return err 3865 } 3866 irr.Etag = &etag 3867 } 3868 case "id": 3869 if v != nil { 3870 var ID string 3871 err = json.Unmarshal(*v, &ID) 3872 if err != nil { 3873 return err 3874 } 3875 irr.ID = &ID 3876 } 3877 case "name": 3878 if v != nil { 3879 var name string 3880 err = json.Unmarshal(*v, &name) 3881 if err != nil { 3882 return err 3883 } 3884 irr.Name = &name 3885 } 3886 case "type": 3887 if v != nil { 3888 var typeVar string 3889 err = json.Unmarshal(*v, &typeVar) 3890 if err != nil { 3891 return err 3892 } 3893 irr.Type = &typeVar 3894 } 3895 } 3896 } 3897 3898 return nil 3899} 3900 3901// IntegrationRuntimesCreateFuture an abstraction for monitoring and retrieving the results of a 3902// long-running operation. 3903type IntegrationRuntimesCreateFuture struct { 3904 azure.FutureAPI 3905 // Result returns the result of the asynchronous operation. 3906 // If the operation has not completed it will return an error. 3907 Result func(IntegrationRuntimesClient) (IntegrationRuntimeResource, error) 3908} 3909 3910// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3911func (future *IntegrationRuntimesCreateFuture) UnmarshalJSON(body []byte) error { 3912 var azFuture azure.Future 3913 if err := json.Unmarshal(body, &azFuture); err != nil { 3914 return err 3915 } 3916 future.FutureAPI = &azFuture 3917 future.Result = future.result 3918 return nil 3919} 3920 3921// result is the default implementation for IntegrationRuntimesCreateFuture.Result. 3922func (future *IntegrationRuntimesCreateFuture) result(client IntegrationRuntimesClient) (irr IntegrationRuntimeResource, err error) { 3923 var done bool 3924 done, err = future.DoneWithContext(context.Background(), client) 3925 if err != nil { 3926 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesCreateFuture", "Result", future.Response(), "Polling failure") 3927 return 3928 } 3929 if !done { 3930 irr.Response.Response = future.Response() 3931 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesCreateFuture") 3932 return 3933 } 3934 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3935 if irr.Response.Response, err = future.GetResult(sender); err == nil && irr.Response.Response.StatusCode != http.StatusNoContent { 3936 irr, err = client.CreateResponder(irr.Response.Response) 3937 if err != nil { 3938 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesCreateFuture", "Result", irr.Response.Response, "Failure responding to request") 3939 } 3940 } 3941 return 3942} 3943 3944// IntegrationRuntimesDeleteFuture an abstraction for monitoring and retrieving the results of a 3945// long-running operation. 3946type IntegrationRuntimesDeleteFuture struct { 3947 azure.FutureAPI 3948 // Result returns the result of the asynchronous operation. 3949 // If the operation has not completed it will return an error. 3950 Result func(IntegrationRuntimesClient) (autorest.Response, error) 3951} 3952 3953// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3954func (future *IntegrationRuntimesDeleteFuture) UnmarshalJSON(body []byte) error { 3955 var azFuture azure.Future 3956 if err := json.Unmarshal(body, &azFuture); err != nil { 3957 return err 3958 } 3959 future.FutureAPI = &azFuture 3960 future.Result = future.result 3961 return nil 3962} 3963 3964// result is the default implementation for IntegrationRuntimesDeleteFuture.Result. 3965func (future *IntegrationRuntimesDeleteFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { 3966 var done bool 3967 done, err = future.DoneWithContext(context.Background(), client) 3968 if err != nil { 3969 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesDeleteFuture", "Result", future.Response(), "Polling failure") 3970 return 3971 } 3972 if !done { 3973 ar.Response = future.Response() 3974 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesDeleteFuture") 3975 return 3976 } 3977 ar.Response = future.Response() 3978 return 3979} 3980 3981// IntegrationRuntimesDisableInteractiveQueryFuture an abstraction for monitoring and retrieving the 3982// results of a long-running operation. 3983type IntegrationRuntimesDisableInteractiveQueryFuture struct { 3984 azure.FutureAPI 3985 // Result returns the result of the asynchronous operation. 3986 // If the operation has not completed it will return an error. 3987 Result func(IntegrationRuntimesClient) (autorest.Response, error) 3988} 3989 3990// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3991func (future *IntegrationRuntimesDisableInteractiveQueryFuture) UnmarshalJSON(body []byte) error { 3992 var azFuture azure.Future 3993 if err := json.Unmarshal(body, &azFuture); err != nil { 3994 return err 3995 } 3996 future.FutureAPI = &azFuture 3997 future.Result = future.result 3998 return nil 3999} 4000 4001// result is the default implementation for IntegrationRuntimesDisableInteractiveQueryFuture.Result. 4002func (future *IntegrationRuntimesDisableInteractiveQueryFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { 4003 var done bool 4004 done, err = future.DoneWithContext(context.Background(), client) 4005 if err != nil { 4006 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesDisableInteractiveQueryFuture", "Result", future.Response(), "Polling failure") 4007 return 4008 } 4009 if !done { 4010 ar.Response = future.Response() 4011 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesDisableInteractiveQueryFuture") 4012 return 4013 } 4014 ar.Response = future.Response() 4015 return 4016} 4017 4018// IntegrationRuntimesEnableInteractiveQueryFuture an abstraction for monitoring and retrieving the results 4019// of a long-running operation. 4020type IntegrationRuntimesEnableInteractiveQueryFuture struct { 4021 azure.FutureAPI 4022 // Result returns the result of the asynchronous operation. 4023 // If the operation has not completed it will return an error. 4024 Result func(IntegrationRuntimesClient) (autorest.Response, error) 4025} 4026 4027// UnmarshalJSON is the custom unmarshaller for CreateFuture. 4028func (future *IntegrationRuntimesEnableInteractiveQueryFuture) UnmarshalJSON(body []byte) error { 4029 var azFuture azure.Future 4030 if err := json.Unmarshal(body, &azFuture); err != nil { 4031 return err 4032 } 4033 future.FutureAPI = &azFuture 4034 future.Result = future.result 4035 return nil 4036} 4037 4038// result is the default implementation for IntegrationRuntimesEnableInteractiveQueryFuture.Result. 4039func (future *IntegrationRuntimesEnableInteractiveQueryFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { 4040 var done bool 4041 done, err = future.DoneWithContext(context.Background(), client) 4042 if err != nil { 4043 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesEnableInteractiveQueryFuture", "Result", future.Response(), "Polling failure") 4044 return 4045 } 4046 if !done { 4047 ar.Response = future.Response() 4048 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesEnableInteractiveQueryFuture") 4049 return 4050 } 4051 ar.Response = future.Response() 4052 return 4053} 4054 4055// IntegrationRuntimeSsisCatalogInfo catalog information for managed dedicated integration runtime. 4056type IntegrationRuntimeSsisCatalogInfo struct { 4057 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 4058 AdditionalProperties map[string]interface{} `json:""` 4059 // CatalogServerEndpoint - The catalog database server URL. 4060 CatalogServerEndpoint *string `json:"catalogServerEndpoint,omitempty"` 4061 // CatalogAdminUserName - The administrator user name of catalog database. 4062 CatalogAdminUserName *string `json:"catalogAdminUserName,omitempty"` 4063 // CatalogAdminPassword - The password of the administrator user account of the catalog database. 4064 CatalogAdminPassword *SecureString `json:"catalogAdminPassword,omitempty"` 4065 // CatalogPricingTier - The pricing tier for the catalog database. The valid values could be found in https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible values include: 'IntegrationRuntimeSsisCatalogPricingTierBasic', 'IntegrationRuntimeSsisCatalogPricingTierStandard', 'IntegrationRuntimeSsisCatalogPricingTierPremium', 'IntegrationRuntimeSsisCatalogPricingTierPremiumRS' 4066 CatalogPricingTier IntegrationRuntimeSsisCatalogPricingTier `json:"catalogPricingTier,omitempty"` 4067} 4068 4069// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisCatalogInfo. 4070func (irsci IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) { 4071 objectMap := make(map[string]interface{}) 4072 if irsci.CatalogServerEndpoint != nil { 4073 objectMap["catalogServerEndpoint"] = irsci.CatalogServerEndpoint 4074 } 4075 if irsci.CatalogAdminUserName != nil { 4076 objectMap["catalogAdminUserName"] = irsci.CatalogAdminUserName 4077 } 4078 if irsci.CatalogAdminPassword != nil { 4079 objectMap["catalogAdminPassword"] = irsci.CatalogAdminPassword 4080 } 4081 if irsci.CatalogPricingTier != "" { 4082 objectMap["catalogPricingTier"] = irsci.CatalogPricingTier 4083 } 4084 for k, v := range irsci.AdditionalProperties { 4085 objectMap[k] = v 4086 } 4087 return json.Marshal(objectMap) 4088} 4089 4090// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeSsisCatalogInfo struct. 4091func (irsci *IntegrationRuntimeSsisCatalogInfo) UnmarshalJSON(body []byte) error { 4092 var m map[string]*json.RawMessage 4093 err := json.Unmarshal(body, &m) 4094 if err != nil { 4095 return err 4096 } 4097 for k, v := range m { 4098 switch k { 4099 default: 4100 if v != nil { 4101 var additionalProperties interface{} 4102 err = json.Unmarshal(*v, &additionalProperties) 4103 if err != nil { 4104 return err 4105 } 4106 if irsci.AdditionalProperties == nil { 4107 irsci.AdditionalProperties = make(map[string]interface{}) 4108 } 4109 irsci.AdditionalProperties[k] = additionalProperties 4110 } 4111 case "catalogServerEndpoint": 4112 if v != nil { 4113 var catalogServerEndpoint string 4114 err = json.Unmarshal(*v, &catalogServerEndpoint) 4115 if err != nil { 4116 return err 4117 } 4118 irsci.CatalogServerEndpoint = &catalogServerEndpoint 4119 } 4120 case "catalogAdminUserName": 4121 if v != nil { 4122 var catalogAdminUserName string 4123 err = json.Unmarshal(*v, &catalogAdminUserName) 4124 if err != nil { 4125 return err 4126 } 4127 irsci.CatalogAdminUserName = &catalogAdminUserName 4128 } 4129 case "catalogAdminPassword": 4130 if v != nil { 4131 var catalogAdminPassword SecureString 4132 err = json.Unmarshal(*v, &catalogAdminPassword) 4133 if err != nil { 4134 return err 4135 } 4136 irsci.CatalogAdminPassword = &catalogAdminPassword 4137 } 4138 case "catalogPricingTier": 4139 if v != nil { 4140 var catalogPricingTier IntegrationRuntimeSsisCatalogPricingTier 4141 err = json.Unmarshal(*v, &catalogPricingTier) 4142 if err != nil { 4143 return err 4144 } 4145 irsci.CatalogPricingTier = catalogPricingTier 4146 } 4147 } 4148 } 4149 4150 return nil 4151} 4152 4153// IntegrationRuntimeSsisProperties SSIS properties for managed integration runtime. 4154type IntegrationRuntimeSsisProperties struct { 4155 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 4156 AdditionalProperties map[string]interface{} `json:""` 4157 // CatalogInfo - Catalog information for managed dedicated integration runtime. 4158 CatalogInfo *IntegrationRuntimeSsisCatalogInfo `json:"catalogInfo,omitempty"` 4159 // LicenseType - License type for bringing your own license scenario. Possible values include: 'IntegrationRuntimeLicenseTypeBasePrice', 'IntegrationRuntimeLicenseTypeLicenseIncluded' 4160 LicenseType IntegrationRuntimeLicenseType `json:"licenseType,omitempty"` 4161 // CustomSetupScriptProperties - Custom setup script properties for a managed dedicated integration runtime. 4162 CustomSetupScriptProperties *IntegrationRuntimeCustomSetupScriptProperties `json:"customSetupScriptProperties,omitempty"` 4163 // DataProxyProperties - Data proxy properties for a managed dedicated integration runtime. 4164 DataProxyProperties *IntegrationRuntimeDataProxyProperties `json:"dataProxyProperties,omitempty"` 4165 // Edition - The edition for the SSIS Integration Runtime. Possible values include: 'IntegrationRuntimeEditionStandard', 'IntegrationRuntimeEditionEnterprise' 4166 Edition IntegrationRuntimeEdition `json:"edition,omitempty"` 4167 // ExpressCustomSetupProperties - Custom setup without script properties for a SSIS integration runtime. 4168 ExpressCustomSetupProperties *[]BasicCustomSetupBase `json:"expressCustomSetupProperties,omitempty"` 4169} 4170 4171// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisProperties. 4172func (irsp IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) { 4173 objectMap := make(map[string]interface{}) 4174 if irsp.CatalogInfo != nil { 4175 objectMap["catalogInfo"] = irsp.CatalogInfo 4176 } 4177 if irsp.LicenseType != "" { 4178 objectMap["licenseType"] = irsp.LicenseType 4179 } 4180 if irsp.CustomSetupScriptProperties != nil { 4181 objectMap["customSetupScriptProperties"] = irsp.CustomSetupScriptProperties 4182 } 4183 if irsp.DataProxyProperties != nil { 4184 objectMap["dataProxyProperties"] = irsp.DataProxyProperties 4185 } 4186 if irsp.Edition != "" { 4187 objectMap["edition"] = irsp.Edition 4188 } 4189 if irsp.ExpressCustomSetupProperties != nil { 4190 objectMap["expressCustomSetupProperties"] = irsp.ExpressCustomSetupProperties 4191 } 4192 for k, v := range irsp.AdditionalProperties { 4193 objectMap[k] = v 4194 } 4195 return json.Marshal(objectMap) 4196} 4197 4198// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeSsisProperties struct. 4199func (irsp *IntegrationRuntimeSsisProperties) UnmarshalJSON(body []byte) error { 4200 var m map[string]*json.RawMessage 4201 err := json.Unmarshal(body, &m) 4202 if err != nil { 4203 return err 4204 } 4205 for k, v := range m { 4206 switch k { 4207 default: 4208 if v != nil { 4209 var additionalProperties interface{} 4210 err = json.Unmarshal(*v, &additionalProperties) 4211 if err != nil { 4212 return err 4213 } 4214 if irsp.AdditionalProperties == nil { 4215 irsp.AdditionalProperties = make(map[string]interface{}) 4216 } 4217 irsp.AdditionalProperties[k] = additionalProperties 4218 } 4219 case "catalogInfo": 4220 if v != nil { 4221 var catalogInfo IntegrationRuntimeSsisCatalogInfo 4222 err = json.Unmarshal(*v, &catalogInfo) 4223 if err != nil { 4224 return err 4225 } 4226 irsp.CatalogInfo = &catalogInfo 4227 } 4228 case "licenseType": 4229 if v != nil { 4230 var licenseType IntegrationRuntimeLicenseType 4231 err = json.Unmarshal(*v, &licenseType) 4232 if err != nil { 4233 return err 4234 } 4235 irsp.LicenseType = licenseType 4236 } 4237 case "customSetupScriptProperties": 4238 if v != nil { 4239 var customSetupScriptProperties IntegrationRuntimeCustomSetupScriptProperties 4240 err = json.Unmarshal(*v, &customSetupScriptProperties) 4241 if err != nil { 4242 return err 4243 } 4244 irsp.CustomSetupScriptProperties = &customSetupScriptProperties 4245 } 4246 case "dataProxyProperties": 4247 if v != nil { 4248 var dataProxyProperties IntegrationRuntimeDataProxyProperties 4249 err = json.Unmarshal(*v, &dataProxyProperties) 4250 if err != nil { 4251 return err 4252 } 4253 irsp.DataProxyProperties = &dataProxyProperties 4254 } 4255 case "edition": 4256 if v != nil { 4257 var edition IntegrationRuntimeEdition 4258 err = json.Unmarshal(*v, &edition) 4259 if err != nil { 4260 return err 4261 } 4262 irsp.Edition = edition 4263 } 4264 case "expressCustomSetupProperties": 4265 if v != nil { 4266 expressCustomSetupProperties, err := unmarshalBasicCustomSetupBaseArray(*v) 4267 if err != nil { 4268 return err 4269 } 4270 irsp.ExpressCustomSetupProperties = &expressCustomSetupProperties 4271 } 4272 } 4273 } 4274 4275 return nil 4276} 4277 4278// IntegrationRuntimesStartFuture an abstraction for monitoring and retrieving the results of a 4279// long-running operation. 4280type IntegrationRuntimesStartFuture struct { 4281 azure.FutureAPI 4282 // Result returns the result of the asynchronous operation. 4283 // If the operation has not completed it will return an error. 4284 Result func(IntegrationRuntimesClient) (IntegrationRuntimeStatusResponse, error) 4285} 4286 4287// UnmarshalJSON is the custom unmarshaller for CreateFuture. 4288func (future *IntegrationRuntimesStartFuture) UnmarshalJSON(body []byte) error { 4289 var azFuture azure.Future 4290 if err := json.Unmarshal(body, &azFuture); err != nil { 4291 return err 4292 } 4293 future.FutureAPI = &azFuture 4294 future.Result = future.result 4295 return nil 4296} 4297 4298// result is the default implementation for IntegrationRuntimesStartFuture.Result. 4299func (future *IntegrationRuntimesStartFuture) result(client IntegrationRuntimesClient) (irsr IntegrationRuntimeStatusResponse, err error) { 4300 var done bool 4301 done, err = future.DoneWithContext(context.Background(), client) 4302 if err != nil { 4303 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesStartFuture", "Result", future.Response(), "Polling failure") 4304 return 4305 } 4306 if !done { 4307 irsr.Response.Response = future.Response() 4308 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesStartFuture") 4309 return 4310 } 4311 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4312 if irsr.Response.Response, err = future.GetResult(sender); err == nil && irsr.Response.Response.StatusCode != http.StatusNoContent { 4313 irsr, err = client.StartResponder(irsr.Response.Response) 4314 if err != nil { 4315 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesStartFuture", "Result", irsr.Response.Response, "Failure responding to request") 4316 } 4317 } 4318 return 4319} 4320 4321// IntegrationRuntimesStopFuture an abstraction for monitoring and retrieving the results of a long-running 4322// operation. 4323type IntegrationRuntimesStopFuture struct { 4324 azure.FutureAPI 4325 // Result returns the result of the asynchronous operation. 4326 // If the operation has not completed it will return an error. 4327 Result func(IntegrationRuntimesClient) (autorest.Response, error) 4328} 4329 4330// UnmarshalJSON is the custom unmarshaller for CreateFuture. 4331func (future *IntegrationRuntimesStopFuture) UnmarshalJSON(body []byte) error { 4332 var azFuture azure.Future 4333 if err := json.Unmarshal(body, &azFuture); err != nil { 4334 return err 4335 } 4336 future.FutureAPI = &azFuture 4337 future.Result = future.result 4338 return nil 4339} 4340 4341// result is the default implementation for IntegrationRuntimesStopFuture.Result. 4342func (future *IntegrationRuntimesStopFuture) result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { 4343 var done bool 4344 done, err = future.DoneWithContext(context.Background(), client) 4345 if err != nil { 4346 err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesStopFuture", "Result", future.Response(), "Polling failure") 4347 return 4348 } 4349 if !done { 4350 ar.Response = future.Response() 4351 err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesStopFuture") 4352 return 4353 } 4354 ar.Response = future.Response() 4355 return 4356} 4357 4358// BasicIntegrationRuntimeStatus integration runtime status. 4359type BasicIntegrationRuntimeStatus interface { 4360 AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) 4361 AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) 4362 AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) 4363} 4364 4365// IntegrationRuntimeStatus integration runtime status. 4366type IntegrationRuntimeStatus struct { 4367 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 4368 AdditionalProperties map[string]interface{} `json:""` 4369 // DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to. 4370 DataFactoryName *string `json:"dataFactoryName,omitempty"` 4371 // State - READ-ONLY; The state of integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' 4372 State IntegrationRuntimeState `json:"state,omitempty"` 4373 // Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted' 4374 Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"` 4375} 4376 4377func unmarshalBasicIntegrationRuntimeStatus(body []byte) (BasicIntegrationRuntimeStatus, error) { 4378 var m map[string]interface{} 4379 err := json.Unmarshal(body, &m) 4380 if err != nil { 4381 return nil, err 4382 } 4383 4384 switch m["type"] { 4385 case string(TypeBasicIntegrationRuntimeStatusTypeManaged): 4386 var mirs ManagedIntegrationRuntimeStatus 4387 err := json.Unmarshal(body, &mirs) 4388 return mirs, err 4389 case string(TypeBasicIntegrationRuntimeStatusTypeSelfHosted): 4390 var shirs SelfHostedIntegrationRuntimeStatus 4391 err := json.Unmarshal(body, &shirs) 4392 return shirs, err 4393 default: 4394 var irs IntegrationRuntimeStatus 4395 err := json.Unmarshal(body, &irs) 4396 return irs, err 4397 } 4398} 4399func unmarshalBasicIntegrationRuntimeStatusArray(body []byte) ([]BasicIntegrationRuntimeStatus, error) { 4400 var rawMessages []*json.RawMessage 4401 err := json.Unmarshal(body, &rawMessages) 4402 if err != nil { 4403 return nil, err 4404 } 4405 4406 irsArray := make([]BasicIntegrationRuntimeStatus, len(rawMessages)) 4407 4408 for index, rawMessage := range rawMessages { 4409 irs, err := unmarshalBasicIntegrationRuntimeStatus(*rawMessage) 4410 if err != nil { 4411 return nil, err 4412 } 4413 irsArray[index] = irs 4414 } 4415 return irsArray, nil 4416} 4417 4418// MarshalJSON is the custom marshaler for IntegrationRuntimeStatus. 4419func (irs IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { 4420 irs.Type = TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus 4421 objectMap := make(map[string]interface{}) 4422 if irs.Type != "" { 4423 objectMap["type"] = irs.Type 4424 } 4425 for k, v := range irs.AdditionalProperties { 4426 objectMap[k] = v 4427 } 4428 return json.Marshal(objectMap) 4429} 4430 4431// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. 4432func (irs IntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) { 4433 return nil, false 4434} 4435 4436// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. 4437func (irs IntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) { 4438 return nil, false 4439} 4440 4441// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. 4442func (irs IntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) { 4443 return &irs, true 4444} 4445 4446// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus. 4447func (irs IntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) { 4448 return &irs, true 4449} 4450 4451// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatus struct. 4452func (irs *IntegrationRuntimeStatus) UnmarshalJSON(body []byte) error { 4453 var m map[string]*json.RawMessage 4454 err := json.Unmarshal(body, &m) 4455 if err != nil { 4456 return err 4457 } 4458 for k, v := range m { 4459 switch k { 4460 default: 4461 if v != nil { 4462 var additionalProperties interface{} 4463 err = json.Unmarshal(*v, &additionalProperties) 4464 if err != nil { 4465 return err 4466 } 4467 if irs.AdditionalProperties == nil { 4468 irs.AdditionalProperties = make(map[string]interface{}) 4469 } 4470 irs.AdditionalProperties[k] = additionalProperties 4471 } 4472 case "dataFactoryName": 4473 if v != nil { 4474 var dataFactoryName string 4475 err = json.Unmarshal(*v, &dataFactoryName) 4476 if err != nil { 4477 return err 4478 } 4479 irs.DataFactoryName = &dataFactoryName 4480 } 4481 case "state": 4482 if v != nil { 4483 var state IntegrationRuntimeState 4484 err = json.Unmarshal(*v, &state) 4485 if err != nil { 4486 return err 4487 } 4488 irs.State = state 4489 } 4490 case "type": 4491 if v != nil { 4492 var typeVar TypeBasicIntegrationRuntimeStatus 4493 err = json.Unmarshal(*v, &typeVar) 4494 if err != nil { 4495 return err 4496 } 4497 irs.Type = typeVar 4498 } 4499 } 4500 } 4501 4502 return nil 4503} 4504 4505// IntegrationRuntimeStatusResponse integration runtime status response. 4506type IntegrationRuntimeStatusResponse struct { 4507 autorest.Response `json:"-"` 4508 // Name - READ-ONLY; The integration runtime name. 4509 Name *string `json:"name,omitempty"` 4510 // Properties - Integration runtime properties. 4511 Properties BasicIntegrationRuntimeStatus `json:"properties,omitempty"` 4512} 4513 4514// MarshalJSON is the custom marshaler for IntegrationRuntimeStatusResponse. 4515func (irsr IntegrationRuntimeStatusResponse) MarshalJSON() ([]byte, error) { 4516 objectMap := make(map[string]interface{}) 4517 objectMap["properties"] = irsr.Properties 4518 return json.Marshal(objectMap) 4519} 4520 4521// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatusResponse struct. 4522func (irsr *IntegrationRuntimeStatusResponse) UnmarshalJSON(body []byte) error { 4523 var m map[string]*json.RawMessage 4524 err := json.Unmarshal(body, &m) 4525 if err != nil { 4526 return err 4527 } 4528 for k, v := range m { 4529 switch k { 4530 case "name": 4531 if v != nil { 4532 var name string 4533 err = json.Unmarshal(*v, &name) 4534 if err != nil { 4535 return err 4536 } 4537 irsr.Name = &name 4538 } 4539 case "properties": 4540 if v != nil { 4541 properties, err := unmarshalBasicIntegrationRuntimeStatus(*v) 4542 if err != nil { 4543 return err 4544 } 4545 irsr.Properties = properties 4546 } 4547 } 4548 } 4549 4550 return nil 4551} 4552 4553// IntegrationRuntimeVNetProperties vNet properties for managed integration runtime. 4554type IntegrationRuntimeVNetProperties struct { 4555 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 4556 AdditionalProperties map[string]interface{} `json:""` 4557 // VNetID - The ID of the VNet that this integration runtime will join. 4558 VNetID *string `json:"vNetId,omitempty"` 4559 // Subnet - The name of the subnet this integration runtime will join. 4560 Subnet *string `json:"subnet,omitempty"` 4561 // PublicIPs - Resource IDs of the public IP addresses that this integration runtime will use. 4562 PublicIPs *[]string `json:"publicIPs,omitempty"` 4563 // SubnetID - The ID of subnet, to which this Azure-SSIS integration runtime will be joined. 4564 SubnetID *string `json:"subnetId,omitempty"` 4565} 4566 4567// MarshalJSON is the custom marshaler for IntegrationRuntimeVNetProperties. 4568func (irvnp IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) { 4569 objectMap := make(map[string]interface{}) 4570 if irvnp.VNetID != nil { 4571 objectMap["vNetId"] = irvnp.VNetID 4572 } 4573 if irvnp.Subnet != nil { 4574 objectMap["subnet"] = irvnp.Subnet 4575 } 4576 if irvnp.PublicIPs != nil { 4577 objectMap["publicIPs"] = irvnp.PublicIPs 4578 } 4579 if irvnp.SubnetID != nil { 4580 objectMap["subnetId"] = irvnp.SubnetID 4581 } 4582 for k, v := range irvnp.AdditionalProperties { 4583 objectMap[k] = v 4584 } 4585 return json.Marshal(objectMap) 4586} 4587 4588// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeVNetProperties struct. 4589func (irvnp *IntegrationRuntimeVNetProperties) UnmarshalJSON(body []byte) error { 4590 var m map[string]*json.RawMessage 4591 err := json.Unmarshal(body, &m) 4592 if err != nil { 4593 return err 4594 } 4595 for k, v := range m { 4596 switch k { 4597 default: 4598 if v != nil { 4599 var additionalProperties interface{} 4600 err = json.Unmarshal(*v, &additionalProperties) 4601 if err != nil { 4602 return err 4603 } 4604 if irvnp.AdditionalProperties == nil { 4605 irvnp.AdditionalProperties = make(map[string]interface{}) 4606 } 4607 irvnp.AdditionalProperties[k] = additionalProperties 4608 } 4609 case "vNetId": 4610 if v != nil { 4611 var vNetID string 4612 err = json.Unmarshal(*v, &vNetID) 4613 if err != nil { 4614 return err 4615 } 4616 irvnp.VNetID = &vNetID 4617 } 4618 case "subnet": 4619 if v != nil { 4620 var subnet string 4621 err = json.Unmarshal(*v, &subnet) 4622 if err != nil { 4623 return err 4624 } 4625 irvnp.Subnet = &subnet 4626 } 4627 case "publicIPs": 4628 if v != nil { 4629 var publicIPs []string 4630 err = json.Unmarshal(*v, &publicIPs) 4631 if err != nil { 4632 return err 4633 } 4634 irvnp.PublicIPs = &publicIPs 4635 } 4636 case "subnetId": 4637 if v != nil { 4638 var subnetID string 4639 err = json.Unmarshal(*v, &subnetID) 4640 if err != nil { 4641 return err 4642 } 4643 irvnp.SubnetID = &subnetID 4644 } 4645 } 4646 } 4647 4648 return nil 4649} 4650 4651// IPFirewallRuleInfo IP firewall rule 4652type IPFirewallRuleInfo struct { 4653 autorest.Response `json:"-"` 4654 // IPFirewallRuleProperties - IP firewall rule properties 4655 *IPFirewallRuleProperties `json:"properties,omitempty"` 4656 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 4657 ID *string `json:"id,omitempty"` 4658 // Name - READ-ONLY; The name of the resource 4659 Name *string `json:"name,omitempty"` 4660 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 4661 Type *string `json:"type,omitempty"` 4662} 4663 4664// MarshalJSON is the custom marshaler for IPFirewallRuleInfo. 4665func (ifri IPFirewallRuleInfo) MarshalJSON() ([]byte, error) { 4666 objectMap := make(map[string]interface{}) 4667 if ifri.IPFirewallRuleProperties != nil { 4668 objectMap["properties"] = ifri.IPFirewallRuleProperties 4669 } 4670 return json.Marshal(objectMap) 4671} 4672 4673// UnmarshalJSON is the custom unmarshaler for IPFirewallRuleInfo struct. 4674func (ifri *IPFirewallRuleInfo) UnmarshalJSON(body []byte) error { 4675 var m map[string]*json.RawMessage 4676 err := json.Unmarshal(body, &m) 4677 if err != nil { 4678 return err 4679 } 4680 for k, v := range m { 4681 switch k { 4682 case "properties": 4683 if v != nil { 4684 var IPFirewallRuleProperties IPFirewallRuleProperties 4685 err = json.Unmarshal(*v, &IPFirewallRuleProperties) 4686 if err != nil { 4687 return err 4688 } 4689 ifri.IPFirewallRuleProperties = &IPFirewallRuleProperties 4690 } 4691 case "id": 4692 if v != nil { 4693 var ID string 4694 err = json.Unmarshal(*v, &ID) 4695 if err != nil { 4696 return err 4697 } 4698 ifri.ID = &ID 4699 } 4700 case "name": 4701 if v != nil { 4702 var name string 4703 err = json.Unmarshal(*v, &name) 4704 if err != nil { 4705 return err 4706 } 4707 ifri.Name = &name 4708 } 4709 case "type": 4710 if v != nil { 4711 var typeVar string 4712 err = json.Unmarshal(*v, &typeVar) 4713 if err != nil { 4714 return err 4715 } 4716 ifri.Type = &typeVar 4717 } 4718 } 4719 } 4720 4721 return nil 4722} 4723 4724// IPFirewallRuleInfoListResult list of IP firewall rules 4725type IPFirewallRuleInfoListResult struct { 4726 autorest.Response `json:"-"` 4727 // NextLink - Link to next page of results 4728 NextLink *string `json:"nextLink,omitempty"` 4729 // Value - List of IP firewall rules 4730 Value *[]IPFirewallRuleInfo `json:"value,omitempty"` 4731} 4732 4733// IPFirewallRuleInfoListResultIterator provides access to a complete listing of IPFirewallRuleInfo values. 4734type IPFirewallRuleInfoListResultIterator struct { 4735 i int 4736 page IPFirewallRuleInfoListResultPage 4737} 4738 4739// NextWithContext advances to the next value. If there was an error making 4740// the request the iterator does not advance and the error is returned. 4741func (iter *IPFirewallRuleInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { 4742 if tracing.IsEnabled() { 4743 ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRuleInfoListResultIterator.NextWithContext") 4744 defer func() { 4745 sc := -1 4746 if iter.Response().Response.Response != nil { 4747 sc = iter.Response().Response.Response.StatusCode 4748 } 4749 tracing.EndSpan(ctx, sc, err) 4750 }() 4751 } 4752 iter.i++ 4753 if iter.i < len(iter.page.Values()) { 4754 return nil 4755 } 4756 err = iter.page.NextWithContext(ctx) 4757 if err != nil { 4758 iter.i-- 4759 return err 4760 } 4761 iter.i = 0 4762 return nil 4763} 4764 4765// Next advances to the next value. If there was an error making 4766// the request the iterator does not advance and the error is returned. 4767// Deprecated: Use NextWithContext() instead. 4768func (iter *IPFirewallRuleInfoListResultIterator) Next() error { 4769 return iter.NextWithContext(context.Background()) 4770} 4771 4772// NotDone returns true if the enumeration should be started or is not yet complete. 4773func (iter IPFirewallRuleInfoListResultIterator) NotDone() bool { 4774 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4775} 4776 4777// Response returns the raw server response from the last page request. 4778func (iter IPFirewallRuleInfoListResultIterator) Response() IPFirewallRuleInfoListResult { 4779 return iter.page.Response() 4780} 4781 4782// Value returns the current value or a zero-initialized value if the 4783// iterator has advanced beyond the end of the collection. 4784func (iter IPFirewallRuleInfoListResultIterator) Value() IPFirewallRuleInfo { 4785 if !iter.page.NotDone() { 4786 return IPFirewallRuleInfo{} 4787 } 4788 return iter.page.Values()[iter.i] 4789} 4790 4791// Creates a new instance of the IPFirewallRuleInfoListResultIterator type. 4792func NewIPFirewallRuleInfoListResultIterator(page IPFirewallRuleInfoListResultPage) IPFirewallRuleInfoListResultIterator { 4793 return IPFirewallRuleInfoListResultIterator{page: page} 4794} 4795 4796// IsEmpty returns true if the ListResult contains no values. 4797func (ifrilr IPFirewallRuleInfoListResult) IsEmpty() bool { 4798 return ifrilr.Value == nil || len(*ifrilr.Value) == 0 4799} 4800 4801// hasNextLink returns true if the NextLink is not empty. 4802func (ifrilr IPFirewallRuleInfoListResult) hasNextLink() bool { 4803 return ifrilr.NextLink != nil && len(*ifrilr.NextLink) != 0 4804} 4805 4806// iPFirewallRuleInfoListResultPreparer prepares a request to retrieve the next set of results. 4807// It returns nil if no more results exist. 4808func (ifrilr IPFirewallRuleInfoListResult) iPFirewallRuleInfoListResultPreparer(ctx context.Context) (*http.Request, error) { 4809 if !ifrilr.hasNextLink() { 4810 return nil, nil 4811 } 4812 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4813 autorest.AsJSON(), 4814 autorest.AsGet(), 4815 autorest.WithBaseURL(to.String(ifrilr.NextLink))) 4816} 4817 4818// IPFirewallRuleInfoListResultPage contains a page of IPFirewallRuleInfo values. 4819type IPFirewallRuleInfoListResultPage struct { 4820 fn func(context.Context, IPFirewallRuleInfoListResult) (IPFirewallRuleInfoListResult, error) 4821 ifrilr IPFirewallRuleInfoListResult 4822} 4823 4824// NextWithContext advances to the next page of values. If there was an error making 4825// the request the page does not advance and the error is returned. 4826func (page *IPFirewallRuleInfoListResultPage) NextWithContext(ctx context.Context) (err error) { 4827 if tracing.IsEnabled() { 4828 ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRuleInfoListResultPage.NextWithContext") 4829 defer func() { 4830 sc := -1 4831 if page.Response().Response.Response != nil { 4832 sc = page.Response().Response.Response.StatusCode 4833 } 4834 tracing.EndSpan(ctx, sc, err) 4835 }() 4836 } 4837 for { 4838 next, err := page.fn(ctx, page.ifrilr) 4839 if err != nil { 4840 return err 4841 } 4842 page.ifrilr = next 4843 if !next.hasNextLink() || !next.IsEmpty() { 4844 break 4845 } 4846 } 4847 return nil 4848} 4849 4850// Next advances to the next page of values. If there was an error making 4851// the request the page does not advance and the error is returned. 4852// Deprecated: Use NextWithContext() instead. 4853func (page *IPFirewallRuleInfoListResultPage) Next() error { 4854 return page.NextWithContext(context.Background()) 4855} 4856 4857// NotDone returns true if the page enumeration should be started or is not yet complete. 4858func (page IPFirewallRuleInfoListResultPage) NotDone() bool { 4859 return !page.ifrilr.IsEmpty() 4860} 4861 4862// Response returns the raw server response from the last page request. 4863func (page IPFirewallRuleInfoListResultPage) Response() IPFirewallRuleInfoListResult { 4864 return page.ifrilr 4865} 4866 4867// Values returns the slice of values for the current page or nil if there are no values. 4868func (page IPFirewallRuleInfoListResultPage) Values() []IPFirewallRuleInfo { 4869 if page.ifrilr.IsEmpty() { 4870 return nil 4871 } 4872 return *page.ifrilr.Value 4873} 4874 4875// Creates a new instance of the IPFirewallRuleInfoListResultPage type. 4876func NewIPFirewallRuleInfoListResultPage(cur IPFirewallRuleInfoListResult, getNextPage func(context.Context, IPFirewallRuleInfoListResult) (IPFirewallRuleInfoListResult, error)) IPFirewallRuleInfoListResultPage { 4877 return IPFirewallRuleInfoListResultPage{ 4878 fn: getNextPage, 4879 ifrilr: cur, 4880 } 4881} 4882 4883// IPFirewallRuleProperties IP firewall rule properties 4884type IPFirewallRuleProperties struct { 4885 // EndIPAddress - The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress 4886 EndIPAddress *string `json:"endIpAddress,omitempty"` 4887 // ProvisioningState - READ-ONLY; Resource provisioning state. Possible values include: 'ProvisioningStateProvisioning', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateFailed', 'ProvisioningStateDeleteError' 4888 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 4889 // StartIPAddress - The start IP address of the firewall rule. Must be IPv4 format 4890 StartIPAddress *string `json:"startIpAddress,omitempty"` 4891} 4892 4893// MarshalJSON is the custom marshaler for IPFirewallRuleProperties. 4894func (ifrp IPFirewallRuleProperties) MarshalJSON() ([]byte, error) { 4895 objectMap := make(map[string]interface{}) 4896 if ifrp.EndIPAddress != nil { 4897 objectMap["endIpAddress"] = ifrp.EndIPAddress 4898 } 4899 if ifrp.StartIPAddress != nil { 4900 objectMap["startIpAddress"] = ifrp.StartIPAddress 4901 } 4902 return json.Marshal(objectMap) 4903} 4904 4905// IPFirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 4906// long-running operation. 4907type IPFirewallRulesCreateOrUpdateFuture struct { 4908 azure.FutureAPI 4909 // Result returns the result of the asynchronous operation. 4910 // If the operation has not completed it will return an error. 4911 Result func(IPFirewallRulesClient) (IPFirewallRuleInfo, error) 4912} 4913 4914// UnmarshalJSON is the custom unmarshaller for CreateFuture. 4915func (future *IPFirewallRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 4916 var azFuture azure.Future 4917 if err := json.Unmarshal(body, &azFuture); err != nil { 4918 return err 4919 } 4920 future.FutureAPI = &azFuture 4921 future.Result = future.result 4922 return nil 4923} 4924 4925// result is the default implementation for IPFirewallRulesCreateOrUpdateFuture.Result. 4926func (future *IPFirewallRulesCreateOrUpdateFuture) result(client IPFirewallRulesClient) (ifri IPFirewallRuleInfo, err error) { 4927 var done bool 4928 done, err = future.DoneWithContext(context.Background(), client) 4929 if err != nil { 4930 err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 4931 return 4932 } 4933 if !done { 4934 ifri.Response.Response = future.Response() 4935 err = azure.NewAsyncOpIncompleteError("synapse.IPFirewallRulesCreateOrUpdateFuture") 4936 return 4937 } 4938 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4939 if ifri.Response.Response, err = future.GetResult(sender); err == nil && ifri.Response.Response.StatusCode != http.StatusNoContent { 4940 ifri, err = client.CreateOrUpdateResponder(ifri.Response.Response) 4941 if err != nil { 4942 err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesCreateOrUpdateFuture", "Result", ifri.Response.Response, "Failure responding to request") 4943 } 4944 } 4945 return 4946} 4947 4948// IPFirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 4949// operation. 4950type IPFirewallRulesDeleteFuture struct { 4951 azure.FutureAPI 4952 // Result returns the result of the asynchronous operation. 4953 // If the operation has not completed it will return an error. 4954 Result func(IPFirewallRulesClient) (SetObject, error) 4955} 4956 4957// UnmarshalJSON is the custom unmarshaller for CreateFuture. 4958func (future *IPFirewallRulesDeleteFuture) UnmarshalJSON(body []byte) error { 4959 var azFuture azure.Future 4960 if err := json.Unmarshal(body, &azFuture); err != nil { 4961 return err 4962 } 4963 future.FutureAPI = &azFuture 4964 future.Result = future.result 4965 return nil 4966} 4967 4968// result is the default implementation for IPFirewallRulesDeleteFuture.Result. 4969func (future *IPFirewallRulesDeleteFuture) result(client IPFirewallRulesClient) (so SetObject, err error) { 4970 var done bool 4971 done, err = future.DoneWithContext(context.Background(), client) 4972 if err != nil { 4973 err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesDeleteFuture", "Result", future.Response(), "Polling failure") 4974 return 4975 } 4976 if !done { 4977 so.Response.Response = future.Response() 4978 err = azure.NewAsyncOpIncompleteError("synapse.IPFirewallRulesDeleteFuture") 4979 return 4980 } 4981 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4982 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 4983 so, err = client.DeleteResponder(so.Response.Response) 4984 if err != nil { 4985 err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesDeleteFuture", "Result", so.Response.Response, "Failure responding to request") 4986 } 4987 } 4988 return 4989} 4990 4991// IPFirewallRulesReplaceAllFuture an abstraction for monitoring and retrieving the results of a 4992// long-running operation. 4993type IPFirewallRulesReplaceAllFuture struct { 4994 azure.FutureAPI 4995 // Result returns the result of the asynchronous operation. 4996 // If the operation has not completed it will return an error. 4997 Result func(IPFirewallRulesClient) (ReplaceAllFirewallRulesOperationResponse, error) 4998} 4999 5000// UnmarshalJSON is the custom unmarshaller for CreateFuture. 5001func (future *IPFirewallRulesReplaceAllFuture) UnmarshalJSON(body []byte) error { 5002 var azFuture azure.Future 5003 if err := json.Unmarshal(body, &azFuture); err != nil { 5004 return err 5005 } 5006 future.FutureAPI = &azFuture 5007 future.Result = future.result 5008 return nil 5009} 5010 5011// result is the default implementation for IPFirewallRulesReplaceAllFuture.Result. 5012func (future *IPFirewallRulesReplaceAllFuture) result(client IPFirewallRulesClient) (rafror ReplaceAllFirewallRulesOperationResponse, err error) { 5013 var done bool 5014 done, err = future.DoneWithContext(context.Background(), client) 5015 if err != nil { 5016 err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesReplaceAllFuture", "Result", future.Response(), "Polling failure") 5017 return 5018 } 5019 if !done { 5020 rafror.Response.Response = future.Response() 5021 err = azure.NewAsyncOpIncompleteError("synapse.IPFirewallRulesReplaceAllFuture") 5022 return 5023 } 5024 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5025 if rafror.Response.Response, err = future.GetResult(sender); err == nil && rafror.Response.Response.StatusCode != http.StatusNoContent { 5026 rafror, err = client.ReplaceAllResponder(rafror.Response.Response) 5027 if err != nil { 5028 err = autorest.NewErrorWithError(err, "synapse.IPFirewallRulesReplaceAllFuture", "Result", rafror.Response.Response, "Failure responding to request") 5029 } 5030 } 5031 return 5032} 5033 5034// KekIdentityProperties key encryption key properties 5035type KekIdentityProperties struct { 5036 // UserAssignedIdentity - User assigned identity resource Id 5037 UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` 5038 // UseSystemAssignedIdentity - Boolean specifying whether to use system assigned identity or not 5039 UseSystemAssignedIdentity interface{} `json:"useSystemAssignedIdentity,omitempty"` 5040} 5041 5042// Key a workspace key 5043type Key struct { 5044 autorest.Response `json:"-"` 5045 // KeyProperties - Keys resource properties 5046 *KeyProperties `json:"properties,omitempty"` 5047 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 5048 ID *string `json:"id,omitempty"` 5049 // Name - READ-ONLY; The name of the resource 5050 Name *string `json:"name,omitempty"` 5051 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 5052 Type *string `json:"type,omitempty"` 5053} 5054 5055// MarshalJSON is the custom marshaler for Key. 5056func (kVar Key) MarshalJSON() ([]byte, error) { 5057 objectMap := make(map[string]interface{}) 5058 if kVar.KeyProperties != nil { 5059 objectMap["properties"] = kVar.KeyProperties 5060 } 5061 return json.Marshal(objectMap) 5062} 5063 5064// UnmarshalJSON is the custom unmarshaler for Key struct. 5065func (kVar *Key) UnmarshalJSON(body []byte) error { 5066 var m map[string]*json.RawMessage 5067 err := json.Unmarshal(body, &m) 5068 if err != nil { 5069 return err 5070 } 5071 for k, v := range m { 5072 switch k { 5073 case "properties": 5074 if v != nil { 5075 var keyProperties KeyProperties 5076 err = json.Unmarshal(*v, &keyProperties) 5077 if err != nil { 5078 return err 5079 } 5080 kVar.KeyProperties = &keyProperties 5081 } 5082 case "id": 5083 if v != nil { 5084 var ID string 5085 err = json.Unmarshal(*v, &ID) 5086 if err != nil { 5087 return err 5088 } 5089 kVar.ID = &ID 5090 } 5091 case "name": 5092 if v != nil { 5093 var name string 5094 err = json.Unmarshal(*v, &name) 5095 if err != nil { 5096 return err 5097 } 5098 kVar.Name = &name 5099 } 5100 case "type": 5101 if v != nil { 5102 var typeVar string 5103 err = json.Unmarshal(*v, &typeVar) 5104 if err != nil { 5105 return err 5106 } 5107 kVar.Type = &typeVar 5108 } 5109 } 5110 } 5111 5112 return nil 5113} 5114 5115// KeyInfoListResult list of keys 5116type KeyInfoListResult struct { 5117 autorest.Response `json:"-"` 5118 // NextLink - Link to the next page of results 5119 NextLink *string `json:"nextLink,omitempty"` 5120 // Value - List of keys 5121 Value *[]Key `json:"value,omitempty"` 5122} 5123 5124// KeyInfoListResultIterator provides access to a complete listing of Key values. 5125type KeyInfoListResultIterator struct { 5126 i int 5127 page KeyInfoListResultPage 5128} 5129 5130// NextWithContext advances to the next value. If there was an error making 5131// the request the iterator does not advance and the error is returned. 5132func (iter *KeyInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { 5133 if tracing.IsEnabled() { 5134 ctx = tracing.StartSpan(ctx, fqdn+"/KeyInfoListResultIterator.NextWithContext") 5135 defer func() { 5136 sc := -1 5137 if iter.Response().Response.Response != nil { 5138 sc = iter.Response().Response.Response.StatusCode 5139 } 5140 tracing.EndSpan(ctx, sc, err) 5141 }() 5142 } 5143 iter.i++ 5144 if iter.i < len(iter.page.Values()) { 5145 return nil 5146 } 5147 err = iter.page.NextWithContext(ctx) 5148 if err != nil { 5149 iter.i-- 5150 return err 5151 } 5152 iter.i = 0 5153 return nil 5154} 5155 5156// Next advances to the next value. If there was an error making 5157// the request the iterator does not advance and the error is returned. 5158// Deprecated: Use NextWithContext() instead. 5159func (iter *KeyInfoListResultIterator) Next() error { 5160 return iter.NextWithContext(context.Background()) 5161} 5162 5163// NotDone returns true if the enumeration should be started or is not yet complete. 5164func (iter KeyInfoListResultIterator) NotDone() bool { 5165 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5166} 5167 5168// Response returns the raw server response from the last page request. 5169func (iter KeyInfoListResultIterator) Response() KeyInfoListResult { 5170 return iter.page.Response() 5171} 5172 5173// Value returns the current value or a zero-initialized value if the 5174// iterator has advanced beyond the end of the collection. 5175func (iter KeyInfoListResultIterator) Value() Key { 5176 if !iter.page.NotDone() { 5177 return Key{} 5178 } 5179 return iter.page.Values()[iter.i] 5180} 5181 5182// Creates a new instance of the KeyInfoListResultIterator type. 5183func NewKeyInfoListResultIterator(page KeyInfoListResultPage) KeyInfoListResultIterator { 5184 return KeyInfoListResultIterator{page: page} 5185} 5186 5187// IsEmpty returns true if the ListResult contains no values. 5188func (kilr KeyInfoListResult) IsEmpty() bool { 5189 return kilr.Value == nil || len(*kilr.Value) == 0 5190} 5191 5192// hasNextLink returns true if the NextLink is not empty. 5193func (kilr KeyInfoListResult) hasNextLink() bool { 5194 return kilr.NextLink != nil && len(*kilr.NextLink) != 0 5195} 5196 5197// keyInfoListResultPreparer prepares a request to retrieve the next set of results. 5198// It returns nil if no more results exist. 5199func (kilr KeyInfoListResult) keyInfoListResultPreparer(ctx context.Context) (*http.Request, error) { 5200 if !kilr.hasNextLink() { 5201 return nil, nil 5202 } 5203 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5204 autorest.AsJSON(), 5205 autorest.AsGet(), 5206 autorest.WithBaseURL(to.String(kilr.NextLink))) 5207} 5208 5209// KeyInfoListResultPage contains a page of Key values. 5210type KeyInfoListResultPage struct { 5211 fn func(context.Context, KeyInfoListResult) (KeyInfoListResult, error) 5212 kilr KeyInfoListResult 5213} 5214 5215// NextWithContext advances to the next page of values. If there was an error making 5216// the request the page does not advance and the error is returned. 5217func (page *KeyInfoListResultPage) NextWithContext(ctx context.Context) (err error) { 5218 if tracing.IsEnabled() { 5219 ctx = tracing.StartSpan(ctx, fqdn+"/KeyInfoListResultPage.NextWithContext") 5220 defer func() { 5221 sc := -1 5222 if page.Response().Response.Response != nil { 5223 sc = page.Response().Response.Response.StatusCode 5224 } 5225 tracing.EndSpan(ctx, sc, err) 5226 }() 5227 } 5228 for { 5229 next, err := page.fn(ctx, page.kilr) 5230 if err != nil { 5231 return err 5232 } 5233 page.kilr = next 5234 if !next.hasNextLink() || !next.IsEmpty() { 5235 break 5236 } 5237 } 5238 return nil 5239} 5240 5241// Next advances to the next page of values. If there was an error making 5242// the request the page does not advance and the error is returned. 5243// Deprecated: Use NextWithContext() instead. 5244func (page *KeyInfoListResultPage) Next() error { 5245 return page.NextWithContext(context.Background()) 5246} 5247 5248// NotDone returns true if the page enumeration should be started or is not yet complete. 5249func (page KeyInfoListResultPage) NotDone() bool { 5250 return !page.kilr.IsEmpty() 5251} 5252 5253// Response returns the raw server response from the last page request. 5254func (page KeyInfoListResultPage) Response() KeyInfoListResult { 5255 return page.kilr 5256} 5257 5258// Values returns the slice of values for the current page or nil if there are no values. 5259func (page KeyInfoListResultPage) Values() []Key { 5260 if page.kilr.IsEmpty() { 5261 return nil 5262 } 5263 return *page.kilr.Value 5264} 5265 5266// Creates a new instance of the KeyInfoListResultPage type. 5267func NewKeyInfoListResultPage(cur KeyInfoListResult, getNextPage func(context.Context, KeyInfoListResult) (KeyInfoListResult, error)) KeyInfoListResultPage { 5268 return KeyInfoListResultPage{ 5269 fn: getNextPage, 5270 kilr: cur, 5271 } 5272} 5273 5274// KeyProperties key properties 5275type KeyProperties struct { 5276 // IsActiveCMK - Used to activate the workspace after a customer managed key is provided. 5277 IsActiveCMK *bool `json:"isActiveCMK,omitempty"` 5278 // KeyVaultURL - The Key Vault Url of the workspace key. 5279 KeyVaultURL *string `json:"keyVaultUrl,omitempty"` 5280} 5281 5282// LibraryInfo library/package information of a Big Data pool powered by Apache Spark 5283type LibraryInfo struct { 5284 // Name - Name of the library. 5285 Name *string `json:"name,omitempty"` 5286 // Path - Storage blob path of library. 5287 Path *string `json:"path,omitempty"` 5288 // ContainerName - Storage blob container name. 5289 ContainerName *string `json:"containerName,omitempty"` 5290 // UploadedTimestamp - READ-ONLY; The last update time of the library. 5291 UploadedTimestamp *date.Time `json:"uploadedTimestamp,omitempty"` 5292 // Type - Type of the library. 5293 Type *string `json:"type,omitempty"` 5294 // ProvisioningStatus - READ-ONLY; Provisioning status of the library/package. 5295 ProvisioningStatus *string `json:"provisioningStatus,omitempty"` 5296 // CreatorID - READ-ONLY; Creator Id of the library/package. 5297 CreatorID *string `json:"creatorId,omitempty"` 5298} 5299 5300// MarshalJSON is the custom marshaler for LibraryInfo. 5301func (li LibraryInfo) MarshalJSON() ([]byte, error) { 5302 objectMap := make(map[string]interface{}) 5303 if li.Name != nil { 5304 objectMap["name"] = li.Name 5305 } 5306 if li.Path != nil { 5307 objectMap["path"] = li.Path 5308 } 5309 if li.ContainerName != nil { 5310 objectMap["containerName"] = li.ContainerName 5311 } 5312 if li.Type != nil { 5313 objectMap["type"] = li.Type 5314 } 5315 return json.Marshal(objectMap) 5316} 5317 5318// LibraryListResponse a list of Library resources. 5319type LibraryListResponse struct { 5320 autorest.Response `json:"-"` 5321 // Value - List of Library. 5322 Value *[]LibraryResource `json:"value,omitempty"` 5323 // NextLink - The link to the next page of results, if any remaining results exist. 5324 NextLink *string `json:"nextLink,omitempty"` 5325} 5326 5327// LibraryListResponseIterator provides access to a complete listing of LibraryResource values. 5328type LibraryListResponseIterator struct { 5329 i int 5330 page LibraryListResponsePage 5331} 5332 5333// NextWithContext advances to the next value. If there was an error making 5334// the request the iterator does not advance and the error is returned. 5335func (iter *LibraryListResponseIterator) NextWithContext(ctx context.Context) (err error) { 5336 if tracing.IsEnabled() { 5337 ctx = tracing.StartSpan(ctx, fqdn+"/LibraryListResponseIterator.NextWithContext") 5338 defer func() { 5339 sc := -1 5340 if iter.Response().Response.Response != nil { 5341 sc = iter.Response().Response.Response.StatusCode 5342 } 5343 tracing.EndSpan(ctx, sc, err) 5344 }() 5345 } 5346 iter.i++ 5347 if iter.i < len(iter.page.Values()) { 5348 return nil 5349 } 5350 err = iter.page.NextWithContext(ctx) 5351 if err != nil { 5352 iter.i-- 5353 return err 5354 } 5355 iter.i = 0 5356 return nil 5357} 5358 5359// Next advances to the next value. If there was an error making 5360// the request the iterator does not advance and the error is returned. 5361// Deprecated: Use NextWithContext() instead. 5362func (iter *LibraryListResponseIterator) Next() error { 5363 return iter.NextWithContext(context.Background()) 5364} 5365 5366// NotDone returns true if the enumeration should be started or is not yet complete. 5367func (iter LibraryListResponseIterator) NotDone() bool { 5368 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5369} 5370 5371// Response returns the raw server response from the last page request. 5372func (iter LibraryListResponseIterator) Response() LibraryListResponse { 5373 return iter.page.Response() 5374} 5375 5376// Value returns the current value or a zero-initialized value if the 5377// iterator has advanced beyond the end of the collection. 5378func (iter LibraryListResponseIterator) Value() LibraryResource { 5379 if !iter.page.NotDone() { 5380 return LibraryResource{} 5381 } 5382 return iter.page.Values()[iter.i] 5383} 5384 5385// Creates a new instance of the LibraryListResponseIterator type. 5386func NewLibraryListResponseIterator(page LibraryListResponsePage) LibraryListResponseIterator { 5387 return LibraryListResponseIterator{page: page} 5388} 5389 5390// IsEmpty returns true if the ListResult contains no values. 5391func (llr LibraryListResponse) IsEmpty() bool { 5392 return llr.Value == nil || len(*llr.Value) == 0 5393} 5394 5395// hasNextLink returns true if the NextLink is not empty. 5396func (llr LibraryListResponse) hasNextLink() bool { 5397 return llr.NextLink != nil && len(*llr.NextLink) != 0 5398} 5399 5400// libraryListResponsePreparer prepares a request to retrieve the next set of results. 5401// It returns nil if no more results exist. 5402func (llr LibraryListResponse) libraryListResponsePreparer(ctx context.Context) (*http.Request, error) { 5403 if !llr.hasNextLink() { 5404 return nil, nil 5405 } 5406 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5407 autorest.AsJSON(), 5408 autorest.AsGet(), 5409 autorest.WithBaseURL(to.String(llr.NextLink))) 5410} 5411 5412// LibraryListResponsePage contains a page of LibraryResource values. 5413type LibraryListResponsePage struct { 5414 fn func(context.Context, LibraryListResponse) (LibraryListResponse, error) 5415 llr LibraryListResponse 5416} 5417 5418// NextWithContext advances to the next page of values. If there was an error making 5419// the request the page does not advance and the error is returned. 5420func (page *LibraryListResponsePage) NextWithContext(ctx context.Context) (err error) { 5421 if tracing.IsEnabled() { 5422 ctx = tracing.StartSpan(ctx, fqdn+"/LibraryListResponsePage.NextWithContext") 5423 defer func() { 5424 sc := -1 5425 if page.Response().Response.Response != nil { 5426 sc = page.Response().Response.Response.StatusCode 5427 } 5428 tracing.EndSpan(ctx, sc, err) 5429 }() 5430 } 5431 for { 5432 next, err := page.fn(ctx, page.llr) 5433 if err != nil { 5434 return err 5435 } 5436 page.llr = next 5437 if !next.hasNextLink() || !next.IsEmpty() { 5438 break 5439 } 5440 } 5441 return nil 5442} 5443 5444// Next advances to the next page of values. If there was an error making 5445// the request the page does not advance and the error is returned. 5446// Deprecated: Use NextWithContext() instead. 5447func (page *LibraryListResponsePage) Next() error { 5448 return page.NextWithContext(context.Background()) 5449} 5450 5451// NotDone returns true if the page enumeration should be started or is not yet complete. 5452func (page LibraryListResponsePage) NotDone() bool { 5453 return !page.llr.IsEmpty() 5454} 5455 5456// Response returns the raw server response from the last page request. 5457func (page LibraryListResponsePage) Response() LibraryListResponse { 5458 return page.llr 5459} 5460 5461// Values returns the slice of values for the current page or nil if there are no values. 5462func (page LibraryListResponsePage) Values() []LibraryResource { 5463 if page.llr.IsEmpty() { 5464 return nil 5465 } 5466 return *page.llr.Value 5467} 5468 5469// Creates a new instance of the LibraryListResponsePage type. 5470func NewLibraryListResponsePage(cur LibraryListResponse, getNextPage func(context.Context, LibraryListResponse) (LibraryListResponse, error)) LibraryListResponsePage { 5471 return LibraryListResponsePage{ 5472 fn: getNextPage, 5473 llr: cur, 5474 } 5475} 5476 5477// LibraryRequirements library requirements for a Big Data pool powered by Apache Spark 5478type LibraryRequirements struct { 5479 // Time - READ-ONLY; The last update time of the library requirements file. 5480 Time *date.Time `json:"time,omitempty"` 5481 // Content - The library requirements. 5482 Content *string `json:"content,omitempty"` 5483 // Filename - The filename of the library requirements file. 5484 Filename *string `json:"filename,omitempty"` 5485} 5486 5487// MarshalJSON is the custom marshaler for LibraryRequirements. 5488func (lr LibraryRequirements) MarshalJSON() ([]byte, error) { 5489 objectMap := make(map[string]interface{}) 5490 if lr.Content != nil { 5491 objectMap["content"] = lr.Content 5492 } 5493 if lr.Filename != nil { 5494 objectMap["filename"] = lr.Filename 5495 } 5496 return json.Marshal(objectMap) 5497} 5498 5499// LibraryResource library response details 5500type LibraryResource struct { 5501 autorest.Response `json:"-"` 5502 // LibraryInfo - Library/package properties. 5503 *LibraryInfo `json:"properties,omitempty"` 5504 // Etag - READ-ONLY; Resource Etag. 5505 Etag *string `json:"etag,omitempty"` 5506 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 5507 ID *string `json:"id,omitempty"` 5508 // Name - READ-ONLY; The name of the resource 5509 Name *string `json:"name,omitempty"` 5510 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 5511 Type *string `json:"type,omitempty"` 5512} 5513 5514// MarshalJSON is the custom marshaler for LibraryResource. 5515func (lr LibraryResource) MarshalJSON() ([]byte, error) { 5516 objectMap := make(map[string]interface{}) 5517 if lr.LibraryInfo != nil { 5518 objectMap["properties"] = lr.LibraryInfo 5519 } 5520 return json.Marshal(objectMap) 5521} 5522 5523// UnmarshalJSON is the custom unmarshaler for LibraryResource struct. 5524func (lr *LibraryResource) UnmarshalJSON(body []byte) error { 5525 var m map[string]*json.RawMessage 5526 err := json.Unmarshal(body, &m) 5527 if err != nil { 5528 return err 5529 } 5530 for k, v := range m { 5531 switch k { 5532 case "properties": 5533 if v != nil { 5534 var libraryInfo LibraryInfo 5535 err = json.Unmarshal(*v, &libraryInfo) 5536 if err != nil { 5537 return err 5538 } 5539 lr.LibraryInfo = &libraryInfo 5540 } 5541 case "etag": 5542 if v != nil { 5543 var etag string 5544 err = json.Unmarshal(*v, &etag) 5545 if err != nil { 5546 return err 5547 } 5548 lr.Etag = &etag 5549 } 5550 case "id": 5551 if v != nil { 5552 var ID string 5553 err = json.Unmarshal(*v, &ID) 5554 if err != nil { 5555 return err 5556 } 5557 lr.ID = &ID 5558 } 5559 case "name": 5560 if v != nil { 5561 var name string 5562 err = json.Unmarshal(*v, &name) 5563 if err != nil { 5564 return err 5565 } 5566 lr.Name = &name 5567 } 5568 case "type": 5569 if v != nil { 5570 var typeVar string 5571 err = json.Unmarshal(*v, &typeVar) 5572 if err != nil { 5573 return err 5574 } 5575 lr.Type = &typeVar 5576 } 5577 } 5578 } 5579 5580 return nil 5581} 5582 5583// LicensedComponentSetupTypeProperties installation of licensed component setup type properties. 5584type LicensedComponentSetupTypeProperties struct { 5585 // ComponentName - The name of the 3rd party component. 5586 ComponentName *string `json:"componentName,omitempty"` 5587 // LicenseKey - The license key to activate the component. 5588 LicenseKey BasicSecretBase `json:"licenseKey,omitempty"` 5589} 5590 5591// UnmarshalJSON is the custom unmarshaler for LicensedComponentSetupTypeProperties struct. 5592func (lcstp *LicensedComponentSetupTypeProperties) UnmarshalJSON(body []byte) error { 5593 var m map[string]*json.RawMessage 5594 err := json.Unmarshal(body, &m) 5595 if err != nil { 5596 return err 5597 } 5598 for k, v := range m { 5599 switch k { 5600 case "componentName": 5601 if v != nil { 5602 var componentName string 5603 err = json.Unmarshal(*v, &componentName) 5604 if err != nil { 5605 return err 5606 } 5607 lcstp.ComponentName = &componentName 5608 } 5609 case "licenseKey": 5610 if v != nil { 5611 licenseKey, err := unmarshalBasicSecretBase(*v) 5612 if err != nil { 5613 return err 5614 } 5615 lcstp.LicenseKey = licenseKey 5616 } 5617 } 5618 } 5619 5620 return nil 5621} 5622 5623// LinkedIntegrationRuntime the linked integration runtime information. 5624type LinkedIntegrationRuntime struct { 5625 // Name - READ-ONLY; The name of the linked integration runtime. 5626 Name *string `json:"name,omitempty"` 5627 // SubscriptionID - READ-ONLY; The subscription ID for which the linked integration runtime belong to. 5628 SubscriptionID *string `json:"subscriptionId,omitempty"` 5629 // DataFactoryName - READ-ONLY; The name of the workspace for which the linked integration runtime belong to. 5630 DataFactoryName *string `json:"dataFactoryName,omitempty"` 5631 // DataFactoryLocation - READ-ONLY; The location of the workspace for which the linked integration runtime belong to. 5632 DataFactoryLocation *string `json:"dataFactoryLocation,omitempty"` 5633 // CreateTime - READ-ONLY; The creating time of the linked integration runtime. 5634 CreateTime *date.Time `json:"createTime,omitempty"` 5635} 5636 5637// MarshalJSON is the custom marshaler for LinkedIntegrationRuntime. 5638func (lir LinkedIntegrationRuntime) MarshalJSON() ([]byte, error) { 5639 objectMap := make(map[string]interface{}) 5640 return json.Marshal(objectMap) 5641} 5642 5643// LinkedIntegrationRuntimeKeyAuthorization the key authorization type integration runtime. 5644type LinkedIntegrationRuntimeKeyAuthorization struct { 5645 // Key - The key used for authorization. 5646 Key *SecureString `json:"key,omitempty"` 5647 // AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC' 5648 AuthorizationType AuthorizationType `json:"authorizationType,omitempty"` 5649} 5650 5651// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeKeyAuthorization. 5652func (lirka LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) { 5653 lirka.AuthorizationType = AuthorizationTypeKey 5654 objectMap := make(map[string]interface{}) 5655 if lirka.Key != nil { 5656 objectMap["key"] = lirka.Key 5657 } 5658 if lirka.AuthorizationType != "" { 5659 objectMap["authorizationType"] = lirka.AuthorizationType 5660 } 5661 return json.Marshal(objectMap) 5662} 5663 5664// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. 5665func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) { 5666 return &lirka, true 5667} 5668 5669// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. 5670func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) { 5671 return nil, false 5672} 5673 5674// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. 5675func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) { 5676 return nil, false 5677} 5678 5679// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization. 5680func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) { 5681 return &lirka, true 5682} 5683 5684// LinkedIntegrationRuntimeRbacAuthorization the role based access control (RBAC) authorization type 5685// integration runtime. 5686type LinkedIntegrationRuntimeRbacAuthorization struct { 5687 // ResourceID - The resource identifier of the integration runtime to be shared. 5688 ResourceID *string `json:"resourceId,omitempty"` 5689 // AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC' 5690 AuthorizationType AuthorizationType `json:"authorizationType,omitempty"` 5691} 5692 5693// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeRbacAuthorization. 5694func (lirra LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) { 5695 lirra.AuthorizationType = AuthorizationTypeRBAC 5696 objectMap := make(map[string]interface{}) 5697 if lirra.ResourceID != nil { 5698 objectMap["resourceId"] = lirra.ResourceID 5699 } 5700 if lirra.AuthorizationType != "" { 5701 objectMap["authorizationType"] = lirra.AuthorizationType 5702 } 5703 return json.Marshal(objectMap) 5704} 5705 5706// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. 5707func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) { 5708 return nil, false 5709} 5710 5711// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. 5712func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) { 5713 return &lirra, true 5714} 5715 5716// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. 5717func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) { 5718 return nil, false 5719} 5720 5721// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization. 5722func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) { 5723 return &lirra, true 5724} 5725 5726// BasicLinkedIntegrationRuntimeType the base definition of a linked integration runtime. 5727type BasicLinkedIntegrationRuntimeType interface { 5728 AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) 5729 AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) 5730 AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) 5731} 5732 5733// LinkedIntegrationRuntimeType the base definition of a linked integration runtime. 5734type LinkedIntegrationRuntimeType struct { 5735 // AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC' 5736 AuthorizationType AuthorizationType `json:"authorizationType,omitempty"` 5737} 5738 5739func unmarshalBasicLinkedIntegrationRuntimeType(body []byte) (BasicLinkedIntegrationRuntimeType, error) { 5740 var m map[string]interface{} 5741 err := json.Unmarshal(body, &m) 5742 if err != nil { 5743 return nil, err 5744 } 5745 5746 switch m["authorizationType"] { 5747 case string(AuthorizationTypeKey): 5748 var lirka LinkedIntegrationRuntimeKeyAuthorization 5749 err := json.Unmarshal(body, &lirka) 5750 return lirka, err 5751 case string(AuthorizationTypeRBAC): 5752 var lirra LinkedIntegrationRuntimeRbacAuthorization 5753 err := json.Unmarshal(body, &lirra) 5754 return lirra, err 5755 default: 5756 var lirt LinkedIntegrationRuntimeType 5757 err := json.Unmarshal(body, &lirt) 5758 return lirt, err 5759 } 5760} 5761func unmarshalBasicLinkedIntegrationRuntimeTypeArray(body []byte) ([]BasicLinkedIntegrationRuntimeType, error) { 5762 var rawMessages []*json.RawMessage 5763 err := json.Unmarshal(body, &rawMessages) 5764 if err != nil { 5765 return nil, err 5766 } 5767 5768 lirtArray := make([]BasicLinkedIntegrationRuntimeType, len(rawMessages)) 5769 5770 for index, rawMessage := range rawMessages { 5771 lirt, err := unmarshalBasicLinkedIntegrationRuntimeType(*rawMessage) 5772 if err != nil { 5773 return nil, err 5774 } 5775 lirtArray[index] = lirt 5776 } 5777 return lirtArray, nil 5778} 5779 5780// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeType. 5781func (lirt LinkedIntegrationRuntimeType) MarshalJSON() ([]byte, error) { 5782 lirt.AuthorizationType = AuthorizationTypeLinkedIntegrationRuntimeType 5783 objectMap := make(map[string]interface{}) 5784 if lirt.AuthorizationType != "" { 5785 objectMap["authorizationType"] = lirt.AuthorizationType 5786 } 5787 return json.Marshal(objectMap) 5788} 5789 5790// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. 5791func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) { 5792 return nil, false 5793} 5794 5795// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. 5796func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) { 5797 return nil, false 5798} 5799 5800// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. 5801func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) { 5802 return &lirt, true 5803} 5804 5805// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType. 5806func (lirt LinkedIntegrationRuntimeType) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) { 5807 return &lirt, true 5808} 5809 5810// ListAvailableRpOperation ... 5811type ListAvailableRpOperation struct { 5812 autorest.Response `json:"-"` 5813 Value *[]AvailableRpOperation `json:"value,omitempty"` 5814} 5815 5816// ListSQLPoolSecurityAlertPolicies a list of SQL pool security alert policies. 5817type ListSQLPoolSecurityAlertPolicies struct { 5818 autorest.Response `json:"-"` 5819 // Value - READ-ONLY; Array of results. 5820 Value *[]SQLPoolSecurityAlertPolicy `json:"value,omitempty"` 5821 // NextLink - READ-ONLY; Link to retrieve next page of results. 5822 NextLink *string `json:"nextLink,omitempty"` 5823} 5824 5825// MarshalJSON is the custom marshaler for ListSQLPoolSecurityAlertPolicies. 5826func (lspsap ListSQLPoolSecurityAlertPolicies) MarshalJSON() ([]byte, error) { 5827 objectMap := make(map[string]interface{}) 5828 return json.Marshal(objectMap) 5829} 5830 5831// ListSQLPoolSecurityAlertPoliciesIterator provides access to a complete listing of 5832// SQLPoolSecurityAlertPolicy values. 5833type ListSQLPoolSecurityAlertPoliciesIterator struct { 5834 i int 5835 page ListSQLPoolSecurityAlertPoliciesPage 5836} 5837 5838// NextWithContext advances to the next value. If there was an error making 5839// the request the iterator does not advance and the error is returned. 5840func (iter *ListSQLPoolSecurityAlertPoliciesIterator) NextWithContext(ctx context.Context) (err error) { 5841 if tracing.IsEnabled() { 5842 ctx = tracing.StartSpan(ctx, fqdn+"/ListSQLPoolSecurityAlertPoliciesIterator.NextWithContext") 5843 defer func() { 5844 sc := -1 5845 if iter.Response().Response.Response != nil { 5846 sc = iter.Response().Response.Response.StatusCode 5847 } 5848 tracing.EndSpan(ctx, sc, err) 5849 }() 5850 } 5851 iter.i++ 5852 if iter.i < len(iter.page.Values()) { 5853 return nil 5854 } 5855 err = iter.page.NextWithContext(ctx) 5856 if err != nil { 5857 iter.i-- 5858 return err 5859 } 5860 iter.i = 0 5861 return nil 5862} 5863 5864// Next advances to the next value. If there was an error making 5865// the request the iterator does not advance and the error is returned. 5866// Deprecated: Use NextWithContext() instead. 5867func (iter *ListSQLPoolSecurityAlertPoliciesIterator) Next() error { 5868 return iter.NextWithContext(context.Background()) 5869} 5870 5871// NotDone returns true if the enumeration should be started or is not yet complete. 5872func (iter ListSQLPoolSecurityAlertPoliciesIterator) NotDone() bool { 5873 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5874} 5875 5876// Response returns the raw server response from the last page request. 5877func (iter ListSQLPoolSecurityAlertPoliciesIterator) Response() ListSQLPoolSecurityAlertPolicies { 5878 return iter.page.Response() 5879} 5880 5881// Value returns the current value or a zero-initialized value if the 5882// iterator has advanced beyond the end of the collection. 5883func (iter ListSQLPoolSecurityAlertPoliciesIterator) Value() SQLPoolSecurityAlertPolicy { 5884 if !iter.page.NotDone() { 5885 return SQLPoolSecurityAlertPolicy{} 5886 } 5887 return iter.page.Values()[iter.i] 5888} 5889 5890// Creates a new instance of the ListSQLPoolSecurityAlertPoliciesIterator type. 5891func NewListSQLPoolSecurityAlertPoliciesIterator(page ListSQLPoolSecurityAlertPoliciesPage) ListSQLPoolSecurityAlertPoliciesIterator { 5892 return ListSQLPoolSecurityAlertPoliciesIterator{page: page} 5893} 5894 5895// IsEmpty returns true if the ListResult contains no values. 5896func (lspsap ListSQLPoolSecurityAlertPolicies) IsEmpty() bool { 5897 return lspsap.Value == nil || len(*lspsap.Value) == 0 5898} 5899 5900// hasNextLink returns true if the NextLink is not empty. 5901func (lspsap ListSQLPoolSecurityAlertPolicies) hasNextLink() bool { 5902 return lspsap.NextLink != nil && len(*lspsap.NextLink) != 0 5903} 5904 5905// listSQLPoolSecurityAlertPoliciesPreparer prepares a request to retrieve the next set of results. 5906// It returns nil if no more results exist. 5907func (lspsap ListSQLPoolSecurityAlertPolicies) listSQLPoolSecurityAlertPoliciesPreparer(ctx context.Context) (*http.Request, error) { 5908 if !lspsap.hasNextLink() { 5909 return nil, nil 5910 } 5911 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5912 autorest.AsJSON(), 5913 autorest.AsGet(), 5914 autorest.WithBaseURL(to.String(lspsap.NextLink))) 5915} 5916 5917// ListSQLPoolSecurityAlertPoliciesPage contains a page of SQLPoolSecurityAlertPolicy values. 5918type ListSQLPoolSecurityAlertPoliciesPage struct { 5919 fn func(context.Context, ListSQLPoolSecurityAlertPolicies) (ListSQLPoolSecurityAlertPolicies, error) 5920 lspsap ListSQLPoolSecurityAlertPolicies 5921} 5922 5923// NextWithContext advances to the next page of values. If there was an error making 5924// the request the page does not advance and the error is returned. 5925func (page *ListSQLPoolSecurityAlertPoliciesPage) NextWithContext(ctx context.Context) (err error) { 5926 if tracing.IsEnabled() { 5927 ctx = tracing.StartSpan(ctx, fqdn+"/ListSQLPoolSecurityAlertPoliciesPage.NextWithContext") 5928 defer func() { 5929 sc := -1 5930 if page.Response().Response.Response != nil { 5931 sc = page.Response().Response.Response.StatusCode 5932 } 5933 tracing.EndSpan(ctx, sc, err) 5934 }() 5935 } 5936 for { 5937 next, err := page.fn(ctx, page.lspsap) 5938 if err != nil { 5939 return err 5940 } 5941 page.lspsap = next 5942 if !next.hasNextLink() || !next.IsEmpty() { 5943 break 5944 } 5945 } 5946 return nil 5947} 5948 5949// Next advances to the next page of values. If there was an error making 5950// the request the page does not advance and the error is returned. 5951// Deprecated: Use NextWithContext() instead. 5952func (page *ListSQLPoolSecurityAlertPoliciesPage) Next() error { 5953 return page.NextWithContext(context.Background()) 5954} 5955 5956// NotDone returns true if the page enumeration should be started or is not yet complete. 5957func (page ListSQLPoolSecurityAlertPoliciesPage) NotDone() bool { 5958 return !page.lspsap.IsEmpty() 5959} 5960 5961// Response returns the raw server response from the last page request. 5962func (page ListSQLPoolSecurityAlertPoliciesPage) Response() ListSQLPoolSecurityAlertPolicies { 5963 return page.lspsap 5964} 5965 5966// Values returns the slice of values for the current page or nil if there are no values. 5967func (page ListSQLPoolSecurityAlertPoliciesPage) Values() []SQLPoolSecurityAlertPolicy { 5968 if page.lspsap.IsEmpty() { 5969 return nil 5970 } 5971 return *page.lspsap.Value 5972} 5973 5974// Creates a new instance of the ListSQLPoolSecurityAlertPoliciesPage type. 5975func NewListSQLPoolSecurityAlertPoliciesPage(cur ListSQLPoolSecurityAlertPolicies, getNextPage func(context.Context, ListSQLPoolSecurityAlertPolicies) (ListSQLPoolSecurityAlertPolicies, error)) ListSQLPoolSecurityAlertPoliciesPage { 5976 return ListSQLPoolSecurityAlertPoliciesPage{ 5977 fn: getNextPage, 5978 lspsap: cur, 5979 } 5980} 5981 5982// MaintenanceWindowOptions maintenance window options. 5983type MaintenanceWindowOptions struct { 5984 autorest.Response `json:"-"` 5985 // MaintenanceWindowOptionsProperties - Resource properties. 5986 *MaintenanceWindowOptionsProperties `json:"properties,omitempty"` 5987 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 5988 ID *string `json:"id,omitempty"` 5989 // Name - READ-ONLY; The name of the resource 5990 Name *string `json:"name,omitempty"` 5991 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 5992 Type *string `json:"type,omitempty"` 5993} 5994 5995// MarshalJSON is the custom marshaler for MaintenanceWindowOptions. 5996func (mwo MaintenanceWindowOptions) MarshalJSON() ([]byte, error) { 5997 objectMap := make(map[string]interface{}) 5998 if mwo.MaintenanceWindowOptionsProperties != nil { 5999 objectMap["properties"] = mwo.MaintenanceWindowOptionsProperties 6000 } 6001 return json.Marshal(objectMap) 6002} 6003 6004// UnmarshalJSON is the custom unmarshaler for MaintenanceWindowOptions struct. 6005func (mwo *MaintenanceWindowOptions) UnmarshalJSON(body []byte) error { 6006 var m map[string]*json.RawMessage 6007 err := json.Unmarshal(body, &m) 6008 if err != nil { 6009 return err 6010 } 6011 for k, v := range m { 6012 switch k { 6013 case "properties": 6014 if v != nil { 6015 var maintenanceWindowOptionsProperties MaintenanceWindowOptionsProperties 6016 err = json.Unmarshal(*v, &maintenanceWindowOptionsProperties) 6017 if err != nil { 6018 return err 6019 } 6020 mwo.MaintenanceWindowOptionsProperties = &maintenanceWindowOptionsProperties 6021 } 6022 case "id": 6023 if v != nil { 6024 var ID string 6025 err = json.Unmarshal(*v, &ID) 6026 if err != nil { 6027 return err 6028 } 6029 mwo.ID = &ID 6030 } 6031 case "name": 6032 if v != nil { 6033 var name string 6034 err = json.Unmarshal(*v, &name) 6035 if err != nil { 6036 return err 6037 } 6038 mwo.Name = &name 6039 } 6040 case "type": 6041 if v != nil { 6042 var typeVar string 6043 err = json.Unmarshal(*v, &typeVar) 6044 if err != nil { 6045 return err 6046 } 6047 mwo.Type = &typeVar 6048 } 6049 } 6050 } 6051 6052 return nil 6053} 6054 6055// MaintenanceWindowOptionsProperties maintenance window options properties. 6056type MaintenanceWindowOptionsProperties struct { 6057 // IsEnabled - Whether maintenance windows are enabled for the database. 6058 IsEnabled *bool `json:"isEnabled,omitempty"` 6059 // MaintenanceWindowCycles - Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. 6060 MaintenanceWindowCycles *[]MaintenanceWindowTimeRange `json:"maintenanceWindowCycles,omitempty"` 6061 // MinDurationInMinutes - Minimum duration of maintenance window. 6062 MinDurationInMinutes *int32 `json:"minDurationInMinutes,omitempty"` 6063 // DefaultDurationInMinutes - Default duration for maintenance window. 6064 DefaultDurationInMinutes *int32 `json:"defaultDurationInMinutes,omitempty"` 6065 // MinCycles - Minimum number of maintenance windows cycles to be set on the database. 6066 MinCycles *int32 `json:"minCycles,omitempty"` 6067 // TimeGranularityInMinutes - Time granularity in minutes for maintenance windows. 6068 TimeGranularityInMinutes *int32 `json:"timeGranularityInMinutes,omitempty"` 6069 // AllowMultipleMaintenanceWindowsPerCycle - Whether we allow multiple maintenance windows per cycle. 6070 AllowMultipleMaintenanceWindowsPerCycle *bool `json:"allowMultipleMaintenanceWindowsPerCycle,omitempty"` 6071} 6072 6073// MaintenanceWindows maintenance windows. 6074type MaintenanceWindows struct { 6075 autorest.Response `json:"-"` 6076 // MaintenanceWindowsProperties - Resource properties. 6077 *MaintenanceWindowsProperties `json:"properties,omitempty"` 6078 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 6079 ID *string `json:"id,omitempty"` 6080 // Name - READ-ONLY; The name of the resource 6081 Name *string `json:"name,omitempty"` 6082 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 6083 Type *string `json:"type,omitempty"` 6084} 6085 6086// MarshalJSON is the custom marshaler for MaintenanceWindows. 6087func (mw MaintenanceWindows) MarshalJSON() ([]byte, error) { 6088 objectMap := make(map[string]interface{}) 6089 if mw.MaintenanceWindowsProperties != nil { 6090 objectMap["properties"] = mw.MaintenanceWindowsProperties 6091 } 6092 return json.Marshal(objectMap) 6093} 6094 6095// UnmarshalJSON is the custom unmarshaler for MaintenanceWindows struct. 6096func (mw *MaintenanceWindows) UnmarshalJSON(body []byte) error { 6097 var m map[string]*json.RawMessage 6098 err := json.Unmarshal(body, &m) 6099 if err != nil { 6100 return err 6101 } 6102 for k, v := range m { 6103 switch k { 6104 case "properties": 6105 if v != nil { 6106 var maintenanceWindowsProperties MaintenanceWindowsProperties 6107 err = json.Unmarshal(*v, &maintenanceWindowsProperties) 6108 if err != nil { 6109 return err 6110 } 6111 mw.MaintenanceWindowsProperties = &maintenanceWindowsProperties 6112 } 6113 case "id": 6114 if v != nil { 6115 var ID string 6116 err = json.Unmarshal(*v, &ID) 6117 if err != nil { 6118 return err 6119 } 6120 mw.ID = &ID 6121 } 6122 case "name": 6123 if v != nil { 6124 var name string 6125 err = json.Unmarshal(*v, &name) 6126 if err != nil { 6127 return err 6128 } 6129 mw.Name = &name 6130 } 6131 case "type": 6132 if v != nil { 6133 var typeVar string 6134 err = json.Unmarshal(*v, &typeVar) 6135 if err != nil { 6136 return err 6137 } 6138 mw.Type = &typeVar 6139 } 6140 } 6141 } 6142 6143 return nil 6144} 6145 6146// MaintenanceWindowsProperties maintenance windows resource properties. 6147type MaintenanceWindowsProperties struct { 6148 TimeRanges *[]MaintenanceWindowTimeRange `json:"timeRanges,omitempty"` 6149} 6150 6151// MaintenanceWindowTimeRange maintenance window time range. 6152type MaintenanceWindowTimeRange struct { 6153 // DayOfWeek - Day of maintenance window. Possible values include: 'DayOfWeekSunday', 'DayOfWeekMonday', 'DayOfWeekTuesday', 'DayOfWeekWednesday', 'DayOfWeekThursday', 'DayOfWeekFriday', 'DayOfWeekSaturday' 6154 DayOfWeek DayOfWeek `json:"dayOfWeek,omitempty"` 6155 // StartTime - Start time minutes offset from 12am. 6156 StartTime *string `json:"startTime,omitempty"` 6157 // Duration - Duration of maintenance window in minutes. 6158 Duration *string `json:"duration,omitempty"` 6159} 6160 6161// ManagedIdentity the workspace managed identity 6162type ManagedIdentity struct { 6163 // PrincipalID - READ-ONLY; The principal ID of the workspace managed identity 6164 PrincipalID *string `json:"principalId,omitempty"` 6165 // TenantID - READ-ONLY; The tenant ID of the workspace managed identity 6166 TenantID *uuid.UUID `json:"tenantId,omitempty"` 6167 // Type - The type of managed identity for the workspace. Possible values include: 'ResourceIdentityTypeNone', 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned' 6168 Type ResourceIdentityType `json:"type,omitempty"` 6169 // UserAssignedIdentities - The user assigned managed identities. 6170 UserAssignedIdentities map[string]*UserAssignedManagedIdentity `json:"userAssignedIdentities"` 6171} 6172 6173// MarshalJSON is the custom marshaler for ManagedIdentity. 6174func (mi ManagedIdentity) MarshalJSON() ([]byte, error) { 6175 objectMap := make(map[string]interface{}) 6176 if mi.Type != "" { 6177 objectMap["type"] = mi.Type 6178 } 6179 if mi.UserAssignedIdentities != nil { 6180 objectMap["userAssignedIdentities"] = mi.UserAssignedIdentities 6181 } 6182 return json.Marshal(objectMap) 6183} 6184 6185// ManagedIdentitySQLControlSettingsModel sql Control Settings for workspace managed identity 6186type ManagedIdentitySQLControlSettingsModel struct { 6187 autorest.Response `json:"-"` 6188 // ManagedIdentitySQLControlSettingsModelProperties - Sql Control Settings for workspace managed identity 6189 *ManagedIdentitySQLControlSettingsModelProperties `json:"properties,omitempty"` 6190 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 6191 ID *string `json:"id,omitempty"` 6192 // Name - READ-ONLY; The name of the resource 6193 Name *string `json:"name,omitempty"` 6194 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 6195 Type *string `json:"type,omitempty"` 6196} 6197 6198// MarshalJSON is the custom marshaler for ManagedIdentitySQLControlSettingsModel. 6199func (miscsm ManagedIdentitySQLControlSettingsModel) MarshalJSON() ([]byte, error) { 6200 objectMap := make(map[string]interface{}) 6201 if miscsm.ManagedIdentitySQLControlSettingsModelProperties != nil { 6202 objectMap["properties"] = miscsm.ManagedIdentitySQLControlSettingsModelProperties 6203 } 6204 return json.Marshal(objectMap) 6205} 6206 6207// UnmarshalJSON is the custom unmarshaler for ManagedIdentitySQLControlSettingsModel struct. 6208func (miscsm *ManagedIdentitySQLControlSettingsModel) UnmarshalJSON(body []byte) error { 6209 var m map[string]*json.RawMessage 6210 err := json.Unmarshal(body, &m) 6211 if err != nil { 6212 return err 6213 } 6214 for k, v := range m { 6215 switch k { 6216 case "properties": 6217 if v != nil { 6218 var managedIdentitySQLControlSettingsModelProperties ManagedIdentitySQLControlSettingsModelProperties 6219 err = json.Unmarshal(*v, &managedIdentitySQLControlSettingsModelProperties) 6220 if err != nil { 6221 return err 6222 } 6223 miscsm.ManagedIdentitySQLControlSettingsModelProperties = &managedIdentitySQLControlSettingsModelProperties 6224 } 6225 case "id": 6226 if v != nil { 6227 var ID string 6228 err = json.Unmarshal(*v, &ID) 6229 if err != nil { 6230 return err 6231 } 6232 miscsm.ID = &ID 6233 } 6234 case "name": 6235 if v != nil { 6236 var name string 6237 err = json.Unmarshal(*v, &name) 6238 if err != nil { 6239 return err 6240 } 6241 miscsm.Name = &name 6242 } 6243 case "type": 6244 if v != nil { 6245 var typeVar string 6246 err = json.Unmarshal(*v, &typeVar) 6247 if err != nil { 6248 return err 6249 } 6250 miscsm.Type = &typeVar 6251 } 6252 } 6253 } 6254 6255 return nil 6256} 6257 6258// ManagedIdentitySQLControlSettingsModelProperties sql Control Settings for workspace managed identity 6259type ManagedIdentitySQLControlSettingsModelProperties struct { 6260 // GrantSQLControlToManagedIdentity - Grant sql control to managed identity 6261 GrantSQLControlToManagedIdentity *ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity `json:"grantSqlControlToManagedIdentity,omitempty"` 6262} 6263 6264// ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity grant sql control to 6265// managed identity 6266type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity struct { 6267 // DesiredState - Desired state. Possible values include: 'DesiredStateEnabled', 'DesiredStateDisabled' 6268 DesiredState DesiredState `json:"desiredState,omitempty"` 6269 // ActualState - READ-ONLY; Actual state. Possible values include: 'ActualStateEnabling', 'ActualStateEnabled', 'ActualStateDisabling', 'ActualStateDisabled', 'ActualStateUnknown' 6270 ActualState ActualState `json:"actualState,omitempty"` 6271} 6272 6273// MarshalJSON is the custom marshaler for ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity. 6274func (miscsmSctmi ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity) MarshalJSON() ([]byte, error) { 6275 objectMap := make(map[string]interface{}) 6276 if miscsmSctmi.DesiredState != "" { 6277 objectMap["desiredState"] = miscsmSctmi.DesiredState 6278 } 6279 return json.Marshal(objectMap) 6280} 6281 6282// ManagedIntegrationRuntime managed integration runtime, including managed elastic and managed dedicated 6283// integration runtimes. 6284type ManagedIntegrationRuntime struct { 6285 // State - READ-ONLY; Integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' 6286 State IntegrationRuntimeState `json:"state,omitempty"` 6287 // ManagedIntegrationRuntimeTypeProperties - Managed integration runtime properties. 6288 *ManagedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` 6289 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 6290 AdditionalProperties map[string]interface{} `json:""` 6291 // Description - Integration runtime description. 6292 Description *string `json:"description,omitempty"` 6293 // Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted' 6294 Type Type `json:"type,omitempty"` 6295} 6296 6297// MarshalJSON is the custom marshaler for ManagedIntegrationRuntime. 6298func (mir ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { 6299 mir.Type = TypeManaged 6300 objectMap := make(map[string]interface{}) 6301 if mir.ManagedIntegrationRuntimeTypeProperties != nil { 6302 objectMap["typeProperties"] = mir.ManagedIntegrationRuntimeTypeProperties 6303 } 6304 if mir.Description != nil { 6305 objectMap["description"] = mir.Description 6306 } 6307 if mir.Type != "" { 6308 objectMap["type"] = mir.Type 6309 } 6310 for k, v := range mir.AdditionalProperties { 6311 objectMap[k] = v 6312 } 6313 return json.Marshal(objectMap) 6314} 6315 6316// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. 6317func (mir ManagedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) { 6318 return &mir, true 6319} 6320 6321// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. 6322func (mir ManagedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) { 6323 return nil, false 6324} 6325 6326// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. 6327func (mir ManagedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) { 6328 return nil, false 6329} 6330 6331// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime. 6332func (mir ManagedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) { 6333 return &mir, true 6334} 6335 6336// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntime struct. 6337func (mir *ManagedIntegrationRuntime) UnmarshalJSON(body []byte) error { 6338 var m map[string]*json.RawMessage 6339 err := json.Unmarshal(body, &m) 6340 if err != nil { 6341 return err 6342 } 6343 for k, v := range m { 6344 switch k { 6345 case "state": 6346 if v != nil { 6347 var state IntegrationRuntimeState 6348 err = json.Unmarshal(*v, &state) 6349 if err != nil { 6350 return err 6351 } 6352 mir.State = state 6353 } 6354 case "typeProperties": 6355 if v != nil { 6356 var managedIntegrationRuntimeTypeProperties ManagedIntegrationRuntimeTypeProperties 6357 err = json.Unmarshal(*v, &managedIntegrationRuntimeTypeProperties) 6358 if err != nil { 6359 return err 6360 } 6361 mir.ManagedIntegrationRuntimeTypeProperties = &managedIntegrationRuntimeTypeProperties 6362 } 6363 default: 6364 if v != nil { 6365 var additionalProperties interface{} 6366 err = json.Unmarshal(*v, &additionalProperties) 6367 if err != nil { 6368 return err 6369 } 6370 if mir.AdditionalProperties == nil { 6371 mir.AdditionalProperties = make(map[string]interface{}) 6372 } 6373 mir.AdditionalProperties[k] = additionalProperties 6374 } 6375 case "description": 6376 if v != nil { 6377 var description string 6378 err = json.Unmarshal(*v, &description) 6379 if err != nil { 6380 return err 6381 } 6382 mir.Description = &description 6383 } 6384 case "type": 6385 if v != nil { 6386 var typeVar Type 6387 err = json.Unmarshal(*v, &typeVar) 6388 if err != nil { 6389 return err 6390 } 6391 mir.Type = typeVar 6392 } 6393 } 6394 } 6395 6396 return nil 6397} 6398 6399// ManagedIntegrationRuntimeError error definition for managed integration runtime. 6400type ManagedIntegrationRuntimeError struct { 6401 // Time - READ-ONLY; The time when the error occurred. 6402 Time *date.Time `json:"time,omitempty"` 6403 // Code - READ-ONLY; Error code. 6404 Code *string `json:"code,omitempty"` 6405 // Parameters - READ-ONLY; Managed integration runtime error parameters. 6406 Parameters *[]string `json:"parameters,omitempty"` 6407 // Message - READ-ONLY; Error message. 6408 Message *string `json:"message,omitempty"` 6409} 6410 6411// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeError. 6412func (mire ManagedIntegrationRuntimeError) MarshalJSON() ([]byte, error) { 6413 objectMap := make(map[string]interface{}) 6414 return json.Marshal(objectMap) 6415} 6416 6417// ManagedIntegrationRuntimeNode properties of integration runtime node. 6418type ManagedIntegrationRuntimeNode struct { 6419 // NodeID - READ-ONLY; The managed integration runtime node id. 6420 NodeID *string `json:"nodeId,omitempty"` 6421 // Status - READ-ONLY; The managed integration runtime node status. Possible values include: 'ManagedIntegrationRuntimeNodeStatusStarting', 'ManagedIntegrationRuntimeNodeStatusAvailable', 'ManagedIntegrationRuntimeNodeStatusRecycling', 'ManagedIntegrationRuntimeNodeStatusUnavailable' 6422 Status ManagedIntegrationRuntimeNodeStatus `json:"status,omitempty"` 6423 // Errors - The errors that occurred on this integration runtime node. 6424 Errors *[]ManagedIntegrationRuntimeError `json:"errors,omitempty"` 6425} 6426 6427// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeNode. 6428func (mirn ManagedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { 6429 objectMap := make(map[string]interface{}) 6430 if mirn.Errors != nil { 6431 objectMap["errors"] = mirn.Errors 6432 } 6433 return json.Marshal(objectMap) 6434} 6435 6436// ManagedIntegrationRuntimeOperationResult properties of managed integration runtime operation result. 6437type ManagedIntegrationRuntimeOperationResult struct { 6438 // Type - READ-ONLY; The operation type. Could be start or stop. 6439 Type *string `json:"type,omitempty"` 6440 // StartTime - READ-ONLY; The start time of the operation. 6441 StartTime *date.Time `json:"startTime,omitempty"` 6442 // Result - READ-ONLY; The operation result. 6443 Result *string `json:"result,omitempty"` 6444 // ErrorCode - READ-ONLY; The error code. 6445 ErrorCode *string `json:"errorCode,omitempty"` 6446 // Parameters - READ-ONLY; Managed integration runtime error parameters. 6447 Parameters *[]string `json:"parameters,omitempty"` 6448 // ActivityID - READ-ONLY; The activity id for the operation request. 6449 ActivityID *string `json:"activityId,omitempty"` 6450} 6451 6452// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeOperationResult. 6453func (miror ManagedIntegrationRuntimeOperationResult) MarshalJSON() ([]byte, error) { 6454 objectMap := make(map[string]interface{}) 6455 return json.Marshal(objectMap) 6456} 6457 6458// ManagedIntegrationRuntimeStatus managed integration runtime status. 6459type ManagedIntegrationRuntimeStatus struct { 6460 // ManagedIntegrationRuntimeStatusTypeProperties - Managed integration runtime status type properties. 6461 *ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"` 6462 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 6463 AdditionalProperties map[string]interface{} `json:""` 6464 // DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to. 6465 DataFactoryName *string `json:"dataFactoryName,omitempty"` 6466 // State - READ-ONLY; The state of integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' 6467 State IntegrationRuntimeState `json:"state,omitempty"` 6468 // Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted' 6469 Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"` 6470} 6471 6472// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeStatus. 6473func (mirs ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { 6474 mirs.Type = TypeBasicIntegrationRuntimeStatusTypeManaged 6475 objectMap := make(map[string]interface{}) 6476 if mirs.ManagedIntegrationRuntimeStatusTypeProperties != nil { 6477 objectMap["typeProperties"] = mirs.ManagedIntegrationRuntimeStatusTypeProperties 6478 } 6479 if mirs.Type != "" { 6480 objectMap["type"] = mirs.Type 6481 } 6482 for k, v := range mirs.AdditionalProperties { 6483 objectMap[k] = v 6484 } 6485 return json.Marshal(objectMap) 6486} 6487 6488// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. 6489func (mirs ManagedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) { 6490 return &mirs, true 6491} 6492 6493// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. 6494func (mirs ManagedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) { 6495 return nil, false 6496} 6497 6498// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. 6499func (mirs ManagedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) { 6500 return nil, false 6501} 6502 6503// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus. 6504func (mirs ManagedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) { 6505 return &mirs, true 6506} 6507 6508// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntimeStatus struct. 6509func (mirs *ManagedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error { 6510 var m map[string]*json.RawMessage 6511 err := json.Unmarshal(body, &m) 6512 if err != nil { 6513 return err 6514 } 6515 for k, v := range m { 6516 switch k { 6517 case "typeProperties": 6518 if v != nil { 6519 var managedIntegrationRuntimeStatusTypeProperties ManagedIntegrationRuntimeStatusTypeProperties 6520 err = json.Unmarshal(*v, &managedIntegrationRuntimeStatusTypeProperties) 6521 if err != nil { 6522 return err 6523 } 6524 mirs.ManagedIntegrationRuntimeStatusTypeProperties = &managedIntegrationRuntimeStatusTypeProperties 6525 } 6526 default: 6527 if v != nil { 6528 var additionalProperties interface{} 6529 err = json.Unmarshal(*v, &additionalProperties) 6530 if err != nil { 6531 return err 6532 } 6533 if mirs.AdditionalProperties == nil { 6534 mirs.AdditionalProperties = make(map[string]interface{}) 6535 } 6536 mirs.AdditionalProperties[k] = additionalProperties 6537 } 6538 case "dataFactoryName": 6539 if v != nil { 6540 var dataFactoryName string 6541 err = json.Unmarshal(*v, &dataFactoryName) 6542 if err != nil { 6543 return err 6544 } 6545 mirs.DataFactoryName = &dataFactoryName 6546 } 6547 case "state": 6548 if v != nil { 6549 var state IntegrationRuntimeState 6550 err = json.Unmarshal(*v, &state) 6551 if err != nil { 6552 return err 6553 } 6554 mirs.State = state 6555 } 6556 case "type": 6557 if v != nil { 6558 var typeVar TypeBasicIntegrationRuntimeStatus 6559 err = json.Unmarshal(*v, &typeVar) 6560 if err != nil { 6561 return err 6562 } 6563 mirs.Type = typeVar 6564 } 6565 } 6566 } 6567 6568 return nil 6569} 6570 6571// ManagedIntegrationRuntimeStatusTypeProperties managed integration runtime status type properties. 6572type ManagedIntegrationRuntimeStatusTypeProperties struct { 6573 // CreateTime - READ-ONLY; The time at which the integration runtime was created, in ISO8601 format. 6574 CreateTime *date.Time `json:"createTime,omitempty"` 6575 // Nodes - READ-ONLY; The list of nodes for managed integration runtime. 6576 Nodes *[]ManagedIntegrationRuntimeNode `json:"nodes,omitempty"` 6577 // OtherErrors - READ-ONLY; The errors that occurred on this integration runtime. 6578 OtherErrors *[]ManagedIntegrationRuntimeError `json:"otherErrors,omitempty"` 6579 // LastOperation - READ-ONLY; The last operation result that occurred on this integration runtime. 6580 LastOperation *ManagedIntegrationRuntimeOperationResult `json:"lastOperation,omitempty"` 6581} 6582 6583// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeStatusTypeProperties. 6584func (mirstp ManagedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { 6585 objectMap := make(map[string]interface{}) 6586 return json.Marshal(objectMap) 6587} 6588 6589// ManagedIntegrationRuntimeTypeProperties managed integration runtime type properties. 6590type ManagedIntegrationRuntimeTypeProperties struct { 6591 // ComputeProperties - The compute resource for managed integration runtime. 6592 ComputeProperties *IntegrationRuntimeComputeProperties `json:"computeProperties,omitempty"` 6593 // SsisProperties - SSIS properties for managed integration runtime. 6594 SsisProperties *IntegrationRuntimeSsisProperties `json:"ssisProperties,omitempty"` 6595} 6596 6597// ManagedVirtualNetworkSettings managed Virtual Network Settings 6598type ManagedVirtualNetworkSettings struct { 6599 // PreventDataExfiltration - Prevent Data Exfiltration 6600 PreventDataExfiltration *bool `json:"preventDataExfiltration,omitempty"` 6601 // LinkedAccessCheckOnTargetResource - Linked Access Check On Target Resource 6602 LinkedAccessCheckOnTargetResource *bool `json:"linkedAccessCheckOnTargetResource,omitempty"` 6603 // AllowedAadTenantIdsForLinking - Allowed Aad Tenant Ids For Linking 6604 AllowedAadTenantIdsForLinking *[]string `json:"allowedAadTenantIdsForLinking,omitempty"` 6605} 6606 6607// MetadataSyncConfig configuration for metadata sync 6608type MetadataSyncConfig struct { 6609 autorest.Response `json:"-"` 6610 // MetadataSyncConfigProperties - Metadata Sync Config properties 6611 *MetadataSyncConfigProperties `json:"properties,omitempty"` 6612 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 6613 ID *string `json:"id,omitempty"` 6614 // Name - READ-ONLY; The name of the resource 6615 Name *string `json:"name,omitempty"` 6616 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 6617 Type *string `json:"type,omitempty"` 6618} 6619 6620// MarshalJSON is the custom marshaler for MetadataSyncConfig. 6621func (msc MetadataSyncConfig) MarshalJSON() ([]byte, error) { 6622 objectMap := make(map[string]interface{}) 6623 if msc.MetadataSyncConfigProperties != nil { 6624 objectMap["properties"] = msc.MetadataSyncConfigProperties 6625 } 6626 return json.Marshal(objectMap) 6627} 6628 6629// UnmarshalJSON is the custom unmarshaler for MetadataSyncConfig struct. 6630func (msc *MetadataSyncConfig) UnmarshalJSON(body []byte) error { 6631 var m map[string]*json.RawMessage 6632 err := json.Unmarshal(body, &m) 6633 if err != nil { 6634 return err 6635 } 6636 for k, v := range m { 6637 switch k { 6638 case "properties": 6639 if v != nil { 6640 var metadataSyncConfigProperties MetadataSyncConfigProperties 6641 err = json.Unmarshal(*v, &metadataSyncConfigProperties) 6642 if err != nil { 6643 return err 6644 } 6645 msc.MetadataSyncConfigProperties = &metadataSyncConfigProperties 6646 } 6647 case "id": 6648 if v != nil { 6649 var ID string 6650 err = json.Unmarshal(*v, &ID) 6651 if err != nil { 6652 return err 6653 } 6654 msc.ID = &ID 6655 } 6656 case "name": 6657 if v != nil { 6658 var name string 6659 err = json.Unmarshal(*v, &name) 6660 if err != nil { 6661 return err 6662 } 6663 msc.Name = &name 6664 } 6665 case "type": 6666 if v != nil { 6667 var typeVar string 6668 err = json.Unmarshal(*v, &typeVar) 6669 if err != nil { 6670 return err 6671 } 6672 msc.Type = &typeVar 6673 } 6674 } 6675 } 6676 6677 return nil 6678} 6679 6680// MetadataSyncConfigProperties metadata Sync Config properties 6681type MetadataSyncConfigProperties struct { 6682 // Enabled - Indicates whether the metadata sync is enabled or disabled 6683 Enabled *bool `json:"enabled,omitempty"` 6684 // SyncIntervalInMinutes - The Sync Interval in minutes. 6685 SyncIntervalInMinutes *int32 `json:"syncIntervalInMinutes,omitempty"` 6686} 6687 6688// OperationMetaLogSpecification what is this? 6689type OperationMetaLogSpecification struct { 6690 // DisplayName - Log display name 6691 DisplayName *string `json:"displayName,omitempty"` 6692 // BlobDuration - Time range the log covers 6693 BlobDuration *string `json:"blobDuration,omitempty"` 6694 // Name - Log unique name 6695 Name *string `json:"name,omitempty"` 6696} 6697 6698// OperationMetaMetricDimensionSpecification what is this? 6699type OperationMetaMetricDimensionSpecification struct { 6700 // DisplayName - Dimension display name 6701 DisplayName *string `json:"displayName,omitempty"` 6702 // Name - Dimension unique name 6703 Name *string `json:"name,omitempty"` 6704 // ToBeExportedForShoebox - Whether this metric should be exported for Shoebox 6705 ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` 6706} 6707 6708// OperationMetaMetricSpecification what is this? 6709type OperationMetaMetricSpecification struct { 6710 // SourceMdmNamespace - The source MDM namespace 6711 SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` 6712 // DisplayName - Metric display name 6713 DisplayName *string `json:"displayName,omitempty"` 6714 // Name - Metric unique name 6715 Name *string `json:"name,omitempty"` 6716 // AggregationType - Metric aggregation type 6717 AggregationType *string `json:"aggregationType,omitempty"` 6718 // DisplayDescription - Metric description 6719 DisplayDescription *string `json:"displayDescription,omitempty"` 6720 // SourceMdmAccount - The source MDM account 6721 SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` 6722 // EnableRegionalMdmAccount - Whether the regional MDM account is enabled 6723 EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` 6724 // Unit - Metric units 6725 Unit *string `json:"unit,omitempty"` 6726 // Dimensions - Metric dimensions 6727 Dimensions *[]OperationMetaMetricDimensionSpecification `json:"dimensions,omitempty"` 6728 // SupportsInstanceLevelAggregation - Whether the metric supports instance-level aggregation 6729 SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"` 6730 // MetricFilterPattern - Metric filter 6731 MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` 6732} 6733 6734// OperationMetaPropertyInfo what is this? 6735type OperationMetaPropertyInfo struct { 6736 // ServiceSpecification - Operation service specification 6737 ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"` 6738} 6739 6740// OperationMetaServiceSpecification what is this? 6741type OperationMetaServiceSpecification struct { 6742 // MetricSpecifications - Service metric specifications 6743 MetricSpecifications *[]OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"` 6744 // LogSpecifications - Service log specifications 6745 LogSpecifications *[]OperationMetaLogSpecification `json:"logSpecifications,omitempty"` 6746} 6747 6748// OperationResource an operation 6749type OperationResource struct { 6750 autorest.Response `json:"-"` 6751 // ID - Operation ID 6752 ID *string `json:"id,omitempty"` 6753 // Name - Operation name 6754 Name *string `json:"name,omitempty"` 6755 // Status - Operation status. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed', 'OperationStatusCanceled' 6756 Status OperationStatus `json:"status,omitempty"` 6757 // Properties - Operation properties 6758 Properties interface{} `json:"properties,omitempty"` 6759 // Error - Errors from the operation 6760 Error *ErrorDetail `json:"error,omitempty"` 6761 // StartTime - Operation start time 6762 StartTime *date.Time `json:"startTime,omitempty"` 6763 // EndTime - Operation start time 6764 EndTime *date.Time `json:"endTime,omitempty"` 6765 // PercentComplete - Completion percentage of the operation 6766 PercentComplete *float64 `json:"percentComplete,omitempty"` 6767} 6768 6769// PrivateEndpoint private endpoint details 6770type PrivateEndpoint struct { 6771 // ID - READ-ONLY; Resource id of the private endpoint. 6772 ID *string `json:"id,omitempty"` 6773} 6774 6775// MarshalJSON is the custom marshaler for PrivateEndpoint. 6776func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { 6777 objectMap := make(map[string]interface{}) 6778 return json.Marshal(objectMap) 6779} 6780 6781// PrivateEndpointConnection a private endpoint connection 6782type PrivateEndpointConnection struct { 6783 autorest.Response `json:"-"` 6784 // PrivateEndpointConnectionProperties - Private endpoint connection properties. 6785 *PrivateEndpointConnectionProperties `json:"properties,omitempty"` 6786 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 6787 ID *string `json:"id,omitempty"` 6788 // Name - READ-ONLY; The name of the resource 6789 Name *string `json:"name,omitempty"` 6790 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 6791 Type *string `json:"type,omitempty"` 6792} 6793 6794// MarshalJSON is the custom marshaler for PrivateEndpointConnection. 6795func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { 6796 objectMap := make(map[string]interface{}) 6797 if pec.PrivateEndpointConnectionProperties != nil { 6798 objectMap["properties"] = pec.PrivateEndpointConnectionProperties 6799 } 6800 return json.Marshal(objectMap) 6801} 6802 6803// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. 6804func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { 6805 var m map[string]*json.RawMessage 6806 err := json.Unmarshal(body, &m) 6807 if err != nil { 6808 return err 6809 } 6810 for k, v := range m { 6811 switch k { 6812 case "properties": 6813 if v != nil { 6814 var privateEndpointConnectionProperties PrivateEndpointConnectionProperties 6815 err = json.Unmarshal(*v, &privateEndpointConnectionProperties) 6816 if err != nil { 6817 return err 6818 } 6819 pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties 6820 } 6821 case "id": 6822 if v != nil { 6823 var ID string 6824 err = json.Unmarshal(*v, &ID) 6825 if err != nil { 6826 return err 6827 } 6828 pec.ID = &ID 6829 } 6830 case "name": 6831 if v != nil { 6832 var name string 6833 err = json.Unmarshal(*v, &name) 6834 if err != nil { 6835 return err 6836 } 6837 pec.Name = &name 6838 } 6839 case "type": 6840 if v != nil { 6841 var typeVar string 6842 err = json.Unmarshal(*v, &typeVar) 6843 if err != nil { 6844 return err 6845 } 6846 pec.Type = &typeVar 6847 } 6848 } 6849 } 6850 6851 return nil 6852} 6853 6854// PrivateEndpointConnectionForPrivateLinkHub ... 6855type PrivateEndpointConnectionForPrivateLinkHub struct { 6856 autorest.Response `json:"-"` 6857 Name *string `json:"name,omitempty"` 6858 Type *string `json:"type,omitempty"` 6859 // ID - READ-ONLY; identifier 6860 ID *string `json:"id,omitempty"` 6861 // PrivateEndpointConnectionProperties - Properties of private endpoint connection for private link hub 6862 *PrivateEndpointConnectionProperties `json:"properties,omitempty"` 6863} 6864 6865// MarshalJSON is the custom marshaler for PrivateEndpointConnectionForPrivateLinkHub. 6866func (pecfplh PrivateEndpointConnectionForPrivateLinkHub) MarshalJSON() ([]byte, error) { 6867 objectMap := make(map[string]interface{}) 6868 if pecfplh.Name != nil { 6869 objectMap["name"] = pecfplh.Name 6870 } 6871 if pecfplh.Type != nil { 6872 objectMap["type"] = pecfplh.Type 6873 } 6874 if pecfplh.PrivateEndpointConnectionProperties != nil { 6875 objectMap["properties"] = pecfplh.PrivateEndpointConnectionProperties 6876 } 6877 return json.Marshal(objectMap) 6878} 6879 6880// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionForPrivateLinkHub struct. 6881func (pecfplh *PrivateEndpointConnectionForPrivateLinkHub) UnmarshalJSON(body []byte) error { 6882 var m map[string]*json.RawMessage 6883 err := json.Unmarshal(body, &m) 6884 if err != nil { 6885 return err 6886 } 6887 for k, v := range m { 6888 switch k { 6889 case "name": 6890 if v != nil { 6891 var name string 6892 err = json.Unmarshal(*v, &name) 6893 if err != nil { 6894 return err 6895 } 6896 pecfplh.Name = &name 6897 } 6898 case "type": 6899 if v != nil { 6900 var typeVar string 6901 err = json.Unmarshal(*v, &typeVar) 6902 if err != nil { 6903 return err 6904 } 6905 pecfplh.Type = &typeVar 6906 } 6907 case "id": 6908 if v != nil { 6909 var ID string 6910 err = json.Unmarshal(*v, &ID) 6911 if err != nil { 6912 return err 6913 } 6914 pecfplh.ID = &ID 6915 } 6916 case "properties": 6917 if v != nil { 6918 var privateEndpointConnectionProperties PrivateEndpointConnectionProperties 6919 err = json.Unmarshal(*v, &privateEndpointConnectionProperties) 6920 if err != nil { 6921 return err 6922 } 6923 pecfplh.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties 6924 } 6925 } 6926 } 6927 6928 return nil 6929} 6930 6931// PrivateEndpointConnectionForPrivateLinkHubBasic private Endpoint Connection For Private Link Hub - Basic 6932type PrivateEndpointConnectionForPrivateLinkHubBasic struct { 6933 // ID - READ-ONLY; identifier 6934 ID *string `json:"id,omitempty"` 6935 // PrivateEndpointConnectionProperties - Properties of private endpoint connection for private link hub 6936 *PrivateEndpointConnectionProperties `json:"properties,omitempty"` 6937} 6938 6939// MarshalJSON is the custom marshaler for PrivateEndpointConnectionForPrivateLinkHubBasic. 6940func (pecfplhb PrivateEndpointConnectionForPrivateLinkHubBasic) MarshalJSON() ([]byte, error) { 6941 objectMap := make(map[string]interface{}) 6942 if pecfplhb.PrivateEndpointConnectionProperties != nil { 6943 objectMap["properties"] = pecfplhb.PrivateEndpointConnectionProperties 6944 } 6945 return json.Marshal(objectMap) 6946} 6947 6948// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionForPrivateLinkHubBasic struct. 6949func (pecfplhb *PrivateEndpointConnectionForPrivateLinkHubBasic) UnmarshalJSON(body []byte) error { 6950 var m map[string]*json.RawMessage 6951 err := json.Unmarshal(body, &m) 6952 if err != nil { 6953 return err 6954 } 6955 for k, v := range m { 6956 switch k { 6957 case "id": 6958 if v != nil { 6959 var ID string 6960 err = json.Unmarshal(*v, &ID) 6961 if err != nil { 6962 return err 6963 } 6964 pecfplhb.ID = &ID 6965 } 6966 case "properties": 6967 if v != nil { 6968 var privateEndpointConnectionProperties PrivateEndpointConnectionProperties 6969 err = json.Unmarshal(*v, &privateEndpointConnectionProperties) 6970 if err != nil { 6971 return err 6972 } 6973 pecfplhb.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties 6974 } 6975 } 6976 } 6977 6978 return nil 6979} 6980 6981// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse ... 6982type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse struct { 6983 autorest.Response `json:"-"` 6984 Value *[]PrivateEndpointConnectionForPrivateLinkHub `json:"value,omitempty"` 6985 NextLink *string `json:"nextLink,omitempty"` 6986} 6987 6988// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator provides access to a 6989// complete listing of PrivateEndpointConnectionForPrivateLinkHub values. 6990type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator struct { 6991 i int 6992 page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage 6993} 6994 6995// NextWithContext advances to the next value. If there was an error making 6996// the request the iterator does not advance and the error is returned. 6997func (iter *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) NextWithContext(ctx context.Context) (err error) { 6998 if tracing.IsEnabled() { 6999 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator.NextWithContext") 7000 defer func() { 7001 sc := -1 7002 if iter.Response().Response.Response != nil { 7003 sc = iter.Response().Response.Response.StatusCode 7004 } 7005 tracing.EndSpan(ctx, sc, err) 7006 }() 7007 } 7008 iter.i++ 7009 if iter.i < len(iter.page.Values()) { 7010 return nil 7011 } 7012 err = iter.page.NextWithContext(ctx) 7013 if err != nil { 7014 iter.i-- 7015 return err 7016 } 7017 iter.i = 0 7018 return nil 7019} 7020 7021// Next advances to the next value. If there was an error making 7022// the request the iterator does not advance and the error is returned. 7023// Deprecated: Use NextWithContext() instead. 7024func (iter *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Next() error { 7025 return iter.NextWithContext(context.Background()) 7026} 7027 7028// NotDone returns true if the enumeration should be started or is not yet complete. 7029func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) NotDone() bool { 7030 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7031} 7032 7033// Response returns the raw server response from the last page request. 7034func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Response() PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse { 7035 return iter.page.Response() 7036} 7037 7038// Value returns the current value or a zero-initialized value if the 7039// iterator has advanced beyond the end of the collection. 7040func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Value() PrivateEndpointConnectionForPrivateLinkHub { 7041 if !iter.page.NotDone() { 7042 return PrivateEndpointConnectionForPrivateLinkHub{} 7043 } 7044 return iter.page.Values()[iter.i] 7045} 7046 7047// Creates a new instance of the PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator type. 7048func NewPrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator(page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator { 7049 return PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator{page: page} 7050} 7051 7052// IsEmpty returns true if the ListResult contains no values. 7053func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) IsEmpty() bool { 7054 return pecfplhRcr.Value == nil || len(*pecfplhRcr.Value) == 0 7055} 7056 7057// hasNextLink returns true if the NextLink is not empty. 7058func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) hasNextLink() bool { 7059 return pecfplhRcr.NextLink != nil && len(*pecfplhRcr.NextLink) != 0 7060} 7061 7062// privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer prepares a request to retrieve the next set of results. 7063// It returns nil if no more results exist. 7064func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer(ctx context.Context) (*http.Request, error) { 7065 if !pecfplhRcr.hasNextLink() { 7066 return nil, nil 7067 } 7068 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7069 autorest.AsJSON(), 7070 autorest.AsGet(), 7071 autorest.WithBaseURL(to.String(pecfplhRcr.NextLink))) 7072} 7073 7074// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage contains a page of 7075// PrivateEndpointConnectionForPrivateLinkHub values. 7076type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage struct { 7077 fn func(context.Context, PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, error) 7078 pecfplhrcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse 7079} 7080 7081// NextWithContext advances to the next page of values. If there was an error making 7082// the request the page does not advance and the error is returned. 7083func (page *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) NextWithContext(ctx context.Context) (err error) { 7084 if tracing.IsEnabled() { 7085 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage.NextWithContext") 7086 defer func() { 7087 sc := -1 7088 if page.Response().Response.Response != nil { 7089 sc = page.Response().Response.Response.StatusCode 7090 } 7091 tracing.EndSpan(ctx, sc, err) 7092 }() 7093 } 7094 for { 7095 next, err := page.fn(ctx, page.pecfplhrcr) 7096 if err != nil { 7097 return err 7098 } 7099 page.pecfplhrcr = next 7100 if !next.hasNextLink() || !next.IsEmpty() { 7101 break 7102 } 7103 } 7104 return nil 7105} 7106 7107// Next advances to the next page of values. If there was an error making 7108// the request the page does not advance and the error is returned. 7109// Deprecated: Use NextWithContext() instead. 7110func (page *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Next() error { 7111 return page.NextWithContext(context.Background()) 7112} 7113 7114// NotDone returns true if the page enumeration should be started or is not yet complete. 7115func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) NotDone() bool { 7116 return !page.pecfplhrcr.IsEmpty() 7117} 7118 7119// Response returns the raw server response from the last page request. 7120func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Response() PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse { 7121 return page.pecfplhrcr 7122} 7123 7124// Values returns the slice of values for the current page or nil if there are no values. 7125func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Values() []PrivateEndpointConnectionForPrivateLinkHub { 7126 if page.pecfplhrcr.IsEmpty() { 7127 return nil 7128 } 7129 return *page.pecfplhrcr.Value 7130} 7131 7132// Creates a new instance of the PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage type. 7133func NewPrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage(cur PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, getNextPage func(context.Context, PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, error)) PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage { 7134 return PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage{ 7135 fn: getNextPage, 7136 pecfplhrcr: cur, 7137 } 7138} 7139 7140// PrivateEndpointConnectionList a list of private endpoint connections 7141type PrivateEndpointConnectionList struct { 7142 autorest.Response `json:"-"` 7143 // Value - READ-ONLY; Array of results. 7144 Value *[]PrivateEndpointConnection `json:"value,omitempty"` 7145 // NextLink - READ-ONLY; Link to retrieve next page of results. 7146 NextLink *string `json:"nextLink,omitempty"` 7147} 7148 7149// MarshalJSON is the custom marshaler for PrivateEndpointConnectionList. 7150func (pecl PrivateEndpointConnectionList) MarshalJSON() ([]byte, error) { 7151 objectMap := make(map[string]interface{}) 7152 return json.Marshal(objectMap) 7153} 7154 7155// PrivateEndpointConnectionListIterator provides access to a complete listing of PrivateEndpointConnection 7156// values. 7157type PrivateEndpointConnectionListIterator struct { 7158 i int 7159 page PrivateEndpointConnectionListPage 7160} 7161 7162// NextWithContext advances to the next value. If there was an error making 7163// the request the iterator does not advance and the error is returned. 7164func (iter *PrivateEndpointConnectionListIterator) NextWithContext(ctx context.Context) (err error) { 7165 if tracing.IsEnabled() { 7166 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListIterator.NextWithContext") 7167 defer func() { 7168 sc := -1 7169 if iter.Response().Response.Response != nil { 7170 sc = iter.Response().Response.Response.StatusCode 7171 } 7172 tracing.EndSpan(ctx, sc, err) 7173 }() 7174 } 7175 iter.i++ 7176 if iter.i < len(iter.page.Values()) { 7177 return nil 7178 } 7179 err = iter.page.NextWithContext(ctx) 7180 if err != nil { 7181 iter.i-- 7182 return err 7183 } 7184 iter.i = 0 7185 return nil 7186} 7187 7188// Next advances to the next value. If there was an error making 7189// the request the iterator does not advance and the error is returned. 7190// Deprecated: Use NextWithContext() instead. 7191func (iter *PrivateEndpointConnectionListIterator) Next() error { 7192 return iter.NextWithContext(context.Background()) 7193} 7194 7195// NotDone returns true if the enumeration should be started or is not yet complete. 7196func (iter PrivateEndpointConnectionListIterator) NotDone() bool { 7197 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7198} 7199 7200// Response returns the raw server response from the last page request. 7201func (iter PrivateEndpointConnectionListIterator) Response() PrivateEndpointConnectionList { 7202 return iter.page.Response() 7203} 7204 7205// Value returns the current value or a zero-initialized value if the 7206// iterator has advanced beyond the end of the collection. 7207func (iter PrivateEndpointConnectionListIterator) Value() PrivateEndpointConnection { 7208 if !iter.page.NotDone() { 7209 return PrivateEndpointConnection{} 7210 } 7211 return iter.page.Values()[iter.i] 7212} 7213 7214// Creates a new instance of the PrivateEndpointConnectionListIterator type. 7215func NewPrivateEndpointConnectionListIterator(page PrivateEndpointConnectionListPage) PrivateEndpointConnectionListIterator { 7216 return PrivateEndpointConnectionListIterator{page: page} 7217} 7218 7219// IsEmpty returns true if the ListResult contains no values. 7220func (pecl PrivateEndpointConnectionList) IsEmpty() bool { 7221 return pecl.Value == nil || len(*pecl.Value) == 0 7222} 7223 7224// hasNextLink returns true if the NextLink is not empty. 7225func (pecl PrivateEndpointConnectionList) hasNextLink() bool { 7226 return pecl.NextLink != nil && len(*pecl.NextLink) != 0 7227} 7228 7229// privateEndpointConnectionListPreparer prepares a request to retrieve the next set of results. 7230// It returns nil if no more results exist. 7231func (pecl PrivateEndpointConnectionList) privateEndpointConnectionListPreparer(ctx context.Context) (*http.Request, error) { 7232 if !pecl.hasNextLink() { 7233 return nil, nil 7234 } 7235 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7236 autorest.AsJSON(), 7237 autorest.AsGet(), 7238 autorest.WithBaseURL(to.String(pecl.NextLink))) 7239} 7240 7241// PrivateEndpointConnectionListPage contains a page of PrivateEndpointConnection values. 7242type PrivateEndpointConnectionListPage struct { 7243 fn func(context.Context, PrivateEndpointConnectionList) (PrivateEndpointConnectionList, error) 7244 pecl PrivateEndpointConnectionList 7245} 7246 7247// NextWithContext advances to the next page of values. If there was an error making 7248// the request the page does not advance and the error is returned. 7249func (page *PrivateEndpointConnectionListPage) NextWithContext(ctx context.Context) (err error) { 7250 if tracing.IsEnabled() { 7251 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListPage.NextWithContext") 7252 defer func() { 7253 sc := -1 7254 if page.Response().Response.Response != nil { 7255 sc = page.Response().Response.Response.StatusCode 7256 } 7257 tracing.EndSpan(ctx, sc, err) 7258 }() 7259 } 7260 for { 7261 next, err := page.fn(ctx, page.pecl) 7262 if err != nil { 7263 return err 7264 } 7265 page.pecl = next 7266 if !next.hasNextLink() || !next.IsEmpty() { 7267 break 7268 } 7269 } 7270 return nil 7271} 7272 7273// Next advances to the next page of values. If there was an error making 7274// the request the page does not advance and the error is returned. 7275// Deprecated: Use NextWithContext() instead. 7276func (page *PrivateEndpointConnectionListPage) Next() error { 7277 return page.NextWithContext(context.Background()) 7278} 7279 7280// NotDone returns true if the page enumeration should be started or is not yet complete. 7281func (page PrivateEndpointConnectionListPage) NotDone() bool { 7282 return !page.pecl.IsEmpty() 7283} 7284 7285// Response returns the raw server response from the last page request. 7286func (page PrivateEndpointConnectionListPage) Response() PrivateEndpointConnectionList { 7287 return page.pecl 7288} 7289 7290// Values returns the slice of values for the current page or nil if there are no values. 7291func (page PrivateEndpointConnectionListPage) Values() []PrivateEndpointConnection { 7292 if page.pecl.IsEmpty() { 7293 return nil 7294 } 7295 return *page.pecl.Value 7296} 7297 7298// Creates a new instance of the PrivateEndpointConnectionListPage type. 7299func NewPrivateEndpointConnectionListPage(cur PrivateEndpointConnectionList, getNextPage func(context.Context, PrivateEndpointConnectionList) (PrivateEndpointConnectionList, error)) PrivateEndpointConnectionListPage { 7300 return PrivateEndpointConnectionListPage{ 7301 fn: getNextPage, 7302 pecl: cur, 7303 } 7304} 7305 7306// PrivateEndpointConnectionProperties properties of a private endpoint connection. 7307type PrivateEndpointConnectionProperties struct { 7308 // PrivateEndpoint - The private endpoint which the connection belongs to. 7309 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` 7310 // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. 7311 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` 7312 // ProvisioningState - READ-ONLY; Provisioning state of the private endpoint connection. 7313 ProvisioningState *string `json:"provisioningState,omitempty"` 7314} 7315 7316// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties. 7317func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { 7318 objectMap := make(map[string]interface{}) 7319 if pecp.PrivateEndpoint != nil { 7320 objectMap["privateEndpoint"] = pecp.PrivateEndpoint 7321 } 7322 if pecp.PrivateLinkServiceConnectionState != nil { 7323 objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState 7324 } 7325 return json.Marshal(objectMap) 7326} 7327 7328// PrivateEndpointConnectionsCreateFuture an abstraction for monitoring and retrieving the results of a 7329// long-running operation. 7330type PrivateEndpointConnectionsCreateFuture struct { 7331 azure.FutureAPI 7332 // Result returns the result of the asynchronous operation. 7333 // If the operation has not completed it will return an error. 7334 Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error) 7335} 7336 7337// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7338func (future *PrivateEndpointConnectionsCreateFuture) UnmarshalJSON(body []byte) error { 7339 var azFuture azure.Future 7340 if err := json.Unmarshal(body, &azFuture); err != nil { 7341 return err 7342 } 7343 future.FutureAPI = &azFuture 7344 future.Result = future.result 7345 return nil 7346} 7347 7348// result is the default implementation for PrivateEndpointConnectionsCreateFuture.Result. 7349func (future *PrivateEndpointConnectionsCreateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { 7350 var done bool 7351 done, err = future.DoneWithContext(context.Background(), client) 7352 if err != nil { 7353 err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsCreateFuture", "Result", future.Response(), "Polling failure") 7354 return 7355 } 7356 if !done { 7357 pec.Response.Response = future.Response() 7358 err = azure.NewAsyncOpIncompleteError("synapse.PrivateEndpointConnectionsCreateFuture") 7359 return 7360 } 7361 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7362 if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent { 7363 pec, err = client.CreateResponder(pec.Response.Response) 7364 if err != nil { 7365 err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsCreateFuture", "Result", pec.Response.Response, "Failure responding to request") 7366 } 7367 } 7368 return 7369} 7370 7371// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a 7372// long-running operation. 7373type PrivateEndpointConnectionsDeleteFuture struct { 7374 azure.FutureAPI 7375 // Result returns the result of the asynchronous operation. 7376 // If the operation has not completed it will return an error. 7377 Result func(PrivateEndpointConnectionsClient) (OperationResource, error) 7378} 7379 7380// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7381func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { 7382 var azFuture azure.Future 7383 if err := json.Unmarshal(body, &azFuture); err != nil { 7384 return err 7385 } 7386 future.FutureAPI = &azFuture 7387 future.Result = future.result 7388 return nil 7389} 7390 7391// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result. 7392func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (or OperationResource, err error) { 7393 var done bool 7394 done, err = future.DoneWithContext(context.Background(), client) 7395 if err != nil { 7396 err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") 7397 return 7398 } 7399 if !done { 7400 or.Response.Response = future.Response() 7401 err = azure.NewAsyncOpIncompleteError("synapse.PrivateEndpointConnectionsDeleteFuture") 7402 return 7403 } 7404 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7405 if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { 7406 or, err = client.DeleteResponder(or.Response.Response) 7407 if err != nil { 7408 err = autorest.NewErrorWithError(err, "synapse.PrivateEndpointConnectionsDeleteFuture", "Result", or.Response.Response, "Failure responding to request") 7409 } 7410 } 7411 return 7412} 7413 7414// PrivateLinkHub a privateLinkHub 7415type PrivateLinkHub struct { 7416 autorest.Response `json:"-"` 7417 // PrivateLinkHubProperties - PrivateLinkHub resource properties 7418 *PrivateLinkHubProperties `json:"properties,omitempty"` 7419 // Tags - Resource tags. 7420 Tags map[string]*string `json:"tags"` 7421 // Location - The geo-location where the resource lives 7422 Location *string `json:"location,omitempty"` 7423 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 7424 ID *string `json:"id,omitempty"` 7425 // Name - READ-ONLY; The name of the resource 7426 Name *string `json:"name,omitempty"` 7427 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 7428 Type *string `json:"type,omitempty"` 7429} 7430 7431// MarshalJSON is the custom marshaler for PrivateLinkHub. 7432func (plh PrivateLinkHub) MarshalJSON() ([]byte, error) { 7433 objectMap := make(map[string]interface{}) 7434 if plh.PrivateLinkHubProperties != nil { 7435 objectMap["properties"] = plh.PrivateLinkHubProperties 7436 } 7437 if plh.Tags != nil { 7438 objectMap["tags"] = plh.Tags 7439 } 7440 if plh.Location != nil { 7441 objectMap["location"] = plh.Location 7442 } 7443 return json.Marshal(objectMap) 7444} 7445 7446// UnmarshalJSON is the custom unmarshaler for PrivateLinkHub struct. 7447func (plh *PrivateLinkHub) UnmarshalJSON(body []byte) error { 7448 var m map[string]*json.RawMessage 7449 err := json.Unmarshal(body, &m) 7450 if err != nil { 7451 return err 7452 } 7453 for k, v := range m { 7454 switch k { 7455 case "properties": 7456 if v != nil { 7457 var privateLinkHubProperties PrivateLinkHubProperties 7458 err = json.Unmarshal(*v, &privateLinkHubProperties) 7459 if err != nil { 7460 return err 7461 } 7462 plh.PrivateLinkHubProperties = &privateLinkHubProperties 7463 } 7464 case "tags": 7465 if v != nil { 7466 var tags map[string]*string 7467 err = json.Unmarshal(*v, &tags) 7468 if err != nil { 7469 return err 7470 } 7471 plh.Tags = tags 7472 } 7473 case "location": 7474 if v != nil { 7475 var location string 7476 err = json.Unmarshal(*v, &location) 7477 if err != nil { 7478 return err 7479 } 7480 plh.Location = &location 7481 } 7482 case "id": 7483 if v != nil { 7484 var ID string 7485 err = json.Unmarshal(*v, &ID) 7486 if err != nil { 7487 return err 7488 } 7489 plh.ID = &ID 7490 } 7491 case "name": 7492 if v != nil { 7493 var name string 7494 err = json.Unmarshal(*v, &name) 7495 if err != nil { 7496 return err 7497 } 7498 plh.Name = &name 7499 } 7500 case "type": 7501 if v != nil { 7502 var typeVar string 7503 err = json.Unmarshal(*v, &typeVar) 7504 if err != nil { 7505 return err 7506 } 7507 plh.Type = &typeVar 7508 } 7509 } 7510 } 7511 7512 return nil 7513} 7514 7515// PrivateLinkHubInfoListResult list of privateLinkHubs 7516type PrivateLinkHubInfoListResult struct { 7517 autorest.Response `json:"-"` 7518 // NextLink - Link to the next page of results 7519 NextLink *string `json:"nextLink,omitempty"` 7520 // Value - List of privateLinkHubs 7521 Value *[]PrivateLinkHub `json:"value,omitempty"` 7522} 7523 7524// PrivateLinkHubInfoListResultIterator provides access to a complete listing of PrivateLinkHub values. 7525type PrivateLinkHubInfoListResultIterator struct { 7526 i int 7527 page PrivateLinkHubInfoListResultPage 7528} 7529 7530// NextWithContext advances to the next value. If there was an error making 7531// the request the iterator does not advance and the error is returned. 7532func (iter *PrivateLinkHubInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { 7533 if tracing.IsEnabled() { 7534 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubInfoListResultIterator.NextWithContext") 7535 defer func() { 7536 sc := -1 7537 if iter.Response().Response.Response != nil { 7538 sc = iter.Response().Response.Response.StatusCode 7539 } 7540 tracing.EndSpan(ctx, sc, err) 7541 }() 7542 } 7543 iter.i++ 7544 if iter.i < len(iter.page.Values()) { 7545 return nil 7546 } 7547 err = iter.page.NextWithContext(ctx) 7548 if err != nil { 7549 iter.i-- 7550 return err 7551 } 7552 iter.i = 0 7553 return nil 7554} 7555 7556// Next advances to the next value. If there was an error making 7557// the request the iterator does not advance and the error is returned. 7558// Deprecated: Use NextWithContext() instead. 7559func (iter *PrivateLinkHubInfoListResultIterator) Next() error { 7560 return iter.NextWithContext(context.Background()) 7561} 7562 7563// NotDone returns true if the enumeration should be started or is not yet complete. 7564func (iter PrivateLinkHubInfoListResultIterator) NotDone() bool { 7565 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7566} 7567 7568// Response returns the raw server response from the last page request. 7569func (iter PrivateLinkHubInfoListResultIterator) Response() PrivateLinkHubInfoListResult { 7570 return iter.page.Response() 7571} 7572 7573// Value returns the current value or a zero-initialized value if the 7574// iterator has advanced beyond the end of the collection. 7575func (iter PrivateLinkHubInfoListResultIterator) Value() PrivateLinkHub { 7576 if !iter.page.NotDone() { 7577 return PrivateLinkHub{} 7578 } 7579 return iter.page.Values()[iter.i] 7580} 7581 7582// Creates a new instance of the PrivateLinkHubInfoListResultIterator type. 7583func NewPrivateLinkHubInfoListResultIterator(page PrivateLinkHubInfoListResultPage) PrivateLinkHubInfoListResultIterator { 7584 return PrivateLinkHubInfoListResultIterator{page: page} 7585} 7586 7587// IsEmpty returns true if the ListResult contains no values. 7588func (plhilr PrivateLinkHubInfoListResult) IsEmpty() bool { 7589 return plhilr.Value == nil || len(*plhilr.Value) == 0 7590} 7591 7592// hasNextLink returns true if the NextLink is not empty. 7593func (plhilr PrivateLinkHubInfoListResult) hasNextLink() bool { 7594 return plhilr.NextLink != nil && len(*plhilr.NextLink) != 0 7595} 7596 7597// privateLinkHubInfoListResultPreparer prepares a request to retrieve the next set of results. 7598// It returns nil if no more results exist. 7599func (plhilr PrivateLinkHubInfoListResult) privateLinkHubInfoListResultPreparer(ctx context.Context) (*http.Request, error) { 7600 if !plhilr.hasNextLink() { 7601 return nil, nil 7602 } 7603 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7604 autorest.AsJSON(), 7605 autorest.AsGet(), 7606 autorest.WithBaseURL(to.String(plhilr.NextLink))) 7607} 7608 7609// PrivateLinkHubInfoListResultPage contains a page of PrivateLinkHub values. 7610type PrivateLinkHubInfoListResultPage struct { 7611 fn func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error) 7612 plhilr PrivateLinkHubInfoListResult 7613} 7614 7615// NextWithContext advances to the next page of values. If there was an error making 7616// the request the page does not advance and the error is returned. 7617func (page *PrivateLinkHubInfoListResultPage) NextWithContext(ctx context.Context) (err error) { 7618 if tracing.IsEnabled() { 7619 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubInfoListResultPage.NextWithContext") 7620 defer func() { 7621 sc := -1 7622 if page.Response().Response.Response != nil { 7623 sc = page.Response().Response.Response.StatusCode 7624 } 7625 tracing.EndSpan(ctx, sc, err) 7626 }() 7627 } 7628 for { 7629 next, err := page.fn(ctx, page.plhilr) 7630 if err != nil { 7631 return err 7632 } 7633 page.plhilr = next 7634 if !next.hasNextLink() || !next.IsEmpty() { 7635 break 7636 } 7637 } 7638 return nil 7639} 7640 7641// Next advances to the next page of values. If there was an error making 7642// the request the page does not advance and the error is returned. 7643// Deprecated: Use NextWithContext() instead. 7644func (page *PrivateLinkHubInfoListResultPage) Next() error { 7645 return page.NextWithContext(context.Background()) 7646} 7647 7648// NotDone returns true if the page enumeration should be started or is not yet complete. 7649func (page PrivateLinkHubInfoListResultPage) NotDone() bool { 7650 return !page.plhilr.IsEmpty() 7651} 7652 7653// Response returns the raw server response from the last page request. 7654func (page PrivateLinkHubInfoListResultPage) Response() PrivateLinkHubInfoListResult { 7655 return page.plhilr 7656} 7657 7658// Values returns the slice of values for the current page or nil if there are no values. 7659func (page PrivateLinkHubInfoListResultPage) Values() []PrivateLinkHub { 7660 if page.plhilr.IsEmpty() { 7661 return nil 7662 } 7663 return *page.plhilr.Value 7664} 7665 7666// Creates a new instance of the PrivateLinkHubInfoListResultPage type. 7667func NewPrivateLinkHubInfoListResultPage(cur PrivateLinkHubInfoListResult, getNextPage func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error)) PrivateLinkHubInfoListResultPage { 7668 return PrivateLinkHubInfoListResultPage{ 7669 fn: getNextPage, 7670 plhilr: cur, 7671 } 7672} 7673 7674// PrivateLinkHubPatchInfo privateLinkHub patch details 7675type PrivateLinkHubPatchInfo struct { 7676 // Tags - Resource tags 7677 Tags map[string]*string `json:"tags"` 7678} 7679 7680// MarshalJSON is the custom marshaler for PrivateLinkHubPatchInfo. 7681func (plhpi PrivateLinkHubPatchInfo) MarshalJSON() ([]byte, error) { 7682 objectMap := make(map[string]interface{}) 7683 if plhpi.Tags != nil { 7684 objectMap["tags"] = plhpi.Tags 7685 } 7686 return json.Marshal(objectMap) 7687} 7688 7689// PrivateLinkHubProperties privateLinkHub properties 7690type PrivateLinkHubProperties struct { 7691 // ProvisioningState - PrivateLinkHub provisioning state 7692 ProvisioningState *string `json:"provisioningState,omitempty"` 7693 // PrivateEndpointConnections - READ-ONLY; List of private endpoint connections 7694 PrivateEndpointConnections *[]PrivateEndpointConnectionForPrivateLinkHubBasic `json:"privateEndpointConnections,omitempty"` 7695} 7696 7697// MarshalJSON is the custom marshaler for PrivateLinkHubProperties. 7698func (plhp PrivateLinkHubProperties) MarshalJSON() ([]byte, error) { 7699 objectMap := make(map[string]interface{}) 7700 if plhp.ProvisioningState != nil { 7701 objectMap["provisioningState"] = plhp.ProvisioningState 7702 } 7703 return json.Marshal(objectMap) 7704} 7705 7706// PrivateLinkHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 7707// operation. 7708type PrivateLinkHubsDeleteFuture struct { 7709 azure.FutureAPI 7710 // Result returns the result of the asynchronous operation. 7711 // If the operation has not completed it will return an error. 7712 Result func(PrivateLinkHubsClient) (autorest.Response, error) 7713} 7714 7715// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7716func (future *PrivateLinkHubsDeleteFuture) UnmarshalJSON(body []byte) error { 7717 var azFuture azure.Future 7718 if err := json.Unmarshal(body, &azFuture); err != nil { 7719 return err 7720 } 7721 future.FutureAPI = &azFuture 7722 future.Result = future.result 7723 return nil 7724} 7725 7726// result is the default implementation for PrivateLinkHubsDeleteFuture.Result. 7727func (future *PrivateLinkHubsDeleteFuture) result(client PrivateLinkHubsClient) (ar autorest.Response, err error) { 7728 var done bool 7729 done, err = future.DoneWithContext(context.Background(), client) 7730 if err != nil { 7731 err = autorest.NewErrorWithError(err, "synapse.PrivateLinkHubsDeleteFuture", "Result", future.Response(), "Polling failure") 7732 return 7733 } 7734 if !done { 7735 ar.Response = future.Response() 7736 err = azure.NewAsyncOpIncompleteError("synapse.PrivateLinkHubsDeleteFuture") 7737 return 7738 } 7739 ar.Response = future.Response() 7740 return 7741} 7742 7743// PrivateLinkResource a private link resource 7744type PrivateLinkResource struct { 7745 autorest.Response `json:"-"` 7746 // Properties - READ-ONLY; The private link resource properties. 7747 Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` 7748 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 7749 ID *string `json:"id,omitempty"` 7750 // Name - READ-ONLY; The name of the resource 7751 Name *string `json:"name,omitempty"` 7752 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 7753 Type *string `json:"type,omitempty"` 7754} 7755 7756// MarshalJSON is the custom marshaler for PrivateLinkResource. 7757func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { 7758 objectMap := make(map[string]interface{}) 7759 return json.Marshal(objectMap) 7760} 7761 7762// PrivateLinkResourceListResult a list of private link resources 7763type PrivateLinkResourceListResult struct { 7764 autorest.Response `json:"-"` 7765 // Value - READ-ONLY; Array of results. 7766 Value *[]PrivateLinkResource `json:"value,omitempty"` 7767 // NextLink - READ-ONLY; Link to retrieve next page of results. 7768 NextLink *string `json:"nextLink,omitempty"` 7769} 7770 7771// MarshalJSON is the custom marshaler for PrivateLinkResourceListResult. 7772func (plrlr PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { 7773 objectMap := make(map[string]interface{}) 7774 return json.Marshal(objectMap) 7775} 7776 7777// PrivateLinkResourceListResultIterator provides access to a complete listing of PrivateLinkResource 7778// values. 7779type PrivateLinkResourceListResultIterator struct { 7780 i int 7781 page PrivateLinkResourceListResultPage 7782} 7783 7784// NextWithContext advances to the next value. If there was an error making 7785// the request the iterator does not advance and the error is returned. 7786func (iter *PrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) { 7787 if tracing.IsEnabled() { 7788 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultIterator.NextWithContext") 7789 defer func() { 7790 sc := -1 7791 if iter.Response().Response.Response != nil { 7792 sc = iter.Response().Response.Response.StatusCode 7793 } 7794 tracing.EndSpan(ctx, sc, err) 7795 }() 7796 } 7797 iter.i++ 7798 if iter.i < len(iter.page.Values()) { 7799 return nil 7800 } 7801 err = iter.page.NextWithContext(ctx) 7802 if err != nil { 7803 iter.i-- 7804 return err 7805 } 7806 iter.i = 0 7807 return nil 7808} 7809 7810// Next advances to the next value. If there was an error making 7811// the request the iterator does not advance and the error is returned. 7812// Deprecated: Use NextWithContext() instead. 7813func (iter *PrivateLinkResourceListResultIterator) Next() error { 7814 return iter.NextWithContext(context.Background()) 7815} 7816 7817// NotDone returns true if the enumeration should be started or is not yet complete. 7818func (iter PrivateLinkResourceListResultIterator) NotDone() bool { 7819 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7820} 7821 7822// Response returns the raw server response from the last page request. 7823func (iter PrivateLinkResourceListResultIterator) Response() PrivateLinkResourceListResult { 7824 return iter.page.Response() 7825} 7826 7827// Value returns the current value or a zero-initialized value if the 7828// iterator has advanced beyond the end of the collection. 7829func (iter PrivateLinkResourceListResultIterator) Value() PrivateLinkResource { 7830 if !iter.page.NotDone() { 7831 return PrivateLinkResource{} 7832 } 7833 return iter.page.Values()[iter.i] 7834} 7835 7836// Creates a new instance of the PrivateLinkResourceListResultIterator type. 7837func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { 7838 return PrivateLinkResourceListResultIterator{page: page} 7839} 7840 7841// IsEmpty returns true if the ListResult contains no values. 7842func (plrlr PrivateLinkResourceListResult) IsEmpty() bool { 7843 return plrlr.Value == nil || len(*plrlr.Value) == 0 7844} 7845 7846// hasNextLink returns true if the NextLink is not empty. 7847func (plrlr PrivateLinkResourceListResult) hasNextLink() bool { 7848 return plrlr.NextLink != nil && len(*plrlr.NextLink) != 0 7849} 7850 7851// privateLinkResourceListResultPreparer prepares a request to retrieve the next set of results. 7852// It returns nil if no more results exist. 7853func (plrlr PrivateLinkResourceListResult) privateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) { 7854 if !plrlr.hasNextLink() { 7855 return nil, nil 7856 } 7857 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7858 autorest.AsJSON(), 7859 autorest.AsGet(), 7860 autorest.WithBaseURL(to.String(plrlr.NextLink))) 7861} 7862 7863// PrivateLinkResourceListResultPage contains a page of PrivateLinkResource values. 7864type PrivateLinkResourceListResultPage struct { 7865 fn func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error) 7866 plrlr PrivateLinkResourceListResult 7867} 7868 7869// NextWithContext advances to the next page of values. If there was an error making 7870// the request the page does not advance and the error is returned. 7871func (page *PrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) { 7872 if tracing.IsEnabled() { 7873 ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultPage.NextWithContext") 7874 defer func() { 7875 sc := -1 7876 if page.Response().Response.Response != nil { 7877 sc = page.Response().Response.Response.StatusCode 7878 } 7879 tracing.EndSpan(ctx, sc, err) 7880 }() 7881 } 7882 for { 7883 next, err := page.fn(ctx, page.plrlr) 7884 if err != nil { 7885 return err 7886 } 7887 page.plrlr = next 7888 if !next.hasNextLink() || !next.IsEmpty() { 7889 break 7890 } 7891 } 7892 return nil 7893} 7894 7895// Next advances to the next page of values. If there was an error making 7896// the request the page does not advance and the error is returned. 7897// Deprecated: Use NextWithContext() instead. 7898func (page *PrivateLinkResourceListResultPage) Next() error { 7899 return page.NextWithContext(context.Background()) 7900} 7901 7902// NotDone returns true if the page enumeration should be started or is not yet complete. 7903func (page PrivateLinkResourceListResultPage) NotDone() bool { 7904 return !page.plrlr.IsEmpty() 7905} 7906 7907// Response returns the raw server response from the last page request. 7908func (page PrivateLinkResourceListResultPage) Response() PrivateLinkResourceListResult { 7909 return page.plrlr 7910} 7911 7912// Values returns the slice of values for the current page or nil if there are no values. 7913func (page PrivateLinkResourceListResultPage) Values() []PrivateLinkResource { 7914 if page.plrlr.IsEmpty() { 7915 return nil 7916 } 7917 return *page.plrlr.Value 7918} 7919 7920// Creates a new instance of the PrivateLinkResourceListResultPage type. 7921func NewPrivateLinkResourceListResultPage(cur PrivateLinkResourceListResult, getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { 7922 return PrivateLinkResourceListResultPage{ 7923 fn: getNextPage, 7924 plrlr: cur, 7925 } 7926} 7927 7928// PrivateLinkResourceProperties properties of a private link resource. 7929type PrivateLinkResourceProperties struct { 7930 // GroupID - READ-ONLY; The private link resource group id. 7931 GroupID *string `json:"groupId,omitempty"` 7932 // RequiredMembers - READ-ONLY; The private link resource required member names. 7933 RequiredMembers *[]string `json:"requiredMembers,omitempty"` 7934 // RequiredZoneNames - READ-ONLY; Required DNS zone names of the the private link resource. 7935 RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` 7936} 7937 7938// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties. 7939func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { 7940 objectMap := make(map[string]interface{}) 7941 return json.Marshal(objectMap) 7942} 7943 7944// PrivateLinkServiceConnectionState connection state details of the private endpoint 7945type PrivateLinkServiceConnectionState struct { 7946 // Status - The private link service connection status. 7947 Status *string `json:"status,omitempty"` 7948 // Description - The private link service connection description. 7949 Description *string `json:"description,omitempty"` 7950 // ActionsRequired - READ-ONLY; The actions required for private link service connection. 7951 ActionsRequired *string `json:"actionsRequired,omitempty"` 7952} 7953 7954// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionState. 7955func (plscs PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { 7956 objectMap := make(map[string]interface{}) 7957 if plscs.Status != nil { 7958 objectMap["status"] = plscs.Status 7959 } 7960 if plscs.Description != nil { 7961 objectMap["description"] = plscs.Description 7962 } 7963 return json.Marshal(objectMap) 7964} 7965 7966// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not 7967// have tags and a location 7968type ProxyResource struct { 7969 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 7970 ID *string `json:"id,omitempty"` 7971 // Name - READ-ONLY; The name of the resource 7972 Name *string `json:"name,omitempty"` 7973 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 7974 Type *string `json:"type,omitempty"` 7975} 7976 7977// MarshalJSON is the custom marshaler for ProxyResource. 7978func (pr ProxyResource) MarshalJSON() ([]byte, error) { 7979 objectMap := make(map[string]interface{}) 7980 return json.Marshal(objectMap) 7981} 7982 7983// PurviewConfiguration purview Configuration 7984type PurviewConfiguration struct { 7985 // PurviewResourceID - Purview Resource ID 7986 PurviewResourceID *string `json:"purviewResourceId,omitempty"` 7987} 7988 7989// QueryInterval a database query. 7990type QueryInterval struct { 7991 // IntervalStartTime - READ-ONLY; The start time of the measurement interval (ISO8601 format). 7992 IntervalStartTime *date.Time `json:"intervalStartTime,omitempty"` 7993 // ExecutionCount - READ-ONLY; The number of times the query was executed during this interval. 7994 ExecutionCount *float64 `json:"executionCount,omitempty"` 7995 // Metrics - READ-ONLY; The list of query metrics during this interval. 7996 Metrics *[]QueryMetric `json:"metrics,omitempty"` 7997} 7998 7999// MarshalJSON is the custom marshaler for QueryInterval. 8000func (qi QueryInterval) MarshalJSON() ([]byte, error) { 8001 objectMap := make(map[string]interface{}) 8002 return json.Marshal(objectMap) 8003} 8004 8005// QueryMetric a database query. 8006type QueryMetric struct { 8007 // Name - READ-ONLY; The name of the metric 8008 Name *string `json:"name,omitempty"` 8009 // DisplayName - READ-ONLY; The name of the metric for display in user interface 8010 DisplayName *string `json:"displayName,omitempty"` 8011 // Unit - READ-ONLY; The unit of measurement. Possible values include: 'QueryMetricUnitPercentage', 'QueryMetricUnitKB', 'QueryMetricUnitMicroseconds' 8012 Unit QueryMetricUnit `json:"unit,omitempty"` 8013 // Value - READ-ONLY; The measured value 8014 Value *float64 `json:"value,omitempty"` 8015} 8016 8017// MarshalJSON is the custom marshaler for QueryMetric. 8018func (qm QueryMetric) MarshalJSON() ([]byte, error) { 8019 objectMap := make(map[string]interface{}) 8020 return json.Marshal(objectMap) 8021} 8022 8023// QueryStatistic a database query. 8024type QueryStatistic struct { 8025 // QueryID - READ-ONLY; The id of the query 8026 QueryID *string `json:"queryId,omitempty"` 8027 // Intervals - READ-ONLY; The list of query intervals. 8028 Intervals *[]QueryInterval `json:"intervals,omitempty"` 8029} 8030 8031// MarshalJSON is the custom marshaler for QueryStatistic. 8032func (qs QueryStatistic) MarshalJSON() ([]byte, error) { 8033 objectMap := make(map[string]interface{}) 8034 return json.Marshal(objectMap) 8035} 8036 8037// RecommendedSensitivityLabelUpdate a recommended sensitivity label update operation. 8038type RecommendedSensitivityLabelUpdate struct { 8039 // RecommendedSensitivityLabelUpdateProperties - Resource properties. 8040 *RecommendedSensitivityLabelUpdateProperties `json:"properties,omitempty"` 8041 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 8042 ID *string `json:"id,omitempty"` 8043 // Name - READ-ONLY; The name of the resource 8044 Name *string `json:"name,omitempty"` 8045 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 8046 Type *string `json:"type,omitempty"` 8047} 8048 8049// MarshalJSON is the custom marshaler for RecommendedSensitivityLabelUpdate. 8050func (rslu RecommendedSensitivityLabelUpdate) MarshalJSON() ([]byte, error) { 8051 objectMap := make(map[string]interface{}) 8052 if rslu.RecommendedSensitivityLabelUpdateProperties != nil { 8053 objectMap["properties"] = rslu.RecommendedSensitivityLabelUpdateProperties 8054 } 8055 return json.Marshal(objectMap) 8056} 8057 8058// UnmarshalJSON is the custom unmarshaler for RecommendedSensitivityLabelUpdate struct. 8059func (rslu *RecommendedSensitivityLabelUpdate) UnmarshalJSON(body []byte) error { 8060 var m map[string]*json.RawMessage 8061 err := json.Unmarshal(body, &m) 8062 if err != nil { 8063 return err 8064 } 8065 for k, v := range m { 8066 switch k { 8067 case "properties": 8068 if v != nil { 8069 var recommendedSensitivityLabelUpdateProperties RecommendedSensitivityLabelUpdateProperties 8070 err = json.Unmarshal(*v, &recommendedSensitivityLabelUpdateProperties) 8071 if err != nil { 8072 return err 8073 } 8074 rslu.RecommendedSensitivityLabelUpdateProperties = &recommendedSensitivityLabelUpdateProperties 8075 } 8076 case "id": 8077 if v != nil { 8078 var ID string 8079 err = json.Unmarshal(*v, &ID) 8080 if err != nil { 8081 return err 8082 } 8083 rslu.ID = &ID 8084 } 8085 case "name": 8086 if v != nil { 8087 var name string 8088 err = json.Unmarshal(*v, &name) 8089 if err != nil { 8090 return err 8091 } 8092 rslu.Name = &name 8093 } 8094 case "type": 8095 if v != nil { 8096 var typeVar string 8097 err = json.Unmarshal(*v, &typeVar) 8098 if err != nil { 8099 return err 8100 } 8101 rslu.Type = &typeVar 8102 } 8103 } 8104 } 8105 8106 return nil 8107} 8108 8109// RecommendedSensitivityLabelUpdateList a list of recommended sensitivity label update operations. 8110type RecommendedSensitivityLabelUpdateList struct { 8111 Operations *[]RecommendedSensitivityLabelUpdate `json:"operations,omitempty"` 8112} 8113 8114// RecommendedSensitivityLabelUpdateProperties properties of an operation executed on a recommended 8115// sensitivity label. 8116type RecommendedSensitivityLabelUpdateProperties struct { 8117 // Op - Possible values include: 'RecommendedSensitivityLabelUpdateKindEnable', 'RecommendedSensitivityLabelUpdateKindDisable' 8118 Op RecommendedSensitivityLabelUpdateKind `json:"op,omitempty"` 8119 // Schema - Schema name of the column to update. 8120 Schema *string `json:"schema,omitempty"` 8121 // Table - Table name of the column to update. 8122 Table *string `json:"table,omitempty"` 8123 // Column - Column name to update. 8124 Column *string `json:"column,omitempty"` 8125} 8126 8127// RecoverableSQLPool a recoverable sql pool 8128type RecoverableSQLPool struct { 8129 autorest.Response `json:"-"` 8130 // RecoverableSQLPoolProperties - The properties of a recoverable sql pool 8131 *RecoverableSQLPoolProperties `json:"properties,omitempty"` 8132 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 8133 ID *string `json:"id,omitempty"` 8134 // Name - READ-ONLY; The name of the resource 8135 Name *string `json:"name,omitempty"` 8136 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 8137 Type *string `json:"type,omitempty"` 8138} 8139 8140// MarshalJSON is the custom marshaler for RecoverableSQLPool. 8141func (rsp RecoverableSQLPool) MarshalJSON() ([]byte, error) { 8142 objectMap := make(map[string]interface{}) 8143 if rsp.RecoverableSQLPoolProperties != nil { 8144 objectMap["properties"] = rsp.RecoverableSQLPoolProperties 8145 } 8146 return json.Marshal(objectMap) 8147} 8148 8149// UnmarshalJSON is the custom unmarshaler for RecoverableSQLPool struct. 8150func (rsp *RecoverableSQLPool) UnmarshalJSON(body []byte) error { 8151 var m map[string]*json.RawMessage 8152 err := json.Unmarshal(body, &m) 8153 if err != nil { 8154 return err 8155 } 8156 for k, v := range m { 8157 switch k { 8158 case "properties": 8159 if v != nil { 8160 var recoverableSQLPoolProperties RecoverableSQLPoolProperties 8161 err = json.Unmarshal(*v, &recoverableSQLPoolProperties) 8162 if err != nil { 8163 return err 8164 } 8165 rsp.RecoverableSQLPoolProperties = &recoverableSQLPoolProperties 8166 } 8167 case "id": 8168 if v != nil { 8169 var ID string 8170 err = json.Unmarshal(*v, &ID) 8171 if err != nil { 8172 return err 8173 } 8174 rsp.ID = &ID 8175 } 8176 case "name": 8177 if v != nil { 8178 var name string 8179 err = json.Unmarshal(*v, &name) 8180 if err != nil { 8181 return err 8182 } 8183 rsp.Name = &name 8184 } 8185 case "type": 8186 if v != nil { 8187 var typeVar string 8188 err = json.Unmarshal(*v, &typeVar) 8189 if err != nil { 8190 return err 8191 } 8192 rsp.Type = &typeVar 8193 } 8194 } 8195 } 8196 8197 return nil 8198} 8199 8200// RecoverableSQLPoolListResult the response to a list recoverable sql pools request 8201type RecoverableSQLPoolListResult struct { 8202 autorest.Response `json:"-"` 8203 // Value - READ-ONLY; A list of recoverable sql pool 8204 Value *[]RecoverableSQLPool `json:"value,omitempty"` 8205 // NextLink - READ-ONLY; Link to retrieve next page of results. 8206 NextLink *string `json:"nextLink,omitempty"` 8207} 8208 8209// MarshalJSON is the custom marshaler for RecoverableSQLPoolListResult. 8210func (rsplr RecoverableSQLPoolListResult) MarshalJSON() ([]byte, error) { 8211 objectMap := make(map[string]interface{}) 8212 return json.Marshal(objectMap) 8213} 8214 8215// RecoverableSQLPoolListResultIterator provides access to a complete listing of RecoverableSQLPool values. 8216type RecoverableSQLPoolListResultIterator struct { 8217 i int 8218 page RecoverableSQLPoolListResultPage 8219} 8220 8221// NextWithContext advances to the next value. If there was an error making 8222// the request the iterator does not advance and the error is returned. 8223func (iter *RecoverableSQLPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { 8224 if tracing.IsEnabled() { 8225 ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableSQLPoolListResultIterator.NextWithContext") 8226 defer func() { 8227 sc := -1 8228 if iter.Response().Response.Response != nil { 8229 sc = iter.Response().Response.Response.StatusCode 8230 } 8231 tracing.EndSpan(ctx, sc, err) 8232 }() 8233 } 8234 iter.i++ 8235 if iter.i < len(iter.page.Values()) { 8236 return nil 8237 } 8238 err = iter.page.NextWithContext(ctx) 8239 if err != nil { 8240 iter.i-- 8241 return err 8242 } 8243 iter.i = 0 8244 return nil 8245} 8246 8247// Next advances to the next value. If there was an error making 8248// the request the iterator does not advance and the error is returned. 8249// Deprecated: Use NextWithContext() instead. 8250func (iter *RecoverableSQLPoolListResultIterator) Next() error { 8251 return iter.NextWithContext(context.Background()) 8252} 8253 8254// NotDone returns true if the enumeration should be started or is not yet complete. 8255func (iter RecoverableSQLPoolListResultIterator) NotDone() bool { 8256 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8257} 8258 8259// Response returns the raw server response from the last page request. 8260func (iter RecoverableSQLPoolListResultIterator) Response() RecoverableSQLPoolListResult { 8261 return iter.page.Response() 8262} 8263 8264// Value returns the current value or a zero-initialized value if the 8265// iterator has advanced beyond the end of the collection. 8266func (iter RecoverableSQLPoolListResultIterator) Value() RecoverableSQLPool { 8267 if !iter.page.NotDone() { 8268 return RecoverableSQLPool{} 8269 } 8270 return iter.page.Values()[iter.i] 8271} 8272 8273// Creates a new instance of the RecoverableSQLPoolListResultIterator type. 8274func NewRecoverableSQLPoolListResultIterator(page RecoverableSQLPoolListResultPage) RecoverableSQLPoolListResultIterator { 8275 return RecoverableSQLPoolListResultIterator{page: page} 8276} 8277 8278// IsEmpty returns true if the ListResult contains no values. 8279func (rsplr RecoverableSQLPoolListResult) IsEmpty() bool { 8280 return rsplr.Value == nil || len(*rsplr.Value) == 0 8281} 8282 8283// hasNextLink returns true if the NextLink is not empty. 8284func (rsplr RecoverableSQLPoolListResult) hasNextLink() bool { 8285 return rsplr.NextLink != nil && len(*rsplr.NextLink) != 0 8286} 8287 8288// recoverableSQLPoolListResultPreparer prepares a request to retrieve the next set of results. 8289// It returns nil if no more results exist. 8290func (rsplr RecoverableSQLPoolListResult) recoverableSQLPoolListResultPreparer(ctx context.Context) (*http.Request, error) { 8291 if !rsplr.hasNextLink() { 8292 return nil, nil 8293 } 8294 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8295 autorest.AsJSON(), 8296 autorest.AsGet(), 8297 autorest.WithBaseURL(to.String(rsplr.NextLink))) 8298} 8299 8300// RecoverableSQLPoolListResultPage contains a page of RecoverableSQLPool values. 8301type RecoverableSQLPoolListResultPage struct { 8302 fn func(context.Context, RecoverableSQLPoolListResult) (RecoverableSQLPoolListResult, error) 8303 rsplr RecoverableSQLPoolListResult 8304} 8305 8306// NextWithContext advances to the next page of values. If there was an error making 8307// the request the page does not advance and the error is returned. 8308func (page *RecoverableSQLPoolListResultPage) NextWithContext(ctx context.Context) (err error) { 8309 if tracing.IsEnabled() { 8310 ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableSQLPoolListResultPage.NextWithContext") 8311 defer func() { 8312 sc := -1 8313 if page.Response().Response.Response != nil { 8314 sc = page.Response().Response.Response.StatusCode 8315 } 8316 tracing.EndSpan(ctx, sc, err) 8317 }() 8318 } 8319 for { 8320 next, err := page.fn(ctx, page.rsplr) 8321 if err != nil { 8322 return err 8323 } 8324 page.rsplr = next 8325 if !next.hasNextLink() || !next.IsEmpty() { 8326 break 8327 } 8328 } 8329 return nil 8330} 8331 8332// Next advances to the next page of values. If there was an error making 8333// the request the page does not advance and the error is returned. 8334// Deprecated: Use NextWithContext() instead. 8335func (page *RecoverableSQLPoolListResultPage) Next() error { 8336 return page.NextWithContext(context.Background()) 8337} 8338 8339// NotDone returns true if the page enumeration should be started or is not yet complete. 8340func (page RecoverableSQLPoolListResultPage) NotDone() bool { 8341 return !page.rsplr.IsEmpty() 8342} 8343 8344// Response returns the raw server response from the last page request. 8345func (page RecoverableSQLPoolListResultPage) Response() RecoverableSQLPoolListResult { 8346 return page.rsplr 8347} 8348 8349// Values returns the slice of values for the current page or nil if there are no values. 8350func (page RecoverableSQLPoolListResultPage) Values() []RecoverableSQLPool { 8351 if page.rsplr.IsEmpty() { 8352 return nil 8353 } 8354 return *page.rsplr.Value 8355} 8356 8357// Creates a new instance of the RecoverableSQLPoolListResultPage type. 8358func NewRecoverableSQLPoolListResultPage(cur RecoverableSQLPoolListResult, getNextPage func(context.Context, RecoverableSQLPoolListResult) (RecoverableSQLPoolListResult, error)) RecoverableSQLPoolListResultPage { 8359 return RecoverableSQLPoolListResultPage{ 8360 fn: getNextPage, 8361 rsplr: cur, 8362 } 8363} 8364 8365// RecoverableSQLPoolProperties the properties of a recoverable sql pool 8366type RecoverableSQLPoolProperties struct { 8367 // Edition - READ-ONLY; The edition of the database 8368 Edition *string `json:"edition,omitempty"` 8369 // ServiceLevelObjective - READ-ONLY; The service level objective name of the database 8370 ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` 8371 // ElasticPoolName - READ-ONLY; The elastic pool name of the database 8372 ElasticPoolName *string `json:"elasticPoolName,omitempty"` 8373 // LastAvailableBackupDate - READ-ONLY; The last available backup date of the database (ISO8601 format) 8374 LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"` 8375} 8376 8377// MarshalJSON is the custom marshaler for RecoverableSQLPoolProperties. 8378func (rspp RecoverableSQLPoolProperties) MarshalJSON() ([]byte, error) { 8379 objectMap := make(map[string]interface{}) 8380 return json.Marshal(objectMap) 8381} 8382 8383// ReplaceAllFirewallRulesOperationResponse an existing operation for replacing the firewall rules 8384type ReplaceAllFirewallRulesOperationResponse struct { 8385 autorest.Response `json:"-"` 8386 // OperationID - The operation ID 8387 OperationID *string `json:"operationId,omitempty"` 8388} 8389 8390// ReplaceAllIPFirewallRulesRequest replace all IP firewall rules request 8391type ReplaceAllIPFirewallRulesRequest struct { 8392 // IPFirewallRules - IP firewall rule properties 8393 IPFirewallRules map[string]*IPFirewallRuleProperties `json:"ipFirewallRules"` 8394} 8395 8396// MarshalJSON is the custom marshaler for ReplaceAllIPFirewallRulesRequest. 8397func (raifrr ReplaceAllIPFirewallRulesRequest) MarshalJSON() ([]byte, error) { 8398 objectMap := make(map[string]interface{}) 8399 if raifrr.IPFirewallRules != nil { 8400 objectMap["ipFirewallRules"] = raifrr.IPFirewallRules 8401 } 8402 return json.Marshal(objectMap) 8403} 8404 8405// ReplicationLink represents a Sql pool replication link. 8406type ReplicationLink struct { 8407 autorest.Response `json:"-"` 8408 // Location - READ-ONLY; Location of the workspace that contains this firewall rule. 8409 Location *string `json:"location,omitempty"` 8410 // ReplicationLinkProperties - The properties representing the resource. 8411 *ReplicationLinkProperties `json:"properties,omitempty"` 8412 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 8413 ID *string `json:"id,omitempty"` 8414 // Name - READ-ONLY; The name of the resource 8415 Name *string `json:"name,omitempty"` 8416 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 8417 Type *string `json:"type,omitempty"` 8418} 8419 8420// MarshalJSON is the custom marshaler for ReplicationLink. 8421func (rl ReplicationLink) MarshalJSON() ([]byte, error) { 8422 objectMap := make(map[string]interface{}) 8423 if rl.ReplicationLinkProperties != nil { 8424 objectMap["properties"] = rl.ReplicationLinkProperties 8425 } 8426 return json.Marshal(objectMap) 8427} 8428 8429// UnmarshalJSON is the custom unmarshaler for ReplicationLink struct. 8430func (rl *ReplicationLink) UnmarshalJSON(body []byte) error { 8431 var m map[string]*json.RawMessage 8432 err := json.Unmarshal(body, &m) 8433 if err != nil { 8434 return err 8435 } 8436 for k, v := range m { 8437 switch k { 8438 case "location": 8439 if v != nil { 8440 var location string 8441 err = json.Unmarshal(*v, &location) 8442 if err != nil { 8443 return err 8444 } 8445 rl.Location = &location 8446 } 8447 case "properties": 8448 if v != nil { 8449 var replicationLinkProperties ReplicationLinkProperties 8450 err = json.Unmarshal(*v, &replicationLinkProperties) 8451 if err != nil { 8452 return err 8453 } 8454 rl.ReplicationLinkProperties = &replicationLinkProperties 8455 } 8456 case "id": 8457 if v != nil { 8458 var ID string 8459 err = json.Unmarshal(*v, &ID) 8460 if err != nil { 8461 return err 8462 } 8463 rl.ID = &ID 8464 } 8465 case "name": 8466 if v != nil { 8467 var name string 8468 err = json.Unmarshal(*v, &name) 8469 if err != nil { 8470 return err 8471 } 8472 rl.Name = &name 8473 } 8474 case "type": 8475 if v != nil { 8476 var typeVar string 8477 err = json.Unmarshal(*v, &typeVar) 8478 if err != nil { 8479 return err 8480 } 8481 rl.Type = &typeVar 8482 } 8483 } 8484 } 8485 8486 return nil 8487} 8488 8489// ReplicationLinkListResult represents the response to a List Sql pool replication link request. 8490type ReplicationLinkListResult struct { 8491 autorest.Response `json:"-"` 8492 // Value - The list of Sql pool replication links housed in the Sql pool. 8493 Value *[]ReplicationLink `json:"value,omitempty"` 8494 // NextLink - READ-ONLY; Link to retrieve next page of results. 8495 NextLink *string `json:"nextLink,omitempty"` 8496} 8497 8498// MarshalJSON is the custom marshaler for ReplicationLinkListResult. 8499func (rllr ReplicationLinkListResult) MarshalJSON() ([]byte, error) { 8500 objectMap := make(map[string]interface{}) 8501 if rllr.Value != nil { 8502 objectMap["value"] = rllr.Value 8503 } 8504 return json.Marshal(objectMap) 8505} 8506 8507// ReplicationLinkListResultIterator provides access to a complete listing of ReplicationLink values. 8508type ReplicationLinkListResultIterator struct { 8509 i int 8510 page ReplicationLinkListResultPage 8511} 8512 8513// NextWithContext advances to the next value. If there was an error making 8514// the request the iterator does not advance and the error is returned. 8515func (iter *ReplicationLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { 8516 if tracing.IsEnabled() { 8517 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinkListResultIterator.NextWithContext") 8518 defer func() { 8519 sc := -1 8520 if iter.Response().Response.Response != nil { 8521 sc = iter.Response().Response.Response.StatusCode 8522 } 8523 tracing.EndSpan(ctx, sc, err) 8524 }() 8525 } 8526 iter.i++ 8527 if iter.i < len(iter.page.Values()) { 8528 return nil 8529 } 8530 err = iter.page.NextWithContext(ctx) 8531 if err != nil { 8532 iter.i-- 8533 return err 8534 } 8535 iter.i = 0 8536 return nil 8537} 8538 8539// Next advances to the next value. If there was an error making 8540// the request the iterator does not advance and the error is returned. 8541// Deprecated: Use NextWithContext() instead. 8542func (iter *ReplicationLinkListResultIterator) Next() error { 8543 return iter.NextWithContext(context.Background()) 8544} 8545 8546// NotDone returns true if the enumeration should be started or is not yet complete. 8547func (iter ReplicationLinkListResultIterator) NotDone() bool { 8548 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8549} 8550 8551// Response returns the raw server response from the last page request. 8552func (iter ReplicationLinkListResultIterator) Response() ReplicationLinkListResult { 8553 return iter.page.Response() 8554} 8555 8556// Value returns the current value or a zero-initialized value if the 8557// iterator has advanced beyond the end of the collection. 8558func (iter ReplicationLinkListResultIterator) Value() ReplicationLink { 8559 if !iter.page.NotDone() { 8560 return ReplicationLink{} 8561 } 8562 return iter.page.Values()[iter.i] 8563} 8564 8565// Creates a new instance of the ReplicationLinkListResultIterator type. 8566func NewReplicationLinkListResultIterator(page ReplicationLinkListResultPage) ReplicationLinkListResultIterator { 8567 return ReplicationLinkListResultIterator{page: page} 8568} 8569 8570// IsEmpty returns true if the ListResult contains no values. 8571func (rllr ReplicationLinkListResult) IsEmpty() bool { 8572 return rllr.Value == nil || len(*rllr.Value) == 0 8573} 8574 8575// hasNextLink returns true if the NextLink is not empty. 8576func (rllr ReplicationLinkListResult) hasNextLink() bool { 8577 return rllr.NextLink != nil && len(*rllr.NextLink) != 0 8578} 8579 8580// replicationLinkListResultPreparer prepares a request to retrieve the next set of results. 8581// It returns nil if no more results exist. 8582func (rllr ReplicationLinkListResult) replicationLinkListResultPreparer(ctx context.Context) (*http.Request, error) { 8583 if !rllr.hasNextLink() { 8584 return nil, nil 8585 } 8586 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8587 autorest.AsJSON(), 8588 autorest.AsGet(), 8589 autorest.WithBaseURL(to.String(rllr.NextLink))) 8590} 8591 8592// ReplicationLinkListResultPage contains a page of ReplicationLink values. 8593type ReplicationLinkListResultPage struct { 8594 fn func(context.Context, ReplicationLinkListResult) (ReplicationLinkListResult, error) 8595 rllr ReplicationLinkListResult 8596} 8597 8598// NextWithContext advances to the next page of values. If there was an error making 8599// the request the page does not advance and the error is returned. 8600func (page *ReplicationLinkListResultPage) NextWithContext(ctx context.Context) (err error) { 8601 if tracing.IsEnabled() { 8602 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinkListResultPage.NextWithContext") 8603 defer func() { 8604 sc := -1 8605 if page.Response().Response.Response != nil { 8606 sc = page.Response().Response.Response.StatusCode 8607 } 8608 tracing.EndSpan(ctx, sc, err) 8609 }() 8610 } 8611 for { 8612 next, err := page.fn(ctx, page.rllr) 8613 if err != nil { 8614 return err 8615 } 8616 page.rllr = next 8617 if !next.hasNextLink() || !next.IsEmpty() { 8618 break 8619 } 8620 } 8621 return nil 8622} 8623 8624// Next advances to the next page of values. If there was an error making 8625// the request the page does not advance and the error is returned. 8626// Deprecated: Use NextWithContext() instead. 8627func (page *ReplicationLinkListResultPage) Next() error { 8628 return page.NextWithContext(context.Background()) 8629} 8630 8631// NotDone returns true if the page enumeration should be started or is not yet complete. 8632func (page ReplicationLinkListResultPage) NotDone() bool { 8633 return !page.rllr.IsEmpty() 8634} 8635 8636// Response returns the raw server response from the last page request. 8637func (page ReplicationLinkListResultPage) Response() ReplicationLinkListResult { 8638 return page.rllr 8639} 8640 8641// Values returns the slice of values for the current page or nil if there are no values. 8642func (page ReplicationLinkListResultPage) Values() []ReplicationLink { 8643 if page.rllr.IsEmpty() { 8644 return nil 8645 } 8646 return *page.rllr.Value 8647} 8648 8649// Creates a new instance of the ReplicationLinkListResultPage type. 8650func NewReplicationLinkListResultPage(cur ReplicationLinkListResult, getNextPage func(context.Context, ReplicationLinkListResult) (ReplicationLinkListResult, error)) ReplicationLinkListResultPage { 8651 return ReplicationLinkListResultPage{ 8652 fn: getNextPage, 8653 rllr: cur, 8654 } 8655} 8656 8657// ReplicationLinkProperties represents the properties of a Sql pool replication link. 8658type ReplicationLinkProperties struct { 8659 // IsTerminationAllowed - READ-ONLY; Legacy value indicating whether termination is allowed. Currently always returns true. 8660 IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"` 8661 // ReplicationMode - READ-ONLY; Replication mode of this replication link. 8662 ReplicationMode *string `json:"replicationMode,omitempty"` 8663 // PartnerServer - READ-ONLY; The name of the workspace hosting the partner Sql pool. 8664 PartnerServer *string `json:"partnerServer,omitempty"` 8665 // PartnerDatabase - READ-ONLY; The name of the partner Sql pool. 8666 PartnerDatabase *string `json:"partnerDatabase,omitempty"` 8667 // PartnerLocation - READ-ONLY; The Azure Region of the partner Sql pool. 8668 PartnerLocation *string `json:"partnerLocation,omitempty"` 8669 // Role - READ-ONLY; The role of the Sql pool in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy' 8670 Role ReplicationRole `json:"role,omitempty"` 8671 // PartnerRole - READ-ONLY; The role of the partner Sql pool in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy' 8672 PartnerRole ReplicationRole `json:"partnerRole,omitempty"` 8673 // StartTime - READ-ONLY; The start time for the replication link. 8674 StartTime *date.Time `json:"startTime,omitempty"` 8675 // PercentComplete - READ-ONLY; The percentage of seeding complete for the replication link. 8676 PercentComplete *int32 `json:"percentComplete,omitempty"` 8677 // ReplicationState - READ-ONLY; The replication state for the replication link. Possible values include: 'ReplicationStatePENDING', 'ReplicationStateSEEDING', 'ReplicationStateCATCHUP', 'ReplicationStateSUSPENDED' 8678 ReplicationState ReplicationState `json:"replicationState,omitempty"` 8679} 8680 8681// MarshalJSON is the custom marshaler for ReplicationLinkProperties. 8682func (rlp ReplicationLinkProperties) MarshalJSON() ([]byte, error) { 8683 objectMap := make(map[string]interface{}) 8684 return json.Marshal(objectMap) 8685} 8686 8687// Resource common fields that are returned in the response for all Azure Resource Manager resources 8688type Resource struct { 8689 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 8690 ID *string `json:"id,omitempty"` 8691 // Name - READ-ONLY; The name of the resource 8692 Name *string `json:"name,omitempty"` 8693 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 8694 Type *string `json:"type,omitempty"` 8695} 8696 8697// MarshalJSON is the custom marshaler for Resource. 8698func (r Resource) MarshalJSON() ([]byte, error) { 8699 objectMap := make(map[string]interface{}) 8700 return json.Marshal(objectMap) 8701} 8702 8703// ResourceMoveDefinition contains the information necessary to perform a resource move (rename). 8704type ResourceMoveDefinition struct { 8705 // ID - The target ID for the resource 8706 ID *string `json:"id,omitempty"` 8707} 8708 8709// RestorableDroppedSQLPool a restorable dropped Sql pool 8710type RestorableDroppedSQLPool struct { 8711 autorest.Response `json:"-"` 8712 // Location - READ-ONLY; The geo-location where the resource lives 8713 Location *string `json:"location,omitempty"` 8714 // RestorableDroppedSQLPoolProperties - The properties of a restorable dropped Sql pool 8715 *RestorableDroppedSQLPoolProperties `json:"properties,omitempty"` 8716 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 8717 ID *string `json:"id,omitempty"` 8718 // Name - READ-ONLY; The name of the resource 8719 Name *string `json:"name,omitempty"` 8720 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 8721 Type *string `json:"type,omitempty"` 8722} 8723 8724// MarshalJSON is the custom marshaler for RestorableDroppedSQLPool. 8725func (rdsp RestorableDroppedSQLPool) MarshalJSON() ([]byte, error) { 8726 objectMap := make(map[string]interface{}) 8727 if rdsp.RestorableDroppedSQLPoolProperties != nil { 8728 objectMap["properties"] = rdsp.RestorableDroppedSQLPoolProperties 8729 } 8730 return json.Marshal(objectMap) 8731} 8732 8733// UnmarshalJSON is the custom unmarshaler for RestorableDroppedSQLPool struct. 8734func (rdsp *RestorableDroppedSQLPool) UnmarshalJSON(body []byte) error { 8735 var m map[string]*json.RawMessage 8736 err := json.Unmarshal(body, &m) 8737 if err != nil { 8738 return err 8739 } 8740 for k, v := range m { 8741 switch k { 8742 case "location": 8743 if v != nil { 8744 var location string 8745 err = json.Unmarshal(*v, &location) 8746 if err != nil { 8747 return err 8748 } 8749 rdsp.Location = &location 8750 } 8751 case "properties": 8752 if v != nil { 8753 var restorableDroppedSQLPoolProperties RestorableDroppedSQLPoolProperties 8754 err = json.Unmarshal(*v, &restorableDroppedSQLPoolProperties) 8755 if err != nil { 8756 return err 8757 } 8758 rdsp.RestorableDroppedSQLPoolProperties = &restorableDroppedSQLPoolProperties 8759 } 8760 case "id": 8761 if v != nil { 8762 var ID string 8763 err = json.Unmarshal(*v, &ID) 8764 if err != nil { 8765 return err 8766 } 8767 rdsp.ID = &ID 8768 } 8769 case "name": 8770 if v != nil { 8771 var name string 8772 err = json.Unmarshal(*v, &name) 8773 if err != nil { 8774 return err 8775 } 8776 rdsp.Name = &name 8777 } 8778 case "type": 8779 if v != nil { 8780 var typeVar string 8781 err = json.Unmarshal(*v, &typeVar) 8782 if err != nil { 8783 return err 8784 } 8785 rdsp.Type = &typeVar 8786 } 8787 } 8788 } 8789 8790 return nil 8791} 8792 8793// RestorableDroppedSQLPoolListResult the response to a list restorable dropped Sql pools request 8794type RestorableDroppedSQLPoolListResult struct { 8795 autorest.Response `json:"-"` 8796 // Value - A list of restorable dropped Sql pools 8797 Value *[]RestorableDroppedSQLPool `json:"value,omitempty"` 8798} 8799 8800// RestorableDroppedSQLPoolProperties the properties of a restorable dropped Sql pool 8801type RestorableDroppedSQLPoolProperties struct { 8802 // DatabaseName - READ-ONLY; The name of the database 8803 DatabaseName *string `json:"databaseName,omitempty"` 8804 // Edition - READ-ONLY; The edition of the database 8805 Edition *string `json:"edition,omitempty"` 8806 // MaxSizeBytes - READ-ONLY; The max size in bytes of the database 8807 MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` 8808 // ServiceLevelObjective - READ-ONLY; The service level objective name of the database 8809 ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` 8810 // ElasticPoolName - READ-ONLY; The elastic pool name of the database 8811 ElasticPoolName *string `json:"elasticPoolName,omitempty"` 8812 // CreationDate - READ-ONLY; The creation date of the database (ISO8601 format) 8813 CreationDate *date.Time `json:"creationDate,omitempty"` 8814 // DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format) 8815 DeletionDate *date.Time `json:"deletionDate,omitempty"` 8816 // EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format) 8817 EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` 8818} 8819 8820// MarshalJSON is the custom marshaler for RestorableDroppedSQLPoolProperties. 8821func (rdspp RestorableDroppedSQLPoolProperties) MarshalJSON() ([]byte, error) { 8822 objectMap := make(map[string]interface{}) 8823 return json.Marshal(objectMap) 8824} 8825 8826// RestorePoint database restore points. 8827type RestorePoint struct { 8828 autorest.Response `json:"-"` 8829 // Location - READ-ONLY; Resource location. 8830 Location *string `json:"location,omitempty"` 8831 // RestorePointProperties - Resource properties. 8832 *RestorePointProperties `json:"properties,omitempty"` 8833 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 8834 ID *string `json:"id,omitempty"` 8835 // Name - READ-ONLY; The name of the resource 8836 Name *string `json:"name,omitempty"` 8837 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 8838 Type *string `json:"type,omitempty"` 8839} 8840 8841// MarshalJSON is the custom marshaler for RestorePoint. 8842func (rp RestorePoint) MarshalJSON() ([]byte, error) { 8843 objectMap := make(map[string]interface{}) 8844 if rp.RestorePointProperties != nil { 8845 objectMap["properties"] = rp.RestorePointProperties 8846 } 8847 return json.Marshal(objectMap) 8848} 8849 8850// UnmarshalJSON is the custom unmarshaler for RestorePoint struct. 8851func (rp *RestorePoint) UnmarshalJSON(body []byte) error { 8852 var m map[string]*json.RawMessage 8853 err := json.Unmarshal(body, &m) 8854 if err != nil { 8855 return err 8856 } 8857 for k, v := range m { 8858 switch k { 8859 case "location": 8860 if v != nil { 8861 var location string 8862 err = json.Unmarshal(*v, &location) 8863 if err != nil { 8864 return err 8865 } 8866 rp.Location = &location 8867 } 8868 case "properties": 8869 if v != nil { 8870 var restorePointProperties RestorePointProperties 8871 err = json.Unmarshal(*v, &restorePointProperties) 8872 if err != nil { 8873 return err 8874 } 8875 rp.RestorePointProperties = &restorePointProperties 8876 } 8877 case "id": 8878 if v != nil { 8879 var ID string 8880 err = json.Unmarshal(*v, &ID) 8881 if err != nil { 8882 return err 8883 } 8884 rp.ID = &ID 8885 } 8886 case "name": 8887 if v != nil { 8888 var name string 8889 err = json.Unmarshal(*v, &name) 8890 if err != nil { 8891 return err 8892 } 8893 rp.Name = &name 8894 } 8895 case "type": 8896 if v != nil { 8897 var typeVar string 8898 err = json.Unmarshal(*v, &typeVar) 8899 if err != nil { 8900 return err 8901 } 8902 rp.Type = &typeVar 8903 } 8904 } 8905 } 8906 8907 return nil 8908} 8909 8910// RestorePointListResult a list of long term retention backups. 8911type RestorePointListResult struct { 8912 autorest.Response `json:"-"` 8913 // Value - READ-ONLY; Array of results. 8914 Value *[]RestorePoint `json:"value,omitempty"` 8915 // NextLink - READ-ONLY; Link to retrieve next page of results. 8916 NextLink *string `json:"nextLink,omitempty"` 8917} 8918 8919// MarshalJSON is the custom marshaler for RestorePointListResult. 8920func (rplr RestorePointListResult) MarshalJSON() ([]byte, error) { 8921 objectMap := make(map[string]interface{}) 8922 return json.Marshal(objectMap) 8923} 8924 8925// RestorePointListResultIterator provides access to a complete listing of RestorePoint values. 8926type RestorePointListResultIterator struct { 8927 i int 8928 page RestorePointListResultPage 8929} 8930 8931// NextWithContext advances to the next value. If there was an error making 8932// the request the iterator does not advance and the error is returned. 8933func (iter *RestorePointListResultIterator) NextWithContext(ctx context.Context) (err error) { 8934 if tracing.IsEnabled() { 8935 ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointListResultIterator.NextWithContext") 8936 defer func() { 8937 sc := -1 8938 if iter.Response().Response.Response != nil { 8939 sc = iter.Response().Response.Response.StatusCode 8940 } 8941 tracing.EndSpan(ctx, sc, err) 8942 }() 8943 } 8944 iter.i++ 8945 if iter.i < len(iter.page.Values()) { 8946 return nil 8947 } 8948 err = iter.page.NextWithContext(ctx) 8949 if err != nil { 8950 iter.i-- 8951 return err 8952 } 8953 iter.i = 0 8954 return nil 8955} 8956 8957// Next advances to the next value. If there was an error making 8958// the request the iterator does not advance and the error is returned. 8959// Deprecated: Use NextWithContext() instead. 8960func (iter *RestorePointListResultIterator) Next() error { 8961 return iter.NextWithContext(context.Background()) 8962} 8963 8964// NotDone returns true if the enumeration should be started or is not yet complete. 8965func (iter RestorePointListResultIterator) NotDone() bool { 8966 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8967} 8968 8969// Response returns the raw server response from the last page request. 8970func (iter RestorePointListResultIterator) Response() RestorePointListResult { 8971 return iter.page.Response() 8972} 8973 8974// Value returns the current value or a zero-initialized value if the 8975// iterator has advanced beyond the end of the collection. 8976func (iter RestorePointListResultIterator) Value() RestorePoint { 8977 if !iter.page.NotDone() { 8978 return RestorePoint{} 8979 } 8980 return iter.page.Values()[iter.i] 8981} 8982 8983// Creates a new instance of the RestorePointListResultIterator type. 8984func NewRestorePointListResultIterator(page RestorePointListResultPage) RestorePointListResultIterator { 8985 return RestorePointListResultIterator{page: page} 8986} 8987 8988// IsEmpty returns true if the ListResult contains no values. 8989func (rplr RestorePointListResult) IsEmpty() bool { 8990 return rplr.Value == nil || len(*rplr.Value) == 0 8991} 8992 8993// hasNextLink returns true if the NextLink is not empty. 8994func (rplr RestorePointListResult) hasNextLink() bool { 8995 return rplr.NextLink != nil && len(*rplr.NextLink) != 0 8996} 8997 8998// restorePointListResultPreparer prepares a request to retrieve the next set of results. 8999// It returns nil if no more results exist. 9000func (rplr RestorePointListResult) restorePointListResultPreparer(ctx context.Context) (*http.Request, error) { 9001 if !rplr.hasNextLink() { 9002 return nil, nil 9003 } 9004 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9005 autorest.AsJSON(), 9006 autorest.AsGet(), 9007 autorest.WithBaseURL(to.String(rplr.NextLink))) 9008} 9009 9010// RestorePointListResultPage contains a page of RestorePoint values. 9011type RestorePointListResultPage struct { 9012 fn func(context.Context, RestorePointListResult) (RestorePointListResult, error) 9013 rplr RestorePointListResult 9014} 9015 9016// NextWithContext advances to the next page of values. If there was an error making 9017// the request the page does not advance and the error is returned. 9018func (page *RestorePointListResultPage) NextWithContext(ctx context.Context) (err error) { 9019 if tracing.IsEnabled() { 9020 ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointListResultPage.NextWithContext") 9021 defer func() { 9022 sc := -1 9023 if page.Response().Response.Response != nil { 9024 sc = page.Response().Response.Response.StatusCode 9025 } 9026 tracing.EndSpan(ctx, sc, err) 9027 }() 9028 } 9029 for { 9030 next, err := page.fn(ctx, page.rplr) 9031 if err != nil { 9032 return err 9033 } 9034 page.rplr = next 9035 if !next.hasNextLink() || !next.IsEmpty() { 9036 break 9037 } 9038 } 9039 return nil 9040} 9041 9042// Next advances to the next page of values. If there was an error making 9043// the request the page does not advance and the error is returned. 9044// Deprecated: Use NextWithContext() instead. 9045func (page *RestorePointListResultPage) Next() error { 9046 return page.NextWithContext(context.Background()) 9047} 9048 9049// NotDone returns true if the page enumeration should be started or is not yet complete. 9050func (page RestorePointListResultPage) NotDone() bool { 9051 return !page.rplr.IsEmpty() 9052} 9053 9054// Response returns the raw server response from the last page request. 9055func (page RestorePointListResultPage) Response() RestorePointListResult { 9056 return page.rplr 9057} 9058 9059// Values returns the slice of values for the current page or nil if there are no values. 9060func (page RestorePointListResultPage) Values() []RestorePoint { 9061 if page.rplr.IsEmpty() { 9062 return nil 9063 } 9064 return *page.rplr.Value 9065} 9066 9067// Creates a new instance of the RestorePointListResultPage type. 9068func NewRestorePointListResultPage(cur RestorePointListResult, getNextPage func(context.Context, RestorePointListResult) (RestorePointListResult, error)) RestorePointListResultPage { 9069 return RestorePointListResultPage{ 9070 fn: getNextPage, 9071 rplr: cur, 9072 } 9073} 9074 9075// RestorePointProperties properties of a database restore point 9076type RestorePointProperties struct { 9077 // RestorePointType - READ-ONLY; The type of restore point. Possible values include: 'RestorePointTypeCONTINUOUS', 'RestorePointTypeDISCRETE' 9078 RestorePointType RestorePointType `json:"restorePointType,omitempty"` 9079 // EarliestRestoreDate - READ-ONLY; The earliest time to which this database can be restored 9080 EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` 9081 // RestorePointCreationDate - READ-ONLY; The time the backup was taken 9082 RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"` 9083 // RestorePointLabel - READ-ONLY; The label of restore point for backup request by user 9084 RestorePointLabel *string `json:"restorePointLabel,omitempty"` 9085} 9086 9087// MarshalJSON is the custom marshaler for RestorePointProperties. 9088func (rpp RestorePointProperties) MarshalJSON() ([]byte, error) { 9089 objectMap := make(map[string]interface{}) 9090 return json.Marshal(objectMap) 9091} 9092 9093// BasicSecretBase the base definition of a secret type. 9094type BasicSecretBase interface { 9095 AsSecureString() (*SecureString, bool) 9096 AsSecretBase() (*SecretBase, bool) 9097} 9098 9099// SecretBase the base definition of a secret type. 9100type SecretBase struct { 9101 // Type - Possible values include: 'TypeBasicSecretBaseTypeSecretBase', 'TypeBasicSecretBaseTypeSecureString' 9102 Type TypeBasicSecretBase `json:"type,omitempty"` 9103} 9104 9105func unmarshalBasicSecretBase(body []byte) (BasicSecretBase, error) { 9106 var m map[string]interface{} 9107 err := json.Unmarshal(body, &m) 9108 if err != nil { 9109 return nil, err 9110 } 9111 9112 switch m["type"] { 9113 case string(TypeBasicSecretBaseTypeSecureString): 9114 var ss SecureString 9115 err := json.Unmarshal(body, &ss) 9116 return ss, err 9117 default: 9118 var sb SecretBase 9119 err := json.Unmarshal(body, &sb) 9120 return sb, err 9121 } 9122} 9123func unmarshalBasicSecretBaseArray(body []byte) ([]BasicSecretBase, error) { 9124 var rawMessages []*json.RawMessage 9125 err := json.Unmarshal(body, &rawMessages) 9126 if err != nil { 9127 return nil, err 9128 } 9129 9130 sbArray := make([]BasicSecretBase, len(rawMessages)) 9131 9132 for index, rawMessage := range rawMessages { 9133 sb, err := unmarshalBasicSecretBase(*rawMessage) 9134 if err != nil { 9135 return nil, err 9136 } 9137 sbArray[index] = sb 9138 } 9139 return sbArray, nil 9140} 9141 9142// MarshalJSON is the custom marshaler for SecretBase. 9143func (sb SecretBase) MarshalJSON() ([]byte, error) { 9144 sb.Type = TypeBasicSecretBaseTypeSecretBase 9145 objectMap := make(map[string]interface{}) 9146 if sb.Type != "" { 9147 objectMap["type"] = sb.Type 9148 } 9149 return json.Marshal(objectMap) 9150} 9151 9152// AsSecureString is the BasicSecretBase implementation for SecretBase. 9153func (sb SecretBase) AsSecureString() (*SecureString, bool) { 9154 return nil, false 9155} 9156 9157// AsSecretBase is the BasicSecretBase implementation for SecretBase. 9158func (sb SecretBase) AsSecretBase() (*SecretBase, bool) { 9159 return &sb, true 9160} 9161 9162// AsBasicSecretBase is the BasicSecretBase implementation for SecretBase. 9163func (sb SecretBase) AsBasicSecretBase() (BasicSecretBase, bool) { 9164 return &sb, true 9165} 9166 9167// SecureString azure Synapse secure string definition. The string value will be masked with asterisks '*' 9168// during Get or List API calls. 9169type SecureString struct { 9170 // Value - Value of secure string. 9171 Value *string `json:"value,omitempty"` 9172 // Type - Possible values include: 'TypeBasicSecretBaseTypeSecretBase', 'TypeBasicSecretBaseTypeSecureString' 9173 Type TypeBasicSecretBase `json:"type,omitempty"` 9174} 9175 9176// MarshalJSON is the custom marshaler for SecureString. 9177func (ss SecureString) MarshalJSON() ([]byte, error) { 9178 ss.Type = TypeBasicSecretBaseTypeSecureString 9179 objectMap := make(map[string]interface{}) 9180 if ss.Value != nil { 9181 objectMap["value"] = ss.Value 9182 } 9183 if ss.Type != "" { 9184 objectMap["type"] = ss.Type 9185 } 9186 return json.Marshal(objectMap) 9187} 9188 9189// AsSecureString is the BasicSecretBase implementation for SecureString. 9190func (ss SecureString) AsSecureString() (*SecureString, bool) { 9191 return &ss, true 9192} 9193 9194// AsSecretBase is the BasicSecretBase implementation for SecureString. 9195func (ss SecureString) AsSecretBase() (*SecretBase, bool) { 9196 return nil, false 9197} 9198 9199// AsBasicSecretBase is the BasicSecretBase implementation for SecureString. 9200func (ss SecureString) AsBasicSecretBase() (BasicSecretBase, bool) { 9201 return &ss, true 9202} 9203 9204// SecurityAlertPolicyProperties properties of a security alert policy. 9205type SecurityAlertPolicyProperties struct { 9206 // State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific Sql pool. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' 9207 State SecurityAlertPolicyState `json:"state,omitempty"` 9208 // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action 9209 DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` 9210 // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. 9211 EmailAddresses *[]string `json:"emailAddresses,omitempty"` 9212 // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. 9213 EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` 9214 // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. 9215 StorageEndpoint *string `json:"storageEndpoint,omitempty"` 9216 // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. 9217 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 9218 // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. 9219 RetentionDays *int32 `json:"retentionDays,omitempty"` 9220 // CreationTime - READ-ONLY; Specifies the UTC creation time of the policy. 9221 CreationTime *date.Time `json:"creationTime,omitempty"` 9222} 9223 9224// MarshalJSON is the custom marshaler for SecurityAlertPolicyProperties. 9225func (sapp SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { 9226 objectMap := make(map[string]interface{}) 9227 if sapp.State != "" { 9228 objectMap["state"] = sapp.State 9229 } 9230 if sapp.DisabledAlerts != nil { 9231 objectMap["disabledAlerts"] = sapp.DisabledAlerts 9232 } 9233 if sapp.EmailAddresses != nil { 9234 objectMap["emailAddresses"] = sapp.EmailAddresses 9235 } 9236 if sapp.EmailAccountAdmins != nil { 9237 objectMap["emailAccountAdmins"] = sapp.EmailAccountAdmins 9238 } 9239 if sapp.StorageEndpoint != nil { 9240 objectMap["storageEndpoint"] = sapp.StorageEndpoint 9241 } 9242 if sapp.StorageAccountAccessKey != nil { 9243 objectMap["storageAccountAccessKey"] = sapp.StorageAccountAccessKey 9244 } 9245 if sapp.RetentionDays != nil { 9246 objectMap["retentionDays"] = sapp.RetentionDays 9247 } 9248 return json.Marshal(objectMap) 9249} 9250 9251// SelfHostedIntegrationRuntime self-hosted integration runtime. 9252type SelfHostedIntegrationRuntime struct { 9253 // SelfHostedIntegrationRuntimeTypeProperties - When this property is not null, means this is a linked integration runtime. The property is used to access original integration runtime. 9254 *SelfHostedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` 9255 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 9256 AdditionalProperties map[string]interface{} `json:""` 9257 // Description - Integration runtime description. 9258 Description *string `json:"description,omitempty"` 9259 // Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted' 9260 Type Type `json:"type,omitempty"` 9261} 9262 9263// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntime. 9264func (shir SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { 9265 shir.Type = TypeSelfHosted 9266 objectMap := make(map[string]interface{}) 9267 if shir.SelfHostedIntegrationRuntimeTypeProperties != nil { 9268 objectMap["typeProperties"] = shir.SelfHostedIntegrationRuntimeTypeProperties 9269 } 9270 if shir.Description != nil { 9271 objectMap["description"] = shir.Description 9272 } 9273 if shir.Type != "" { 9274 objectMap["type"] = shir.Type 9275 } 9276 for k, v := range shir.AdditionalProperties { 9277 objectMap[k] = v 9278 } 9279 return json.Marshal(objectMap) 9280} 9281 9282// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. 9283func (shir SelfHostedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) { 9284 return nil, false 9285} 9286 9287// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. 9288func (shir SelfHostedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) { 9289 return &shir, true 9290} 9291 9292// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. 9293func (shir SelfHostedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) { 9294 return nil, false 9295} 9296 9297// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime. 9298func (shir SelfHostedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) { 9299 return &shir, true 9300} 9301 9302// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntime struct. 9303func (shir *SelfHostedIntegrationRuntime) UnmarshalJSON(body []byte) error { 9304 var m map[string]*json.RawMessage 9305 err := json.Unmarshal(body, &m) 9306 if err != nil { 9307 return err 9308 } 9309 for k, v := range m { 9310 switch k { 9311 case "typeProperties": 9312 if v != nil { 9313 var selfHostedIntegrationRuntimeTypeProperties SelfHostedIntegrationRuntimeTypeProperties 9314 err = json.Unmarshal(*v, &selfHostedIntegrationRuntimeTypeProperties) 9315 if err != nil { 9316 return err 9317 } 9318 shir.SelfHostedIntegrationRuntimeTypeProperties = &selfHostedIntegrationRuntimeTypeProperties 9319 } 9320 default: 9321 if v != nil { 9322 var additionalProperties interface{} 9323 err = json.Unmarshal(*v, &additionalProperties) 9324 if err != nil { 9325 return err 9326 } 9327 if shir.AdditionalProperties == nil { 9328 shir.AdditionalProperties = make(map[string]interface{}) 9329 } 9330 shir.AdditionalProperties[k] = additionalProperties 9331 } 9332 case "description": 9333 if v != nil { 9334 var description string 9335 err = json.Unmarshal(*v, &description) 9336 if err != nil { 9337 return err 9338 } 9339 shir.Description = &description 9340 } 9341 case "type": 9342 if v != nil { 9343 var typeVar Type 9344 err = json.Unmarshal(*v, &typeVar) 9345 if err != nil { 9346 return err 9347 } 9348 shir.Type = typeVar 9349 } 9350 } 9351 } 9352 9353 return nil 9354} 9355 9356// SelfHostedIntegrationRuntimeNode properties of Self-hosted integration runtime node. 9357type SelfHostedIntegrationRuntimeNode struct { 9358 autorest.Response `json:"-"` 9359 // NodeName - READ-ONLY; Name of the integration runtime node. 9360 NodeName *string `json:"nodeName,omitempty"` 9361 // MachineName - READ-ONLY; Machine name of the integration runtime node. 9362 MachineName *string `json:"machineName,omitempty"` 9363 // HostServiceURI - READ-ONLY; URI for the host machine of the integration runtime. 9364 HostServiceURI *string `json:"hostServiceUri,omitempty"` 9365 // Status - READ-ONLY; Status of the integration runtime node. Possible values include: 'SelfHostedIntegrationRuntimeNodeStatusNeedRegistration', 'SelfHostedIntegrationRuntimeNodeStatusOnline', 'SelfHostedIntegrationRuntimeNodeStatusLimited', 'SelfHostedIntegrationRuntimeNodeStatusOffline', 'SelfHostedIntegrationRuntimeNodeStatusUpgrading', 'SelfHostedIntegrationRuntimeNodeStatusInitializing', 'SelfHostedIntegrationRuntimeNodeStatusInitializeFailed' 9366 Status SelfHostedIntegrationRuntimeNodeStatus `json:"status,omitempty"` 9367 // Capabilities - READ-ONLY; The integration runtime capabilities dictionary 9368 Capabilities map[string]*string `json:"capabilities"` 9369 // VersionStatus - READ-ONLY; Status of the integration runtime node version. 9370 VersionStatus *string `json:"versionStatus,omitempty"` 9371 // Version - READ-ONLY; Version of the integration runtime node. 9372 Version *string `json:"version,omitempty"` 9373 // RegisterTime - READ-ONLY; The time at which the integration runtime node was registered in ISO8601 format. 9374 RegisterTime *date.Time `json:"registerTime,omitempty"` 9375 // LastConnectTime - READ-ONLY; The most recent time at which the integration runtime was connected in ISO8601 format. 9376 LastConnectTime *date.Time `json:"lastConnectTime,omitempty"` 9377 // ExpiryTime - READ-ONLY; The time at which the integration runtime will expire in ISO8601 format. 9378 ExpiryTime *date.Time `json:"expiryTime,omitempty"` 9379 // LastStartTime - READ-ONLY; The time the node last started up. 9380 LastStartTime *date.Time `json:"lastStartTime,omitempty"` 9381 // LastStopTime - READ-ONLY; The integration runtime node last stop time. 9382 LastStopTime *date.Time `json:"lastStopTime,omitempty"` 9383 // LastUpdateResult - READ-ONLY; The result of the last integration runtime node update. Possible values include: 'IntegrationRuntimeUpdateResultNone', 'IntegrationRuntimeUpdateResultSucceed', 'IntegrationRuntimeUpdateResultFail' 9384 LastUpdateResult IntegrationRuntimeUpdateResult `json:"lastUpdateResult,omitempty"` 9385 // LastStartUpdateTime - READ-ONLY; The last time for the integration runtime node update start. 9386 LastStartUpdateTime *date.Time `json:"lastStartUpdateTime,omitempty"` 9387 // LastEndUpdateTime - READ-ONLY; The last time for the integration runtime node update end. 9388 LastEndUpdateTime *date.Time `json:"lastEndUpdateTime,omitempty"` 9389 // IsActiveDispatcher - READ-ONLY; Indicates whether this node is the active dispatcher for integration runtime requests. 9390 IsActiveDispatcher *bool `json:"isActiveDispatcher,omitempty"` 9391 // ConcurrentJobsLimit - READ-ONLY; Maximum concurrent jobs on the integration runtime node. 9392 ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"` 9393 // MaxConcurrentJobs - READ-ONLY; The maximum concurrent jobs in this integration runtime. 9394 MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"` 9395} 9396 9397// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeNode. 9398func (shirn SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { 9399 objectMap := make(map[string]interface{}) 9400 return json.Marshal(objectMap) 9401} 9402 9403// SelfHostedIntegrationRuntimeStatus self-hosted integration runtime status. 9404type SelfHostedIntegrationRuntimeStatus struct { 9405 // SelfHostedIntegrationRuntimeStatusTypeProperties - Self-hosted integration runtime status type properties. 9406 *SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"` 9407 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 9408 AdditionalProperties map[string]interface{} `json:""` 9409 // DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to. 9410 DataFactoryName *string `json:"dataFactoryName,omitempty"` 9411 // State - READ-ONLY; The state of integration runtime. Possible values include: 'IntegrationRuntimeStateInitial', 'IntegrationRuntimeStateStopped', 'IntegrationRuntimeStateStarted', 'IntegrationRuntimeStateStarting', 'IntegrationRuntimeStateStopping', 'IntegrationRuntimeStateNeedRegistration', 'IntegrationRuntimeStateOnline', 'IntegrationRuntimeStateLimited', 'IntegrationRuntimeStateOffline', 'IntegrationRuntimeStateAccessDenied' 9412 State IntegrationRuntimeState `json:"state,omitempty"` 9413 // Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted' 9414 Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"` 9415} 9416 9417// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatus. 9418func (shirs SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { 9419 shirs.Type = TypeBasicIntegrationRuntimeStatusTypeSelfHosted 9420 objectMap := make(map[string]interface{}) 9421 if shirs.SelfHostedIntegrationRuntimeStatusTypeProperties != nil { 9422 objectMap["typeProperties"] = shirs.SelfHostedIntegrationRuntimeStatusTypeProperties 9423 } 9424 if shirs.Type != "" { 9425 objectMap["type"] = shirs.Type 9426 } 9427 for k, v := range shirs.AdditionalProperties { 9428 objectMap[k] = v 9429 } 9430 return json.Marshal(objectMap) 9431} 9432 9433// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. 9434func (shirs SelfHostedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) { 9435 return nil, false 9436} 9437 9438// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. 9439func (shirs SelfHostedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) { 9440 return &shirs, true 9441} 9442 9443// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. 9444func (shirs SelfHostedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) { 9445 return nil, false 9446} 9447 9448// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus. 9449func (shirs SelfHostedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) { 9450 return &shirs, true 9451} 9452 9453// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeStatus struct. 9454func (shirs *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error { 9455 var m map[string]*json.RawMessage 9456 err := json.Unmarshal(body, &m) 9457 if err != nil { 9458 return err 9459 } 9460 for k, v := range m { 9461 switch k { 9462 case "typeProperties": 9463 if v != nil { 9464 var selfHostedIntegrationRuntimeStatusTypeProperties SelfHostedIntegrationRuntimeStatusTypeProperties 9465 err = json.Unmarshal(*v, &selfHostedIntegrationRuntimeStatusTypeProperties) 9466 if err != nil { 9467 return err 9468 } 9469 shirs.SelfHostedIntegrationRuntimeStatusTypeProperties = &selfHostedIntegrationRuntimeStatusTypeProperties 9470 } 9471 default: 9472 if v != nil { 9473 var additionalProperties interface{} 9474 err = json.Unmarshal(*v, &additionalProperties) 9475 if err != nil { 9476 return err 9477 } 9478 if shirs.AdditionalProperties == nil { 9479 shirs.AdditionalProperties = make(map[string]interface{}) 9480 } 9481 shirs.AdditionalProperties[k] = additionalProperties 9482 } 9483 case "dataFactoryName": 9484 if v != nil { 9485 var dataFactoryName string 9486 err = json.Unmarshal(*v, &dataFactoryName) 9487 if err != nil { 9488 return err 9489 } 9490 shirs.DataFactoryName = &dataFactoryName 9491 } 9492 case "state": 9493 if v != nil { 9494 var state IntegrationRuntimeState 9495 err = json.Unmarshal(*v, &state) 9496 if err != nil { 9497 return err 9498 } 9499 shirs.State = state 9500 } 9501 case "type": 9502 if v != nil { 9503 var typeVar TypeBasicIntegrationRuntimeStatus 9504 err = json.Unmarshal(*v, &typeVar) 9505 if err != nil { 9506 return err 9507 } 9508 shirs.Type = typeVar 9509 } 9510 } 9511 } 9512 9513 return nil 9514} 9515 9516// SelfHostedIntegrationRuntimeStatusTypeProperties self-hosted integration runtime status type properties. 9517type SelfHostedIntegrationRuntimeStatusTypeProperties struct { 9518 // CreateTime - READ-ONLY; The time at which the integration runtime was created, in ISO8601 format. 9519 CreateTime *date.Time `json:"createTime,omitempty"` 9520 // TaskQueueID - READ-ONLY; The task queue id of the integration runtime. 9521 TaskQueueID *string `json:"taskQueueId,omitempty"` 9522 // NodeCommunicationChannelEncryptionMode - READ-ONLY; The node communication Channel encryption mode 9523 NodeCommunicationChannelEncryptionMode *string `json:"nodeCommunicationChannelEncryptionMode,omitempty"` 9524 // InternalChannelEncryption - READ-ONLY; It is used to set the encryption mode for node-node communication channel (when more than 2 self-hosted integration runtime nodes exist). Possible values include: 'IntegrationRuntimeInternalChannelEncryptionModeNotSet', 'IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted', 'IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted' 9525 InternalChannelEncryption IntegrationRuntimeInternalChannelEncryptionMode `json:"internalChannelEncryption,omitempty"` 9526 // Version - READ-ONLY; Version of the integration runtime. 9527 Version *string `json:"version,omitempty"` 9528 // Nodes - The list of nodes for this integration runtime. 9529 Nodes *[]SelfHostedIntegrationRuntimeNode `json:"nodes,omitempty"` 9530 // ScheduledUpdateDate - READ-ONLY; The date at which the integration runtime will be scheduled to update, in ISO8601 format. 9531 ScheduledUpdateDate *date.Time `json:"scheduledUpdateDate,omitempty"` 9532 // UpdateDelayOffset - READ-ONLY; The time in the date scheduled by service to update the integration runtime, e.g., PT03H is 3 hours 9533 UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"` 9534 // LocalTimeZoneOffset - READ-ONLY; The local time zone offset in hours. 9535 LocalTimeZoneOffset *string `json:"localTimeZoneOffset,omitempty"` 9536 // Capabilities - READ-ONLY; Object with additional information about integration runtime capabilities. 9537 Capabilities map[string]*string `json:"capabilities"` 9538 // ServiceUrls - READ-ONLY; The URLs for the services used in integration runtime backend service. 9539 ServiceUrls *[]string `json:"serviceUrls,omitempty"` 9540 // AutoUpdate - READ-ONLY; Whether Self-hosted integration runtime auto update has been turned on. Possible values include: 'IntegrationRuntimeAutoUpdateOn', 'IntegrationRuntimeAutoUpdateOff' 9541 AutoUpdate IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"` 9542 // VersionStatus - READ-ONLY; Status of the integration runtime version. 9543 VersionStatus *string `json:"versionStatus,omitempty"` 9544 // Links - The list of linked integration runtimes that are created to share with this integration runtime. 9545 Links *[]LinkedIntegrationRuntime `json:"links,omitempty"` 9546 // PushedVersion - READ-ONLY; The version that the integration runtime is going to update to. 9547 PushedVersion *string `json:"pushedVersion,omitempty"` 9548 // LatestVersion - READ-ONLY; The latest version on download center. 9549 LatestVersion *string `json:"latestVersion,omitempty"` 9550 // AutoUpdateETA - READ-ONLY; The estimated time when the self-hosted integration runtime will be updated. 9551 AutoUpdateETA *date.Time `json:"autoUpdateETA,omitempty"` 9552} 9553 9554// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatusTypeProperties. 9555func (shirstp SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { 9556 objectMap := make(map[string]interface{}) 9557 if shirstp.Nodes != nil { 9558 objectMap["nodes"] = shirstp.Nodes 9559 } 9560 if shirstp.Links != nil { 9561 objectMap["links"] = shirstp.Links 9562 } 9563 return json.Marshal(objectMap) 9564} 9565 9566// SelfHostedIntegrationRuntimeTypeProperties the self-hosted integration runtime properties. 9567type SelfHostedIntegrationRuntimeTypeProperties struct { 9568 // LinkedInfo - Linked integration runtime type from data factory 9569 LinkedInfo BasicLinkedIntegrationRuntimeType `json:"linkedInfo,omitempty"` 9570} 9571 9572// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeTypeProperties struct. 9573func (shirtp *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(body []byte) error { 9574 var m map[string]*json.RawMessage 9575 err := json.Unmarshal(body, &m) 9576 if err != nil { 9577 return err 9578 } 9579 for k, v := range m { 9580 switch k { 9581 case "linkedInfo": 9582 if v != nil { 9583 linkedInfo, err := unmarshalBasicLinkedIntegrationRuntimeType(*v) 9584 if err != nil { 9585 return err 9586 } 9587 shirtp.LinkedInfo = linkedInfo 9588 } 9589 } 9590 } 9591 9592 return nil 9593} 9594 9595// SensitivityLabel a sensitivity label. 9596type SensitivityLabel struct { 9597 autorest.Response `json:"-"` 9598 // SensitivityLabelProperties - Resource properties. 9599 *SensitivityLabelProperties `json:"properties,omitempty"` 9600 // ManagedBy - READ-ONLY; managed by 9601 ManagedBy *string `json:"managedBy,omitempty"` 9602 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 9603 ID *string `json:"id,omitempty"` 9604 // Name - READ-ONLY; The name of the resource 9605 Name *string `json:"name,omitempty"` 9606 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 9607 Type *string `json:"type,omitempty"` 9608} 9609 9610// MarshalJSON is the custom marshaler for SensitivityLabel. 9611func (sl SensitivityLabel) MarshalJSON() ([]byte, error) { 9612 objectMap := make(map[string]interface{}) 9613 if sl.SensitivityLabelProperties != nil { 9614 objectMap["properties"] = sl.SensitivityLabelProperties 9615 } 9616 return json.Marshal(objectMap) 9617} 9618 9619// UnmarshalJSON is the custom unmarshaler for SensitivityLabel struct. 9620func (sl *SensitivityLabel) UnmarshalJSON(body []byte) error { 9621 var m map[string]*json.RawMessage 9622 err := json.Unmarshal(body, &m) 9623 if err != nil { 9624 return err 9625 } 9626 for k, v := range m { 9627 switch k { 9628 case "properties": 9629 if v != nil { 9630 var sensitivityLabelProperties SensitivityLabelProperties 9631 err = json.Unmarshal(*v, &sensitivityLabelProperties) 9632 if err != nil { 9633 return err 9634 } 9635 sl.SensitivityLabelProperties = &sensitivityLabelProperties 9636 } 9637 case "managedBy": 9638 if v != nil { 9639 var managedBy string 9640 err = json.Unmarshal(*v, &managedBy) 9641 if err != nil { 9642 return err 9643 } 9644 sl.ManagedBy = &managedBy 9645 } 9646 case "id": 9647 if v != nil { 9648 var ID string 9649 err = json.Unmarshal(*v, &ID) 9650 if err != nil { 9651 return err 9652 } 9653 sl.ID = &ID 9654 } 9655 case "name": 9656 if v != nil { 9657 var name string 9658 err = json.Unmarshal(*v, &name) 9659 if err != nil { 9660 return err 9661 } 9662 sl.Name = &name 9663 } 9664 case "type": 9665 if v != nil { 9666 var typeVar string 9667 err = json.Unmarshal(*v, &typeVar) 9668 if err != nil { 9669 return err 9670 } 9671 sl.Type = &typeVar 9672 } 9673 } 9674 } 9675 9676 return nil 9677} 9678 9679// SensitivityLabelListResult a list of sensitivity labels. 9680type SensitivityLabelListResult struct { 9681 autorest.Response `json:"-"` 9682 // Value - READ-ONLY; Array of results. 9683 Value *[]SensitivityLabel `json:"value,omitempty"` 9684 // NextLink - READ-ONLY; Link to retrieve next page of results. 9685 NextLink *string `json:"nextLink,omitempty"` 9686} 9687 9688// MarshalJSON is the custom marshaler for SensitivityLabelListResult. 9689func (sllr SensitivityLabelListResult) MarshalJSON() ([]byte, error) { 9690 objectMap := make(map[string]interface{}) 9691 return json.Marshal(objectMap) 9692} 9693 9694// SensitivityLabelListResultIterator provides access to a complete listing of SensitivityLabel values. 9695type SensitivityLabelListResultIterator struct { 9696 i int 9697 page SensitivityLabelListResultPage 9698} 9699 9700// NextWithContext advances to the next value. If there was an error making 9701// the request the iterator does not advance and the error is returned. 9702func (iter *SensitivityLabelListResultIterator) NextWithContext(ctx context.Context) (err error) { 9703 if tracing.IsEnabled() { 9704 ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultIterator.NextWithContext") 9705 defer func() { 9706 sc := -1 9707 if iter.Response().Response.Response != nil { 9708 sc = iter.Response().Response.Response.StatusCode 9709 } 9710 tracing.EndSpan(ctx, sc, err) 9711 }() 9712 } 9713 iter.i++ 9714 if iter.i < len(iter.page.Values()) { 9715 return nil 9716 } 9717 err = iter.page.NextWithContext(ctx) 9718 if err != nil { 9719 iter.i-- 9720 return err 9721 } 9722 iter.i = 0 9723 return nil 9724} 9725 9726// Next advances to the next value. If there was an error making 9727// the request the iterator does not advance and the error is returned. 9728// Deprecated: Use NextWithContext() instead. 9729func (iter *SensitivityLabelListResultIterator) Next() error { 9730 return iter.NextWithContext(context.Background()) 9731} 9732 9733// NotDone returns true if the enumeration should be started or is not yet complete. 9734func (iter SensitivityLabelListResultIterator) NotDone() bool { 9735 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9736} 9737 9738// Response returns the raw server response from the last page request. 9739func (iter SensitivityLabelListResultIterator) Response() SensitivityLabelListResult { 9740 return iter.page.Response() 9741} 9742 9743// Value returns the current value or a zero-initialized value if the 9744// iterator has advanced beyond the end of the collection. 9745func (iter SensitivityLabelListResultIterator) Value() SensitivityLabel { 9746 if !iter.page.NotDone() { 9747 return SensitivityLabel{} 9748 } 9749 return iter.page.Values()[iter.i] 9750} 9751 9752// Creates a new instance of the SensitivityLabelListResultIterator type. 9753func NewSensitivityLabelListResultIterator(page SensitivityLabelListResultPage) SensitivityLabelListResultIterator { 9754 return SensitivityLabelListResultIterator{page: page} 9755} 9756 9757// IsEmpty returns true if the ListResult contains no values. 9758func (sllr SensitivityLabelListResult) IsEmpty() bool { 9759 return sllr.Value == nil || len(*sllr.Value) == 0 9760} 9761 9762// hasNextLink returns true if the NextLink is not empty. 9763func (sllr SensitivityLabelListResult) hasNextLink() bool { 9764 return sllr.NextLink != nil && len(*sllr.NextLink) != 0 9765} 9766 9767// sensitivityLabelListResultPreparer prepares a request to retrieve the next set of results. 9768// It returns nil if no more results exist. 9769func (sllr SensitivityLabelListResult) sensitivityLabelListResultPreparer(ctx context.Context) (*http.Request, error) { 9770 if !sllr.hasNextLink() { 9771 return nil, nil 9772 } 9773 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9774 autorest.AsJSON(), 9775 autorest.AsGet(), 9776 autorest.WithBaseURL(to.String(sllr.NextLink))) 9777} 9778 9779// SensitivityLabelListResultPage contains a page of SensitivityLabel values. 9780type SensitivityLabelListResultPage struct { 9781 fn func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error) 9782 sllr SensitivityLabelListResult 9783} 9784 9785// NextWithContext advances to the next page of values. If there was an error making 9786// the request the page does not advance and the error is returned. 9787func (page *SensitivityLabelListResultPage) NextWithContext(ctx context.Context) (err error) { 9788 if tracing.IsEnabled() { 9789 ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultPage.NextWithContext") 9790 defer func() { 9791 sc := -1 9792 if page.Response().Response.Response != nil { 9793 sc = page.Response().Response.Response.StatusCode 9794 } 9795 tracing.EndSpan(ctx, sc, err) 9796 }() 9797 } 9798 for { 9799 next, err := page.fn(ctx, page.sllr) 9800 if err != nil { 9801 return err 9802 } 9803 page.sllr = next 9804 if !next.hasNextLink() || !next.IsEmpty() { 9805 break 9806 } 9807 } 9808 return nil 9809} 9810 9811// Next advances to the next page of values. If there was an error making 9812// the request the page does not advance and the error is returned. 9813// Deprecated: Use NextWithContext() instead. 9814func (page *SensitivityLabelListResultPage) Next() error { 9815 return page.NextWithContext(context.Background()) 9816} 9817 9818// NotDone returns true if the page enumeration should be started or is not yet complete. 9819func (page SensitivityLabelListResultPage) NotDone() bool { 9820 return !page.sllr.IsEmpty() 9821} 9822 9823// Response returns the raw server response from the last page request. 9824func (page SensitivityLabelListResultPage) Response() SensitivityLabelListResult { 9825 return page.sllr 9826} 9827 9828// Values returns the slice of values for the current page or nil if there are no values. 9829func (page SensitivityLabelListResultPage) Values() []SensitivityLabel { 9830 if page.sllr.IsEmpty() { 9831 return nil 9832 } 9833 return *page.sllr.Value 9834} 9835 9836// Creates a new instance of the SensitivityLabelListResultPage type. 9837func NewSensitivityLabelListResultPage(cur SensitivityLabelListResult, getNextPage func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)) SensitivityLabelListResultPage { 9838 return SensitivityLabelListResultPage{ 9839 fn: getNextPage, 9840 sllr: cur, 9841 } 9842} 9843 9844// SensitivityLabelProperties properties of a sensitivity label. 9845type SensitivityLabelProperties struct { 9846 // SchemaName - READ-ONLY; The schema name. 9847 SchemaName *string `json:"schemaName,omitempty"` 9848 // TableName - READ-ONLY; The table name. 9849 TableName *string `json:"tableName,omitempty"` 9850 // ColumnName - READ-ONLY; The column name. 9851 ColumnName *string `json:"columnName,omitempty"` 9852 // LabelName - The label name. 9853 LabelName *string `json:"labelName,omitempty"` 9854 // LabelID - The label ID. 9855 LabelID *string `json:"labelId,omitempty"` 9856 // InformationType - The information type. 9857 InformationType *string `json:"informationType,omitempty"` 9858 // InformationTypeID - The information type ID. 9859 InformationTypeID *string `json:"informationTypeId,omitempty"` 9860 // IsDisabled - READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. 9861 IsDisabled *bool `json:"isDisabled,omitempty"` 9862 // Rank - Possible values include: 'SensitivityLabelRankNone', 'SensitivityLabelRankLow', 'SensitivityLabelRankMedium', 'SensitivityLabelRankHigh', 'SensitivityLabelRankCritical' 9863 Rank SensitivityLabelRank `json:"rank,omitempty"` 9864} 9865 9866// MarshalJSON is the custom marshaler for SensitivityLabelProperties. 9867func (slp SensitivityLabelProperties) MarshalJSON() ([]byte, error) { 9868 objectMap := make(map[string]interface{}) 9869 if slp.LabelName != nil { 9870 objectMap["labelName"] = slp.LabelName 9871 } 9872 if slp.LabelID != nil { 9873 objectMap["labelId"] = slp.LabelID 9874 } 9875 if slp.InformationType != nil { 9876 objectMap["informationType"] = slp.InformationType 9877 } 9878 if slp.InformationTypeID != nil { 9879 objectMap["informationTypeId"] = slp.InformationTypeID 9880 } 9881 if slp.Rank != "" { 9882 objectMap["rank"] = slp.Rank 9883 } 9884 return json.Marshal(objectMap) 9885} 9886 9887// SensitivityLabelUpdate a sensitivity label update operation. 9888type SensitivityLabelUpdate struct { 9889 // SensitivityLabelUpdateProperties - Resource properties. 9890 *SensitivityLabelUpdateProperties `json:"properties,omitempty"` 9891 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 9892 ID *string `json:"id,omitempty"` 9893 // Name - READ-ONLY; The name of the resource 9894 Name *string `json:"name,omitempty"` 9895 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 9896 Type *string `json:"type,omitempty"` 9897} 9898 9899// MarshalJSON is the custom marshaler for SensitivityLabelUpdate. 9900func (slu SensitivityLabelUpdate) MarshalJSON() ([]byte, error) { 9901 objectMap := make(map[string]interface{}) 9902 if slu.SensitivityLabelUpdateProperties != nil { 9903 objectMap["properties"] = slu.SensitivityLabelUpdateProperties 9904 } 9905 return json.Marshal(objectMap) 9906} 9907 9908// UnmarshalJSON is the custom unmarshaler for SensitivityLabelUpdate struct. 9909func (slu *SensitivityLabelUpdate) UnmarshalJSON(body []byte) error { 9910 var m map[string]*json.RawMessage 9911 err := json.Unmarshal(body, &m) 9912 if err != nil { 9913 return err 9914 } 9915 for k, v := range m { 9916 switch k { 9917 case "properties": 9918 if v != nil { 9919 var sensitivityLabelUpdateProperties SensitivityLabelUpdateProperties 9920 err = json.Unmarshal(*v, &sensitivityLabelUpdateProperties) 9921 if err != nil { 9922 return err 9923 } 9924 slu.SensitivityLabelUpdateProperties = &sensitivityLabelUpdateProperties 9925 } 9926 case "id": 9927 if v != nil { 9928 var ID string 9929 err = json.Unmarshal(*v, &ID) 9930 if err != nil { 9931 return err 9932 } 9933 slu.ID = &ID 9934 } 9935 case "name": 9936 if v != nil { 9937 var name string 9938 err = json.Unmarshal(*v, &name) 9939 if err != nil { 9940 return err 9941 } 9942 slu.Name = &name 9943 } 9944 case "type": 9945 if v != nil { 9946 var typeVar string 9947 err = json.Unmarshal(*v, &typeVar) 9948 if err != nil { 9949 return err 9950 } 9951 slu.Type = &typeVar 9952 } 9953 } 9954 } 9955 9956 return nil 9957} 9958 9959// SensitivityLabelUpdateList a list of sensitivity label update operations. 9960type SensitivityLabelUpdateList struct { 9961 Operations *[]SensitivityLabelUpdate `json:"operations,omitempty"` 9962} 9963 9964// SensitivityLabelUpdateProperties properties of an operation executed on a sensitivity label. 9965type SensitivityLabelUpdateProperties struct { 9966 // Op - Possible values include: 'SensitivityLabelUpdateKindSet', 'SensitivityLabelUpdateKindRemove' 9967 Op SensitivityLabelUpdateKind `json:"op,omitempty"` 9968 // Schema - Schema name of the column to update. 9969 Schema *string `json:"schema,omitempty"` 9970 // Table - Table name of the column to update. 9971 Table *string `json:"table,omitempty"` 9972 // Column - Column name to update. 9973 Column *string `json:"column,omitempty"` 9974 // SensitivityLabel - The sensitivity label information to apply on a column. 9975 SensitivityLabel *SensitivityLabel `json:"sensitivityLabel,omitempty"` 9976} 9977 9978// ServerBlobAuditingPolicy a server blob auditing policy. 9979type ServerBlobAuditingPolicy struct { 9980 autorest.Response `json:"-"` 9981 // ServerBlobAuditingPolicyProperties - Resource properties. 9982 *ServerBlobAuditingPolicyProperties `json:"properties,omitempty"` 9983 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 9984 ID *string `json:"id,omitempty"` 9985 // Name - READ-ONLY; The name of the resource 9986 Name *string `json:"name,omitempty"` 9987 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 9988 Type *string `json:"type,omitempty"` 9989} 9990 9991// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicy. 9992func (sbap ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { 9993 objectMap := make(map[string]interface{}) 9994 if sbap.ServerBlobAuditingPolicyProperties != nil { 9995 objectMap["properties"] = sbap.ServerBlobAuditingPolicyProperties 9996 } 9997 return json.Marshal(objectMap) 9998} 9999 10000// UnmarshalJSON is the custom unmarshaler for ServerBlobAuditingPolicy struct. 10001func (sbap *ServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error { 10002 var m map[string]*json.RawMessage 10003 err := json.Unmarshal(body, &m) 10004 if err != nil { 10005 return err 10006 } 10007 for k, v := range m { 10008 switch k { 10009 case "properties": 10010 if v != nil { 10011 var serverBlobAuditingPolicyProperties ServerBlobAuditingPolicyProperties 10012 err = json.Unmarshal(*v, &serverBlobAuditingPolicyProperties) 10013 if err != nil { 10014 return err 10015 } 10016 sbap.ServerBlobAuditingPolicyProperties = &serverBlobAuditingPolicyProperties 10017 } 10018 case "id": 10019 if v != nil { 10020 var ID string 10021 err = json.Unmarshal(*v, &ID) 10022 if err != nil { 10023 return err 10024 } 10025 sbap.ID = &ID 10026 } 10027 case "name": 10028 if v != nil { 10029 var name string 10030 err = json.Unmarshal(*v, &name) 10031 if err != nil { 10032 return err 10033 } 10034 sbap.Name = &name 10035 } 10036 case "type": 10037 if v != nil { 10038 var typeVar string 10039 err = json.Unmarshal(*v, &typeVar) 10040 if err != nil { 10041 return err 10042 } 10043 sbap.Type = &typeVar 10044 } 10045 } 10046 } 10047 10048 return nil 10049} 10050 10051// ServerBlobAuditingPolicyListResult a list of server auditing settings. 10052type ServerBlobAuditingPolicyListResult struct { 10053 autorest.Response `json:"-"` 10054 // Value - READ-ONLY; Array of results. 10055 Value *[]ServerBlobAuditingPolicy `json:"value,omitempty"` 10056 // NextLink - READ-ONLY; Link to retrieve next page of results. 10057 NextLink *string `json:"nextLink,omitempty"` 10058} 10059 10060// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicyListResult. 10061func (sbaplr ServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { 10062 objectMap := make(map[string]interface{}) 10063 return json.Marshal(objectMap) 10064} 10065 10066// ServerBlobAuditingPolicyListResultIterator provides access to a complete listing of 10067// ServerBlobAuditingPolicy values. 10068type ServerBlobAuditingPolicyListResultIterator struct { 10069 i int 10070 page ServerBlobAuditingPolicyListResultPage 10071} 10072 10073// NextWithContext advances to the next value. If there was an error making 10074// the request the iterator does not advance and the error is returned. 10075func (iter *ServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { 10076 if tracing.IsEnabled() { 10077 ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultIterator.NextWithContext") 10078 defer func() { 10079 sc := -1 10080 if iter.Response().Response.Response != nil { 10081 sc = iter.Response().Response.Response.StatusCode 10082 } 10083 tracing.EndSpan(ctx, sc, err) 10084 }() 10085 } 10086 iter.i++ 10087 if iter.i < len(iter.page.Values()) { 10088 return nil 10089 } 10090 err = iter.page.NextWithContext(ctx) 10091 if err != nil { 10092 iter.i-- 10093 return err 10094 } 10095 iter.i = 0 10096 return nil 10097} 10098 10099// Next advances to the next value. If there was an error making 10100// the request the iterator does not advance and the error is returned. 10101// Deprecated: Use NextWithContext() instead. 10102func (iter *ServerBlobAuditingPolicyListResultIterator) Next() error { 10103 return iter.NextWithContext(context.Background()) 10104} 10105 10106// NotDone returns true if the enumeration should be started or is not yet complete. 10107func (iter ServerBlobAuditingPolicyListResultIterator) NotDone() bool { 10108 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10109} 10110 10111// Response returns the raw server response from the last page request. 10112func (iter ServerBlobAuditingPolicyListResultIterator) Response() ServerBlobAuditingPolicyListResult { 10113 return iter.page.Response() 10114} 10115 10116// Value returns the current value or a zero-initialized value if the 10117// iterator has advanced beyond the end of the collection. 10118func (iter ServerBlobAuditingPolicyListResultIterator) Value() ServerBlobAuditingPolicy { 10119 if !iter.page.NotDone() { 10120 return ServerBlobAuditingPolicy{} 10121 } 10122 return iter.page.Values()[iter.i] 10123} 10124 10125// Creates a new instance of the ServerBlobAuditingPolicyListResultIterator type. 10126func NewServerBlobAuditingPolicyListResultIterator(page ServerBlobAuditingPolicyListResultPage) ServerBlobAuditingPolicyListResultIterator { 10127 return ServerBlobAuditingPolicyListResultIterator{page: page} 10128} 10129 10130// IsEmpty returns true if the ListResult contains no values. 10131func (sbaplr ServerBlobAuditingPolicyListResult) IsEmpty() bool { 10132 return sbaplr.Value == nil || len(*sbaplr.Value) == 0 10133} 10134 10135// hasNextLink returns true if the NextLink is not empty. 10136func (sbaplr ServerBlobAuditingPolicyListResult) hasNextLink() bool { 10137 return sbaplr.NextLink != nil && len(*sbaplr.NextLink) != 0 10138} 10139 10140// serverBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. 10141// It returns nil if no more results exist. 10142func (sbaplr ServerBlobAuditingPolicyListResult) serverBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { 10143 if !sbaplr.hasNextLink() { 10144 return nil, nil 10145 } 10146 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10147 autorest.AsJSON(), 10148 autorest.AsGet(), 10149 autorest.WithBaseURL(to.String(sbaplr.NextLink))) 10150} 10151 10152// ServerBlobAuditingPolicyListResultPage contains a page of ServerBlobAuditingPolicy values. 10153type ServerBlobAuditingPolicyListResultPage struct { 10154 fn func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error) 10155 sbaplr ServerBlobAuditingPolicyListResult 10156} 10157 10158// NextWithContext advances to the next page of values. If there was an error making 10159// the request the page does not advance and the error is returned. 10160func (page *ServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { 10161 if tracing.IsEnabled() { 10162 ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultPage.NextWithContext") 10163 defer func() { 10164 sc := -1 10165 if page.Response().Response.Response != nil { 10166 sc = page.Response().Response.Response.StatusCode 10167 } 10168 tracing.EndSpan(ctx, sc, err) 10169 }() 10170 } 10171 for { 10172 next, err := page.fn(ctx, page.sbaplr) 10173 if err != nil { 10174 return err 10175 } 10176 page.sbaplr = next 10177 if !next.hasNextLink() || !next.IsEmpty() { 10178 break 10179 } 10180 } 10181 return nil 10182} 10183 10184// Next advances to the next page of values. If there was an error making 10185// the request the page does not advance and the error is returned. 10186// Deprecated: Use NextWithContext() instead. 10187func (page *ServerBlobAuditingPolicyListResultPage) Next() error { 10188 return page.NextWithContext(context.Background()) 10189} 10190 10191// NotDone returns true if the page enumeration should be started or is not yet complete. 10192func (page ServerBlobAuditingPolicyListResultPage) NotDone() bool { 10193 return !page.sbaplr.IsEmpty() 10194} 10195 10196// Response returns the raw server response from the last page request. 10197func (page ServerBlobAuditingPolicyListResultPage) Response() ServerBlobAuditingPolicyListResult { 10198 return page.sbaplr 10199} 10200 10201// Values returns the slice of values for the current page or nil if there are no values. 10202func (page ServerBlobAuditingPolicyListResultPage) Values() []ServerBlobAuditingPolicy { 10203 if page.sbaplr.IsEmpty() { 10204 return nil 10205 } 10206 return *page.sbaplr.Value 10207} 10208 10209// Creates a new instance of the ServerBlobAuditingPolicyListResultPage type. 10210func NewServerBlobAuditingPolicyListResultPage(cur ServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error)) ServerBlobAuditingPolicyListResultPage { 10211 return ServerBlobAuditingPolicyListResultPage{ 10212 fn: getNextPage, 10213 sbaplr: cur, 10214 } 10215} 10216 10217// ServerBlobAuditingPolicyProperties properties of a server blob auditing policy. 10218type ServerBlobAuditingPolicyProperties struct { 10219 // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' 10220 State BlobAuditingPolicyState `json:"state,omitempty"` 10221 // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. 10222 StorageEndpoint *string `json:"storageEndpoint,omitempty"` 10223 // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. 10224 // If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. 10225 // Prerequisites for using managed identity authentication: 10226 // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 10227 // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. 10228 // For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) 10229 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 10230 // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. 10231 RetentionDays *int32 `json:"retentionDays,omitempty"` 10232 // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. 10233 // 10234 // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: 10235 // 10236 // BATCH_COMPLETED_GROUP, 10237 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 10238 // FAILED_DATABASE_AUTHENTICATION_GROUP. 10239 // 10240 // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. 10241 // 10242 // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 10243 // 10244 // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 10245 // BACKUP_RESTORE_GROUP 10246 // DATABASE_LOGOUT_GROUP 10247 // DATABASE_OBJECT_CHANGE_GROUP 10248 // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 10249 // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 10250 // DATABASE_OPERATION_GROUP 10251 // DATABASE_PERMISSION_CHANGE_GROUP 10252 // DATABASE_PRINCIPAL_CHANGE_GROUP 10253 // DATABASE_PRINCIPAL_IMPERSONATION_GROUP 10254 // DATABASE_ROLE_MEMBER_CHANGE_GROUP 10255 // FAILED_DATABASE_AUTHENTICATION_GROUP 10256 // SCHEMA_OBJECT_ACCESS_GROUP 10257 // SCHEMA_OBJECT_CHANGE_GROUP 10258 // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 10259 // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 10260 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 10261 // USER_CHANGE_PASSWORD_GROUP 10262 // BATCH_STARTED_GROUP 10263 // BATCH_COMPLETED_GROUP 10264 // 10265 // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. 10266 // 10267 // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). 10268 // 10269 // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: 10270 // SELECT 10271 // UPDATE 10272 // INSERT 10273 // DELETE 10274 // EXECUTE 10275 // RECEIVE 10276 // REFERENCES 10277 // 10278 // The general form for defining an action to be audited is: 10279 // {action} ON {object} BY {principal} 10280 // 10281 // Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 10282 // 10283 // For example: 10284 // SELECT on dbo.myTable by public 10285 // SELECT on DATABASE::myDatabase by public 10286 // SELECT on SCHEMA::mySchema by public 10287 // 10288 // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) 10289 AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` 10290 // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. 10291 StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` 10292 // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. 10293 IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` 10294 // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. 10295 // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. 10296 // 10297 // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. 10298 // Note that for server level audit you should use the 'master' database as {databaseName}. 10299 // 10300 // Diagnostic Settings URI format: 10301 // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 10302 // 10303 // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) 10304 // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) 10305 IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` 10306 // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. 10307 // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 10308 QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` 10309} 10310 10311// ServerSecurityAlertPolicy workspace managed Sql server security alert policy. 10312type ServerSecurityAlertPolicy struct { 10313 autorest.Response `json:"-"` 10314 // ServerSecurityAlertPolicyProperties - Resource properties. 10315 *ServerSecurityAlertPolicyProperties `json:"properties,omitempty"` 10316 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 10317 ID *string `json:"id,omitempty"` 10318 // Name - READ-ONLY; The name of the resource 10319 Name *string `json:"name,omitempty"` 10320 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 10321 Type *string `json:"type,omitempty"` 10322} 10323 10324// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy. 10325func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { 10326 objectMap := make(map[string]interface{}) 10327 if ssap.ServerSecurityAlertPolicyProperties != nil { 10328 objectMap["properties"] = ssap.ServerSecurityAlertPolicyProperties 10329 } 10330 return json.Marshal(objectMap) 10331} 10332 10333// UnmarshalJSON is the custom unmarshaler for ServerSecurityAlertPolicy struct. 10334func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error { 10335 var m map[string]*json.RawMessage 10336 err := json.Unmarshal(body, &m) 10337 if err != nil { 10338 return err 10339 } 10340 for k, v := range m { 10341 switch k { 10342 case "properties": 10343 if v != nil { 10344 var serverSecurityAlertPolicyProperties ServerSecurityAlertPolicyProperties 10345 err = json.Unmarshal(*v, &serverSecurityAlertPolicyProperties) 10346 if err != nil { 10347 return err 10348 } 10349 ssap.ServerSecurityAlertPolicyProperties = &serverSecurityAlertPolicyProperties 10350 } 10351 case "id": 10352 if v != nil { 10353 var ID string 10354 err = json.Unmarshal(*v, &ID) 10355 if err != nil { 10356 return err 10357 } 10358 ssap.ID = &ID 10359 } 10360 case "name": 10361 if v != nil { 10362 var name string 10363 err = json.Unmarshal(*v, &name) 10364 if err != nil { 10365 return err 10366 } 10367 ssap.Name = &name 10368 } 10369 case "type": 10370 if v != nil { 10371 var typeVar string 10372 err = json.Unmarshal(*v, &typeVar) 10373 if err != nil { 10374 return err 10375 } 10376 ssap.Type = &typeVar 10377 } 10378 } 10379 } 10380 10381 return nil 10382} 10383 10384// ServerSecurityAlertPolicyListResult a list of the workspace managed sql server's security alert 10385// policies. 10386type ServerSecurityAlertPolicyListResult struct { 10387 autorest.Response `json:"-"` 10388 // Value - READ-ONLY; Array of results. 10389 Value *[]ServerSecurityAlertPolicy `json:"value,omitempty"` 10390 // NextLink - READ-ONLY; Link to retrieve next page of results. 10391 NextLink *string `json:"nextLink,omitempty"` 10392} 10393 10394// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicyListResult. 10395func (ssaplr ServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { 10396 objectMap := make(map[string]interface{}) 10397 return json.Marshal(objectMap) 10398} 10399 10400// ServerSecurityAlertPolicyListResultIterator provides access to a complete listing of 10401// ServerSecurityAlertPolicy values. 10402type ServerSecurityAlertPolicyListResultIterator struct { 10403 i int 10404 page ServerSecurityAlertPolicyListResultPage 10405} 10406 10407// NextWithContext advances to the next value. If there was an error making 10408// the request the iterator does not advance and the error is returned. 10409func (iter *ServerSecurityAlertPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { 10410 if tracing.IsEnabled() { 10411 ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPolicyListResultIterator.NextWithContext") 10412 defer func() { 10413 sc := -1 10414 if iter.Response().Response.Response != nil { 10415 sc = iter.Response().Response.Response.StatusCode 10416 } 10417 tracing.EndSpan(ctx, sc, err) 10418 }() 10419 } 10420 iter.i++ 10421 if iter.i < len(iter.page.Values()) { 10422 return nil 10423 } 10424 err = iter.page.NextWithContext(ctx) 10425 if err != nil { 10426 iter.i-- 10427 return err 10428 } 10429 iter.i = 0 10430 return nil 10431} 10432 10433// Next advances to the next value. If there was an error making 10434// the request the iterator does not advance and the error is returned. 10435// Deprecated: Use NextWithContext() instead. 10436func (iter *ServerSecurityAlertPolicyListResultIterator) Next() error { 10437 return iter.NextWithContext(context.Background()) 10438} 10439 10440// NotDone returns true if the enumeration should be started or is not yet complete. 10441func (iter ServerSecurityAlertPolicyListResultIterator) NotDone() bool { 10442 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10443} 10444 10445// Response returns the raw server response from the last page request. 10446func (iter ServerSecurityAlertPolicyListResultIterator) Response() ServerSecurityAlertPolicyListResult { 10447 return iter.page.Response() 10448} 10449 10450// Value returns the current value or a zero-initialized value if the 10451// iterator has advanced beyond the end of the collection. 10452func (iter ServerSecurityAlertPolicyListResultIterator) Value() ServerSecurityAlertPolicy { 10453 if !iter.page.NotDone() { 10454 return ServerSecurityAlertPolicy{} 10455 } 10456 return iter.page.Values()[iter.i] 10457} 10458 10459// Creates a new instance of the ServerSecurityAlertPolicyListResultIterator type. 10460func NewServerSecurityAlertPolicyListResultIterator(page ServerSecurityAlertPolicyListResultPage) ServerSecurityAlertPolicyListResultIterator { 10461 return ServerSecurityAlertPolicyListResultIterator{page: page} 10462} 10463 10464// IsEmpty returns true if the ListResult contains no values. 10465func (ssaplr ServerSecurityAlertPolicyListResult) IsEmpty() bool { 10466 return ssaplr.Value == nil || len(*ssaplr.Value) == 0 10467} 10468 10469// hasNextLink returns true if the NextLink is not empty. 10470func (ssaplr ServerSecurityAlertPolicyListResult) hasNextLink() bool { 10471 return ssaplr.NextLink != nil && len(*ssaplr.NextLink) != 0 10472} 10473 10474// serverSecurityAlertPolicyListResultPreparer prepares a request to retrieve the next set of results. 10475// It returns nil if no more results exist. 10476func (ssaplr ServerSecurityAlertPolicyListResult) serverSecurityAlertPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { 10477 if !ssaplr.hasNextLink() { 10478 return nil, nil 10479 } 10480 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10481 autorest.AsJSON(), 10482 autorest.AsGet(), 10483 autorest.WithBaseURL(to.String(ssaplr.NextLink))) 10484} 10485 10486// ServerSecurityAlertPolicyListResultPage contains a page of ServerSecurityAlertPolicy values. 10487type ServerSecurityAlertPolicyListResultPage struct { 10488 fn func(context.Context, ServerSecurityAlertPolicyListResult) (ServerSecurityAlertPolicyListResult, error) 10489 ssaplr ServerSecurityAlertPolicyListResult 10490} 10491 10492// NextWithContext advances to the next page of values. If there was an error making 10493// the request the page does not advance and the error is returned. 10494func (page *ServerSecurityAlertPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { 10495 if tracing.IsEnabled() { 10496 ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPolicyListResultPage.NextWithContext") 10497 defer func() { 10498 sc := -1 10499 if page.Response().Response.Response != nil { 10500 sc = page.Response().Response.Response.StatusCode 10501 } 10502 tracing.EndSpan(ctx, sc, err) 10503 }() 10504 } 10505 for { 10506 next, err := page.fn(ctx, page.ssaplr) 10507 if err != nil { 10508 return err 10509 } 10510 page.ssaplr = next 10511 if !next.hasNextLink() || !next.IsEmpty() { 10512 break 10513 } 10514 } 10515 return nil 10516} 10517 10518// Next advances to the next page of values. If there was an error making 10519// the request the page does not advance and the error is returned. 10520// Deprecated: Use NextWithContext() instead. 10521func (page *ServerSecurityAlertPolicyListResultPage) Next() error { 10522 return page.NextWithContext(context.Background()) 10523} 10524 10525// NotDone returns true if the page enumeration should be started or is not yet complete. 10526func (page ServerSecurityAlertPolicyListResultPage) NotDone() bool { 10527 return !page.ssaplr.IsEmpty() 10528} 10529 10530// Response returns the raw server response from the last page request. 10531func (page ServerSecurityAlertPolicyListResultPage) Response() ServerSecurityAlertPolicyListResult { 10532 return page.ssaplr 10533} 10534 10535// Values returns the slice of values for the current page or nil if there are no values. 10536func (page ServerSecurityAlertPolicyListResultPage) Values() []ServerSecurityAlertPolicy { 10537 if page.ssaplr.IsEmpty() { 10538 return nil 10539 } 10540 return *page.ssaplr.Value 10541} 10542 10543// Creates a new instance of the ServerSecurityAlertPolicyListResultPage type. 10544func NewServerSecurityAlertPolicyListResultPage(cur ServerSecurityAlertPolicyListResult, getNextPage func(context.Context, ServerSecurityAlertPolicyListResult) (ServerSecurityAlertPolicyListResult, error)) ServerSecurityAlertPolicyListResultPage { 10545 return ServerSecurityAlertPolicyListResultPage{ 10546 fn: getNextPage, 10547 ssaplr: cur, 10548 } 10549} 10550 10551// ServerSecurityAlertPolicyProperties properties of a security alert policy. 10552type ServerSecurityAlertPolicyProperties struct { 10553 // State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific server. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled' 10554 State SecurityAlertPolicyState `json:"state,omitempty"` 10555 // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action 10556 DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` 10557 // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. 10558 EmailAddresses *[]string `json:"emailAddresses,omitempty"` 10559 // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. 10560 EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` 10561 // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. 10562 StorageEndpoint *string `json:"storageEndpoint,omitempty"` 10563 // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. 10564 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 10565 // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. 10566 RetentionDays *int32 `json:"retentionDays,omitempty"` 10567 // CreationTime - READ-ONLY; Specifies the UTC creation time of the policy. 10568 CreationTime *date.Time `json:"creationTime,omitempty"` 10569} 10570 10571// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicyProperties. 10572func (ssapp ServerSecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { 10573 objectMap := make(map[string]interface{}) 10574 if ssapp.State != "" { 10575 objectMap["state"] = ssapp.State 10576 } 10577 if ssapp.DisabledAlerts != nil { 10578 objectMap["disabledAlerts"] = ssapp.DisabledAlerts 10579 } 10580 if ssapp.EmailAddresses != nil { 10581 objectMap["emailAddresses"] = ssapp.EmailAddresses 10582 } 10583 if ssapp.EmailAccountAdmins != nil { 10584 objectMap["emailAccountAdmins"] = ssapp.EmailAccountAdmins 10585 } 10586 if ssapp.StorageEndpoint != nil { 10587 objectMap["storageEndpoint"] = ssapp.StorageEndpoint 10588 } 10589 if ssapp.StorageAccountAccessKey != nil { 10590 objectMap["storageAccountAccessKey"] = ssapp.StorageAccountAccessKey 10591 } 10592 if ssapp.RetentionDays != nil { 10593 objectMap["retentionDays"] = ssapp.RetentionDays 10594 } 10595 return json.Marshal(objectMap) 10596} 10597 10598// ServerUsage represents server metrics. 10599type ServerUsage struct { 10600 // Name - READ-ONLY; Name of the server usage metric. 10601 Name *string `json:"name,omitempty"` 10602 // ResourceName - READ-ONLY; The name of the resource. 10603 ResourceName *string `json:"resourceName,omitempty"` 10604 // DisplayName - READ-ONLY; The metric display name. 10605 DisplayName *string `json:"displayName,omitempty"` 10606 // CurrentValue - READ-ONLY; The current value of the metric. 10607 CurrentValue *float64 `json:"currentValue,omitempty"` 10608 // Limit - READ-ONLY; The current limit of the metric. 10609 Limit *float64 `json:"limit,omitempty"` 10610 // Unit - READ-ONLY; The units of the metric. 10611 Unit *string `json:"unit,omitempty"` 10612 // NextResetTime - READ-ONLY; The next reset time for the metric (ISO8601 format). 10613 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 10614} 10615 10616// MarshalJSON is the custom marshaler for ServerUsage. 10617func (su ServerUsage) MarshalJSON() ([]byte, error) { 10618 objectMap := make(map[string]interface{}) 10619 return json.Marshal(objectMap) 10620} 10621 10622// ServerUsageListResult represents the response to a list server metrics request. 10623type ServerUsageListResult struct { 10624 autorest.Response `json:"-"` 10625 // Value - The list of server metrics for the server. 10626 Value *[]ServerUsage `json:"value,omitempty"` 10627 // NextLink - READ-ONLY; Link to retrieve next page of results. 10628 NextLink *string `json:"nextLink,omitempty"` 10629} 10630 10631// MarshalJSON is the custom marshaler for ServerUsageListResult. 10632func (sulr ServerUsageListResult) MarshalJSON() ([]byte, error) { 10633 objectMap := make(map[string]interface{}) 10634 if sulr.Value != nil { 10635 objectMap["value"] = sulr.Value 10636 } 10637 return json.Marshal(objectMap) 10638} 10639 10640// ServerUsageListResultIterator provides access to a complete listing of ServerUsage values. 10641type ServerUsageListResultIterator struct { 10642 i int 10643 page ServerUsageListResultPage 10644} 10645 10646// NextWithContext advances to the next value. If there was an error making 10647// the request the iterator does not advance and the error is returned. 10648func (iter *ServerUsageListResultIterator) NextWithContext(ctx context.Context) (err error) { 10649 if tracing.IsEnabled() { 10650 ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsageListResultIterator.NextWithContext") 10651 defer func() { 10652 sc := -1 10653 if iter.Response().Response.Response != nil { 10654 sc = iter.Response().Response.Response.StatusCode 10655 } 10656 tracing.EndSpan(ctx, sc, err) 10657 }() 10658 } 10659 iter.i++ 10660 if iter.i < len(iter.page.Values()) { 10661 return nil 10662 } 10663 err = iter.page.NextWithContext(ctx) 10664 if err != nil { 10665 iter.i-- 10666 return err 10667 } 10668 iter.i = 0 10669 return nil 10670} 10671 10672// Next advances to the next value. If there was an error making 10673// the request the iterator does not advance and the error is returned. 10674// Deprecated: Use NextWithContext() instead. 10675func (iter *ServerUsageListResultIterator) Next() error { 10676 return iter.NextWithContext(context.Background()) 10677} 10678 10679// NotDone returns true if the enumeration should be started or is not yet complete. 10680func (iter ServerUsageListResultIterator) NotDone() bool { 10681 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10682} 10683 10684// Response returns the raw server response from the last page request. 10685func (iter ServerUsageListResultIterator) Response() ServerUsageListResult { 10686 return iter.page.Response() 10687} 10688 10689// Value returns the current value or a zero-initialized value if the 10690// iterator has advanced beyond the end of the collection. 10691func (iter ServerUsageListResultIterator) Value() ServerUsage { 10692 if !iter.page.NotDone() { 10693 return ServerUsage{} 10694 } 10695 return iter.page.Values()[iter.i] 10696} 10697 10698// Creates a new instance of the ServerUsageListResultIterator type. 10699func NewServerUsageListResultIterator(page ServerUsageListResultPage) ServerUsageListResultIterator { 10700 return ServerUsageListResultIterator{page: page} 10701} 10702 10703// IsEmpty returns true if the ListResult contains no values. 10704func (sulr ServerUsageListResult) IsEmpty() bool { 10705 return sulr.Value == nil || len(*sulr.Value) == 0 10706} 10707 10708// hasNextLink returns true if the NextLink is not empty. 10709func (sulr ServerUsageListResult) hasNextLink() bool { 10710 return sulr.NextLink != nil && len(*sulr.NextLink) != 0 10711} 10712 10713// serverUsageListResultPreparer prepares a request to retrieve the next set of results. 10714// It returns nil if no more results exist. 10715func (sulr ServerUsageListResult) serverUsageListResultPreparer(ctx context.Context) (*http.Request, error) { 10716 if !sulr.hasNextLink() { 10717 return nil, nil 10718 } 10719 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10720 autorest.AsJSON(), 10721 autorest.AsGet(), 10722 autorest.WithBaseURL(to.String(sulr.NextLink))) 10723} 10724 10725// ServerUsageListResultPage contains a page of ServerUsage values. 10726type ServerUsageListResultPage struct { 10727 fn func(context.Context, ServerUsageListResult) (ServerUsageListResult, error) 10728 sulr ServerUsageListResult 10729} 10730 10731// NextWithContext advances to the next page of values. If there was an error making 10732// the request the page does not advance and the error is returned. 10733func (page *ServerUsageListResultPage) NextWithContext(ctx context.Context) (err error) { 10734 if tracing.IsEnabled() { 10735 ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsageListResultPage.NextWithContext") 10736 defer func() { 10737 sc := -1 10738 if page.Response().Response.Response != nil { 10739 sc = page.Response().Response.Response.StatusCode 10740 } 10741 tracing.EndSpan(ctx, sc, err) 10742 }() 10743 } 10744 for { 10745 next, err := page.fn(ctx, page.sulr) 10746 if err != nil { 10747 return err 10748 } 10749 page.sulr = next 10750 if !next.hasNextLink() || !next.IsEmpty() { 10751 break 10752 } 10753 } 10754 return nil 10755} 10756 10757// Next advances to the next page of values. If there was an error making 10758// the request the page does not advance and the error is returned. 10759// Deprecated: Use NextWithContext() instead. 10760func (page *ServerUsageListResultPage) Next() error { 10761 return page.NextWithContext(context.Background()) 10762} 10763 10764// NotDone returns true if the page enumeration should be started or is not yet complete. 10765func (page ServerUsageListResultPage) NotDone() bool { 10766 return !page.sulr.IsEmpty() 10767} 10768 10769// Response returns the raw server response from the last page request. 10770func (page ServerUsageListResultPage) Response() ServerUsageListResult { 10771 return page.sulr 10772} 10773 10774// Values returns the slice of values for the current page or nil if there are no values. 10775func (page ServerUsageListResultPage) Values() []ServerUsage { 10776 if page.sulr.IsEmpty() { 10777 return nil 10778 } 10779 return *page.sulr.Value 10780} 10781 10782// Creates a new instance of the ServerUsageListResultPage type. 10783func NewServerUsageListResultPage(cur ServerUsageListResult, getNextPage func(context.Context, ServerUsageListResult) (ServerUsageListResult, error)) ServerUsageListResultPage { 10784 return ServerUsageListResultPage{ 10785 fn: getNextPage, 10786 sulr: cur, 10787 } 10788} 10789 10790// ServerVulnerabilityAssessment a server vulnerability assessment. 10791type ServerVulnerabilityAssessment struct { 10792 autorest.Response `json:"-"` 10793 // ServerVulnerabilityAssessmentProperties - Resource properties. 10794 *ServerVulnerabilityAssessmentProperties `json:"properties,omitempty"` 10795 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 10796 ID *string `json:"id,omitempty"` 10797 // Name - READ-ONLY; The name of the resource 10798 Name *string `json:"name,omitempty"` 10799 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 10800 Type *string `json:"type,omitempty"` 10801} 10802 10803// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessment. 10804func (sva ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error) { 10805 objectMap := make(map[string]interface{}) 10806 if sva.ServerVulnerabilityAssessmentProperties != nil { 10807 objectMap["properties"] = sva.ServerVulnerabilityAssessmentProperties 10808 } 10809 return json.Marshal(objectMap) 10810} 10811 10812// UnmarshalJSON is the custom unmarshaler for ServerVulnerabilityAssessment struct. 10813func (sva *ServerVulnerabilityAssessment) UnmarshalJSON(body []byte) error { 10814 var m map[string]*json.RawMessage 10815 err := json.Unmarshal(body, &m) 10816 if err != nil { 10817 return err 10818 } 10819 for k, v := range m { 10820 switch k { 10821 case "properties": 10822 if v != nil { 10823 var serverVulnerabilityAssessmentProperties ServerVulnerabilityAssessmentProperties 10824 err = json.Unmarshal(*v, &serverVulnerabilityAssessmentProperties) 10825 if err != nil { 10826 return err 10827 } 10828 sva.ServerVulnerabilityAssessmentProperties = &serverVulnerabilityAssessmentProperties 10829 } 10830 case "id": 10831 if v != nil { 10832 var ID string 10833 err = json.Unmarshal(*v, &ID) 10834 if err != nil { 10835 return err 10836 } 10837 sva.ID = &ID 10838 } 10839 case "name": 10840 if v != nil { 10841 var name string 10842 err = json.Unmarshal(*v, &name) 10843 if err != nil { 10844 return err 10845 } 10846 sva.Name = &name 10847 } 10848 case "type": 10849 if v != nil { 10850 var typeVar string 10851 err = json.Unmarshal(*v, &typeVar) 10852 if err != nil { 10853 return err 10854 } 10855 sva.Type = &typeVar 10856 } 10857 } 10858 } 10859 10860 return nil 10861} 10862 10863// ServerVulnerabilityAssessmentListResult a list of the server's vulnerability assessments. 10864type ServerVulnerabilityAssessmentListResult struct { 10865 autorest.Response `json:"-"` 10866 // Value - READ-ONLY; Array of results. 10867 Value *[]ServerVulnerabilityAssessment `json:"value,omitempty"` 10868 // NextLink - READ-ONLY; Link to retrieve next page of results. 10869 NextLink *string `json:"nextLink,omitempty"` 10870} 10871 10872// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessmentListResult. 10873func (svalr ServerVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { 10874 objectMap := make(map[string]interface{}) 10875 return json.Marshal(objectMap) 10876} 10877 10878// ServerVulnerabilityAssessmentListResultIterator provides access to a complete listing of 10879// ServerVulnerabilityAssessment values. 10880type ServerVulnerabilityAssessmentListResultIterator struct { 10881 i int 10882 page ServerVulnerabilityAssessmentListResultPage 10883} 10884 10885// NextWithContext advances to the next value. If there was an error making 10886// the request the iterator does not advance and the error is returned. 10887func (iter *ServerVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { 10888 if tracing.IsEnabled() { 10889 ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultIterator.NextWithContext") 10890 defer func() { 10891 sc := -1 10892 if iter.Response().Response.Response != nil { 10893 sc = iter.Response().Response.Response.StatusCode 10894 } 10895 tracing.EndSpan(ctx, sc, err) 10896 }() 10897 } 10898 iter.i++ 10899 if iter.i < len(iter.page.Values()) { 10900 return nil 10901 } 10902 err = iter.page.NextWithContext(ctx) 10903 if err != nil { 10904 iter.i-- 10905 return err 10906 } 10907 iter.i = 0 10908 return nil 10909} 10910 10911// Next advances to the next value. If there was an error making 10912// the request the iterator does not advance and the error is returned. 10913// Deprecated: Use NextWithContext() instead. 10914func (iter *ServerVulnerabilityAssessmentListResultIterator) Next() error { 10915 return iter.NextWithContext(context.Background()) 10916} 10917 10918// NotDone returns true if the enumeration should be started or is not yet complete. 10919func (iter ServerVulnerabilityAssessmentListResultIterator) NotDone() bool { 10920 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10921} 10922 10923// Response returns the raw server response from the last page request. 10924func (iter ServerVulnerabilityAssessmentListResultIterator) Response() ServerVulnerabilityAssessmentListResult { 10925 return iter.page.Response() 10926} 10927 10928// Value returns the current value or a zero-initialized value if the 10929// iterator has advanced beyond the end of the collection. 10930func (iter ServerVulnerabilityAssessmentListResultIterator) Value() ServerVulnerabilityAssessment { 10931 if !iter.page.NotDone() { 10932 return ServerVulnerabilityAssessment{} 10933 } 10934 return iter.page.Values()[iter.i] 10935} 10936 10937// Creates a new instance of the ServerVulnerabilityAssessmentListResultIterator type. 10938func NewServerVulnerabilityAssessmentListResultIterator(page ServerVulnerabilityAssessmentListResultPage) ServerVulnerabilityAssessmentListResultIterator { 10939 return ServerVulnerabilityAssessmentListResultIterator{page: page} 10940} 10941 10942// IsEmpty returns true if the ListResult contains no values. 10943func (svalr ServerVulnerabilityAssessmentListResult) IsEmpty() bool { 10944 return svalr.Value == nil || len(*svalr.Value) == 0 10945} 10946 10947// hasNextLink returns true if the NextLink is not empty. 10948func (svalr ServerVulnerabilityAssessmentListResult) hasNextLink() bool { 10949 return svalr.NextLink != nil && len(*svalr.NextLink) != 0 10950} 10951 10952// serverVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. 10953// It returns nil if no more results exist. 10954func (svalr ServerVulnerabilityAssessmentListResult) serverVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { 10955 if !svalr.hasNextLink() { 10956 return nil, nil 10957 } 10958 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10959 autorest.AsJSON(), 10960 autorest.AsGet(), 10961 autorest.WithBaseURL(to.String(svalr.NextLink))) 10962} 10963 10964// ServerVulnerabilityAssessmentListResultPage contains a page of ServerVulnerabilityAssessment values. 10965type ServerVulnerabilityAssessmentListResultPage struct { 10966 fn func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error) 10967 svalr ServerVulnerabilityAssessmentListResult 10968} 10969 10970// NextWithContext advances to the next page of values. If there was an error making 10971// the request the page does not advance and the error is returned. 10972func (page *ServerVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { 10973 if tracing.IsEnabled() { 10974 ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultPage.NextWithContext") 10975 defer func() { 10976 sc := -1 10977 if page.Response().Response.Response != nil { 10978 sc = page.Response().Response.Response.StatusCode 10979 } 10980 tracing.EndSpan(ctx, sc, err) 10981 }() 10982 } 10983 for { 10984 next, err := page.fn(ctx, page.svalr) 10985 if err != nil { 10986 return err 10987 } 10988 page.svalr = next 10989 if !next.hasNextLink() || !next.IsEmpty() { 10990 break 10991 } 10992 } 10993 return nil 10994} 10995 10996// Next advances to the next page of values. If there was an error making 10997// the request the page does not advance and the error is returned. 10998// Deprecated: Use NextWithContext() instead. 10999func (page *ServerVulnerabilityAssessmentListResultPage) Next() error { 11000 return page.NextWithContext(context.Background()) 11001} 11002 11003// NotDone returns true if the page enumeration should be started or is not yet complete. 11004func (page ServerVulnerabilityAssessmentListResultPage) NotDone() bool { 11005 return !page.svalr.IsEmpty() 11006} 11007 11008// Response returns the raw server response from the last page request. 11009func (page ServerVulnerabilityAssessmentListResultPage) Response() ServerVulnerabilityAssessmentListResult { 11010 return page.svalr 11011} 11012 11013// Values returns the slice of values for the current page or nil if there are no values. 11014func (page ServerVulnerabilityAssessmentListResultPage) Values() []ServerVulnerabilityAssessment { 11015 if page.svalr.IsEmpty() { 11016 return nil 11017 } 11018 return *page.svalr.Value 11019} 11020 11021// Creates a new instance of the ServerVulnerabilityAssessmentListResultPage type. 11022func NewServerVulnerabilityAssessmentListResultPage(cur ServerVulnerabilityAssessmentListResult, getNextPage func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error)) ServerVulnerabilityAssessmentListResultPage { 11023 return ServerVulnerabilityAssessmentListResultPage{ 11024 fn: getNextPage, 11025 svalr: cur, 11026 } 11027} 11028 11029// ServerVulnerabilityAssessmentProperties properties of a server Vulnerability Assessment. 11030type ServerVulnerabilityAssessmentProperties struct { 11031 // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). 11032 StorageContainerPath *string `json:"storageContainerPath,omitempty"` 11033 // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. 11034 StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` 11035 // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. 11036 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 11037 // RecurringScans - The recurring scans settings 11038 RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` 11039} 11040 11041// SetObject ... 11042type SetObject struct { 11043 autorest.Response `json:"-"` 11044 Value interface{} `json:"value,omitempty"` 11045} 11046 11047// Sku SQL pool SKU 11048type Sku struct { 11049 // Tier - The service tier 11050 Tier *string `json:"tier,omitempty"` 11051 // Name - The SKU name 11052 Name *string `json:"name,omitempty"` 11053 // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. 11054 Capacity *int32 `json:"capacity,omitempty"` 11055} 11056 11057// SparkConfigProperties sparkConfig Properties for a Big Data pool powered by Apache Spark 11058type SparkConfigProperties struct { 11059 // Time - READ-ONLY; The last update time of the spark config properties file. 11060 Time *date.Time `json:"time,omitempty"` 11061 // Content - The spark config properties. 11062 Content *string `json:"content,omitempty"` 11063 // Filename - The filename of the spark config properties file. 11064 Filename *string `json:"filename,omitempty"` 11065 // ConfigurationType - The type of the spark config properties file. Possible values include: 'ConfigurationTypeFile', 'ConfigurationTypeArtifact' 11066 ConfigurationType ConfigurationType `json:"configurationType,omitempty"` 11067} 11068 11069// MarshalJSON is the custom marshaler for SparkConfigProperties. 11070func (scp SparkConfigProperties) MarshalJSON() ([]byte, error) { 11071 objectMap := make(map[string]interface{}) 11072 if scp.Content != nil { 11073 objectMap["content"] = scp.Content 11074 } 11075 if scp.Filename != nil { 11076 objectMap["filename"] = scp.Filename 11077 } 11078 if scp.ConfigurationType != "" { 11079 objectMap["configurationType"] = scp.ConfigurationType 11080 } 11081 return json.Marshal(objectMap) 11082} 11083 11084// SparkConfigurationInfo sparkConfiguration Artifact information 11085type SparkConfigurationInfo struct { 11086 // Description - Description about the SparkConfiguration. 11087 Description *string `json:"description,omitempty"` 11088 // Configs - SparkConfiguration configs. 11089 Configs map[string]*string `json:"configs"` 11090 // Annotations - Annotations for SparkConfiguration. 11091 Annotations *[]string `json:"annotations,omitempty"` 11092 // Notes - additional Notes. 11093 Notes *string `json:"notes,omitempty"` 11094 // CreatedBy - The identity that created the resource. 11095 CreatedBy *string `json:"createdBy,omitempty"` 11096 // Created - The timestamp of resource creation. 11097 Created *date.Time `json:"created,omitempty"` 11098} 11099 11100// MarshalJSON is the custom marshaler for SparkConfigurationInfo. 11101func (sci SparkConfigurationInfo) MarshalJSON() ([]byte, error) { 11102 objectMap := make(map[string]interface{}) 11103 if sci.Description != nil { 11104 objectMap["description"] = sci.Description 11105 } 11106 if sci.Configs != nil { 11107 objectMap["configs"] = sci.Configs 11108 } 11109 if sci.Annotations != nil { 11110 objectMap["annotations"] = sci.Annotations 11111 } 11112 if sci.Notes != nil { 11113 objectMap["notes"] = sci.Notes 11114 } 11115 if sci.CreatedBy != nil { 11116 objectMap["createdBy"] = sci.CreatedBy 11117 } 11118 if sci.Created != nil { 11119 objectMap["created"] = sci.Created 11120 } 11121 return json.Marshal(objectMap) 11122} 11123 11124// SparkConfigurationListResponse a list of SparkConfiguration resources. 11125type SparkConfigurationListResponse struct { 11126 autorest.Response `json:"-"` 11127 // Value - List of SparkConfiguration. 11128 Value *[]SparkConfigurationResource `json:"value,omitempty"` 11129 // NextLink - The link to the next page of results, if any remaining results exist. 11130 NextLink *string `json:"nextLink,omitempty"` 11131} 11132 11133// SparkConfigurationListResponseIterator provides access to a complete listing of 11134// SparkConfigurationResource values. 11135type SparkConfigurationListResponseIterator struct { 11136 i int 11137 page SparkConfigurationListResponsePage 11138} 11139 11140// NextWithContext advances to the next value. If there was an error making 11141// the request the iterator does not advance and the error is returned. 11142func (iter *SparkConfigurationListResponseIterator) NextWithContext(ctx context.Context) (err error) { 11143 if tracing.IsEnabled() { 11144 ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationListResponseIterator.NextWithContext") 11145 defer func() { 11146 sc := -1 11147 if iter.Response().Response.Response != nil { 11148 sc = iter.Response().Response.Response.StatusCode 11149 } 11150 tracing.EndSpan(ctx, sc, err) 11151 }() 11152 } 11153 iter.i++ 11154 if iter.i < len(iter.page.Values()) { 11155 return nil 11156 } 11157 err = iter.page.NextWithContext(ctx) 11158 if err != nil { 11159 iter.i-- 11160 return err 11161 } 11162 iter.i = 0 11163 return nil 11164} 11165 11166// Next advances to the next value. If there was an error making 11167// the request the iterator does not advance and the error is returned. 11168// Deprecated: Use NextWithContext() instead. 11169func (iter *SparkConfigurationListResponseIterator) Next() error { 11170 return iter.NextWithContext(context.Background()) 11171} 11172 11173// NotDone returns true if the enumeration should be started or is not yet complete. 11174func (iter SparkConfigurationListResponseIterator) NotDone() bool { 11175 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11176} 11177 11178// Response returns the raw server response from the last page request. 11179func (iter SparkConfigurationListResponseIterator) Response() SparkConfigurationListResponse { 11180 return iter.page.Response() 11181} 11182 11183// Value returns the current value or a zero-initialized value if the 11184// iterator has advanced beyond the end of the collection. 11185func (iter SparkConfigurationListResponseIterator) Value() SparkConfigurationResource { 11186 if !iter.page.NotDone() { 11187 return SparkConfigurationResource{} 11188 } 11189 return iter.page.Values()[iter.i] 11190} 11191 11192// Creates a new instance of the SparkConfigurationListResponseIterator type. 11193func NewSparkConfigurationListResponseIterator(page SparkConfigurationListResponsePage) SparkConfigurationListResponseIterator { 11194 return SparkConfigurationListResponseIterator{page: page} 11195} 11196 11197// IsEmpty returns true if the ListResult contains no values. 11198func (sclr SparkConfigurationListResponse) IsEmpty() bool { 11199 return sclr.Value == nil || len(*sclr.Value) == 0 11200} 11201 11202// hasNextLink returns true if the NextLink is not empty. 11203func (sclr SparkConfigurationListResponse) hasNextLink() bool { 11204 return sclr.NextLink != nil && len(*sclr.NextLink) != 0 11205} 11206 11207// sparkConfigurationListResponsePreparer prepares a request to retrieve the next set of results. 11208// It returns nil if no more results exist. 11209func (sclr SparkConfigurationListResponse) sparkConfigurationListResponsePreparer(ctx context.Context) (*http.Request, error) { 11210 if !sclr.hasNextLink() { 11211 return nil, nil 11212 } 11213 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11214 autorest.AsJSON(), 11215 autorest.AsGet(), 11216 autorest.WithBaseURL(to.String(sclr.NextLink))) 11217} 11218 11219// SparkConfigurationListResponsePage contains a page of SparkConfigurationResource values. 11220type SparkConfigurationListResponsePage struct { 11221 fn func(context.Context, SparkConfigurationListResponse) (SparkConfigurationListResponse, error) 11222 sclr SparkConfigurationListResponse 11223} 11224 11225// NextWithContext advances to the next page of values. If there was an error making 11226// the request the page does not advance and the error is returned. 11227func (page *SparkConfigurationListResponsePage) NextWithContext(ctx context.Context) (err error) { 11228 if tracing.IsEnabled() { 11229 ctx = tracing.StartSpan(ctx, fqdn+"/SparkConfigurationListResponsePage.NextWithContext") 11230 defer func() { 11231 sc := -1 11232 if page.Response().Response.Response != nil { 11233 sc = page.Response().Response.Response.StatusCode 11234 } 11235 tracing.EndSpan(ctx, sc, err) 11236 }() 11237 } 11238 for { 11239 next, err := page.fn(ctx, page.sclr) 11240 if err != nil { 11241 return err 11242 } 11243 page.sclr = next 11244 if !next.hasNextLink() || !next.IsEmpty() { 11245 break 11246 } 11247 } 11248 return nil 11249} 11250 11251// Next advances to the next page of values. If there was an error making 11252// the request the page does not advance and the error is returned. 11253// Deprecated: Use NextWithContext() instead. 11254func (page *SparkConfigurationListResponsePage) Next() error { 11255 return page.NextWithContext(context.Background()) 11256} 11257 11258// NotDone returns true if the page enumeration should be started or is not yet complete. 11259func (page SparkConfigurationListResponsePage) NotDone() bool { 11260 return !page.sclr.IsEmpty() 11261} 11262 11263// Response returns the raw server response from the last page request. 11264func (page SparkConfigurationListResponsePage) Response() SparkConfigurationListResponse { 11265 return page.sclr 11266} 11267 11268// Values returns the slice of values for the current page or nil if there are no values. 11269func (page SparkConfigurationListResponsePage) Values() []SparkConfigurationResource { 11270 if page.sclr.IsEmpty() { 11271 return nil 11272 } 11273 return *page.sclr.Value 11274} 11275 11276// Creates a new instance of the SparkConfigurationListResponsePage type. 11277func NewSparkConfigurationListResponsePage(cur SparkConfigurationListResponse, getNextPage func(context.Context, SparkConfigurationListResponse) (SparkConfigurationListResponse, error)) SparkConfigurationListResponsePage { 11278 return SparkConfigurationListResponsePage{ 11279 fn: getNextPage, 11280 sclr: cur, 11281 } 11282} 11283 11284// SparkConfigurationResource sparkConfiguration response details 11285type SparkConfigurationResource struct { 11286 autorest.Response `json:"-"` 11287 // SparkConfigurationInfo - SparkConfiguration properties. 11288 *SparkConfigurationInfo `json:"properties,omitempty"` 11289 // Etag - READ-ONLY; Resource Etag. 11290 Etag *string `json:"etag,omitempty"` 11291 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 11292 ID *string `json:"id,omitempty"` 11293 // Name - READ-ONLY; The name of the resource 11294 Name *string `json:"name,omitempty"` 11295 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 11296 Type *string `json:"type,omitempty"` 11297} 11298 11299// MarshalJSON is the custom marshaler for SparkConfigurationResource. 11300func (scr SparkConfigurationResource) MarshalJSON() ([]byte, error) { 11301 objectMap := make(map[string]interface{}) 11302 if scr.SparkConfigurationInfo != nil { 11303 objectMap["properties"] = scr.SparkConfigurationInfo 11304 } 11305 return json.Marshal(objectMap) 11306} 11307 11308// UnmarshalJSON is the custom unmarshaler for SparkConfigurationResource struct. 11309func (scr *SparkConfigurationResource) UnmarshalJSON(body []byte) error { 11310 var m map[string]*json.RawMessage 11311 err := json.Unmarshal(body, &m) 11312 if err != nil { 11313 return err 11314 } 11315 for k, v := range m { 11316 switch k { 11317 case "properties": 11318 if v != nil { 11319 var sparkConfigurationInfo SparkConfigurationInfo 11320 err = json.Unmarshal(*v, &sparkConfigurationInfo) 11321 if err != nil { 11322 return err 11323 } 11324 scr.SparkConfigurationInfo = &sparkConfigurationInfo 11325 } 11326 case "etag": 11327 if v != nil { 11328 var etag string 11329 err = json.Unmarshal(*v, &etag) 11330 if err != nil { 11331 return err 11332 } 11333 scr.Etag = &etag 11334 } 11335 case "id": 11336 if v != nil { 11337 var ID string 11338 err = json.Unmarshal(*v, &ID) 11339 if err != nil { 11340 return err 11341 } 11342 scr.ID = &ID 11343 } 11344 case "name": 11345 if v != nil { 11346 var name string 11347 err = json.Unmarshal(*v, &name) 11348 if err != nil { 11349 return err 11350 } 11351 scr.Name = &name 11352 } 11353 case "type": 11354 if v != nil { 11355 var typeVar string 11356 err = json.Unmarshal(*v, &typeVar) 11357 if err != nil { 11358 return err 11359 } 11360 scr.Type = &typeVar 11361 } 11362 } 11363 } 11364 11365 return nil 11366} 11367 11368// SQLPool a SQL Analytics pool 11369type SQLPool struct { 11370 autorest.Response `json:"-"` 11371 // Sku - SQL pool SKU 11372 Sku *Sku `json:"sku,omitempty"` 11373 // SQLPoolResourceProperties - SQL pool properties 11374 *SQLPoolResourceProperties `json:"properties,omitempty"` 11375 // Tags - Resource tags. 11376 Tags map[string]*string `json:"tags"` 11377 // Location - The geo-location where the resource lives 11378 Location *string `json:"location,omitempty"` 11379 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 11380 ID *string `json:"id,omitempty"` 11381 // Name - READ-ONLY; The name of the resource 11382 Name *string `json:"name,omitempty"` 11383 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 11384 Type *string `json:"type,omitempty"` 11385} 11386 11387// MarshalJSON is the custom marshaler for SQLPool. 11388func (sp SQLPool) MarshalJSON() ([]byte, error) { 11389 objectMap := make(map[string]interface{}) 11390 if sp.Sku != nil { 11391 objectMap["sku"] = sp.Sku 11392 } 11393 if sp.SQLPoolResourceProperties != nil { 11394 objectMap["properties"] = sp.SQLPoolResourceProperties 11395 } 11396 if sp.Tags != nil { 11397 objectMap["tags"] = sp.Tags 11398 } 11399 if sp.Location != nil { 11400 objectMap["location"] = sp.Location 11401 } 11402 return json.Marshal(objectMap) 11403} 11404 11405// UnmarshalJSON is the custom unmarshaler for SQLPool struct. 11406func (sp *SQLPool) UnmarshalJSON(body []byte) error { 11407 var m map[string]*json.RawMessage 11408 err := json.Unmarshal(body, &m) 11409 if err != nil { 11410 return err 11411 } 11412 for k, v := range m { 11413 switch k { 11414 case "sku": 11415 if v != nil { 11416 var sku Sku 11417 err = json.Unmarshal(*v, &sku) 11418 if err != nil { 11419 return err 11420 } 11421 sp.Sku = &sku 11422 } 11423 case "properties": 11424 if v != nil { 11425 var SQLPoolResourceProperties SQLPoolResourceProperties 11426 err = json.Unmarshal(*v, &SQLPoolResourceProperties) 11427 if err != nil { 11428 return err 11429 } 11430 sp.SQLPoolResourceProperties = &SQLPoolResourceProperties 11431 } 11432 case "tags": 11433 if v != nil { 11434 var tags map[string]*string 11435 err = json.Unmarshal(*v, &tags) 11436 if err != nil { 11437 return err 11438 } 11439 sp.Tags = tags 11440 } 11441 case "location": 11442 if v != nil { 11443 var location string 11444 err = json.Unmarshal(*v, &location) 11445 if err != nil { 11446 return err 11447 } 11448 sp.Location = &location 11449 } 11450 case "id": 11451 if v != nil { 11452 var ID string 11453 err = json.Unmarshal(*v, &ID) 11454 if err != nil { 11455 return err 11456 } 11457 sp.ID = &ID 11458 } 11459 case "name": 11460 if v != nil { 11461 var name string 11462 err = json.Unmarshal(*v, &name) 11463 if err != nil { 11464 return err 11465 } 11466 sp.Name = &name 11467 } 11468 case "type": 11469 if v != nil { 11470 var typeVar string 11471 err = json.Unmarshal(*v, &typeVar) 11472 if err != nil { 11473 return err 11474 } 11475 sp.Type = &typeVar 11476 } 11477 } 11478 } 11479 11480 return nil 11481} 11482 11483// SQLPoolBlobAuditingPolicy a Sql pool blob auditing policy. 11484type SQLPoolBlobAuditingPolicy struct { 11485 autorest.Response `json:"-"` 11486 // Kind - READ-ONLY; Resource kind. 11487 Kind *string `json:"kind,omitempty"` 11488 // SQLPoolBlobAuditingPolicyProperties - Resource properties. 11489 *SQLPoolBlobAuditingPolicyProperties `json:"properties,omitempty"` 11490 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 11491 ID *string `json:"id,omitempty"` 11492 // Name - READ-ONLY; The name of the resource 11493 Name *string `json:"name,omitempty"` 11494 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 11495 Type *string `json:"type,omitempty"` 11496} 11497 11498// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicy. 11499func (spbap SQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { 11500 objectMap := make(map[string]interface{}) 11501 if spbap.SQLPoolBlobAuditingPolicyProperties != nil { 11502 objectMap["properties"] = spbap.SQLPoolBlobAuditingPolicyProperties 11503 } 11504 return json.Marshal(objectMap) 11505} 11506 11507// UnmarshalJSON is the custom unmarshaler for SQLPoolBlobAuditingPolicy struct. 11508func (spbap *SQLPoolBlobAuditingPolicy) UnmarshalJSON(body []byte) error { 11509 var m map[string]*json.RawMessage 11510 err := json.Unmarshal(body, &m) 11511 if err != nil { 11512 return err 11513 } 11514 for k, v := range m { 11515 switch k { 11516 case "kind": 11517 if v != nil { 11518 var kind string 11519 err = json.Unmarshal(*v, &kind) 11520 if err != nil { 11521 return err 11522 } 11523 spbap.Kind = &kind 11524 } 11525 case "properties": 11526 if v != nil { 11527 var SQLPoolBlobAuditingPolicyProperties SQLPoolBlobAuditingPolicyProperties 11528 err = json.Unmarshal(*v, &SQLPoolBlobAuditingPolicyProperties) 11529 if err != nil { 11530 return err 11531 } 11532 spbap.SQLPoolBlobAuditingPolicyProperties = &SQLPoolBlobAuditingPolicyProperties 11533 } 11534 case "id": 11535 if v != nil { 11536 var ID string 11537 err = json.Unmarshal(*v, &ID) 11538 if err != nil { 11539 return err 11540 } 11541 spbap.ID = &ID 11542 } 11543 case "name": 11544 if v != nil { 11545 var name string 11546 err = json.Unmarshal(*v, &name) 11547 if err != nil { 11548 return err 11549 } 11550 spbap.Name = &name 11551 } 11552 case "type": 11553 if v != nil { 11554 var typeVar string 11555 err = json.Unmarshal(*v, &typeVar) 11556 if err != nil { 11557 return err 11558 } 11559 spbap.Type = &typeVar 11560 } 11561 } 11562 } 11563 11564 return nil 11565} 11566 11567// SQLPoolBlobAuditingPolicyListResult a list of Sql pool auditing settings. 11568type SQLPoolBlobAuditingPolicyListResult struct { 11569 autorest.Response `json:"-"` 11570 // Value - READ-ONLY; Array of results. 11571 Value *[]SQLPoolBlobAuditingPolicy `json:"value,omitempty"` 11572 // NextLink - READ-ONLY; Link to retrieve next page of results. 11573 NextLink *string `json:"nextLink,omitempty"` 11574} 11575 11576// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicyListResult. 11577func (spbaplr SQLPoolBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { 11578 objectMap := make(map[string]interface{}) 11579 return json.Marshal(objectMap) 11580} 11581 11582// SQLPoolBlobAuditingPolicyListResultIterator provides access to a complete listing of 11583// SQLPoolBlobAuditingPolicy values. 11584type SQLPoolBlobAuditingPolicyListResultIterator struct { 11585 i int 11586 page SQLPoolBlobAuditingPolicyListResultPage 11587} 11588 11589// NextWithContext advances to the next value. If there was an error making 11590// the request the iterator does not advance and the error is returned. 11591func (iter *SQLPoolBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { 11592 if tracing.IsEnabled() { 11593 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicyListResultIterator.NextWithContext") 11594 defer func() { 11595 sc := -1 11596 if iter.Response().Response.Response != nil { 11597 sc = iter.Response().Response.Response.StatusCode 11598 } 11599 tracing.EndSpan(ctx, sc, err) 11600 }() 11601 } 11602 iter.i++ 11603 if iter.i < len(iter.page.Values()) { 11604 return nil 11605 } 11606 err = iter.page.NextWithContext(ctx) 11607 if err != nil { 11608 iter.i-- 11609 return err 11610 } 11611 iter.i = 0 11612 return nil 11613} 11614 11615// Next advances to the next value. If there was an error making 11616// the request the iterator does not advance and the error is returned. 11617// Deprecated: Use NextWithContext() instead. 11618func (iter *SQLPoolBlobAuditingPolicyListResultIterator) Next() error { 11619 return iter.NextWithContext(context.Background()) 11620} 11621 11622// NotDone returns true if the enumeration should be started or is not yet complete. 11623func (iter SQLPoolBlobAuditingPolicyListResultIterator) NotDone() bool { 11624 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11625} 11626 11627// Response returns the raw server response from the last page request. 11628func (iter SQLPoolBlobAuditingPolicyListResultIterator) Response() SQLPoolBlobAuditingPolicyListResult { 11629 return iter.page.Response() 11630} 11631 11632// Value returns the current value or a zero-initialized value if the 11633// iterator has advanced beyond the end of the collection. 11634func (iter SQLPoolBlobAuditingPolicyListResultIterator) Value() SQLPoolBlobAuditingPolicy { 11635 if !iter.page.NotDone() { 11636 return SQLPoolBlobAuditingPolicy{} 11637 } 11638 return iter.page.Values()[iter.i] 11639} 11640 11641// Creates a new instance of the SQLPoolBlobAuditingPolicyListResultIterator type. 11642func NewSQLPoolBlobAuditingPolicyListResultIterator(page SQLPoolBlobAuditingPolicyListResultPage) SQLPoolBlobAuditingPolicyListResultIterator { 11643 return SQLPoolBlobAuditingPolicyListResultIterator{page: page} 11644} 11645 11646// IsEmpty returns true if the ListResult contains no values. 11647func (spbaplr SQLPoolBlobAuditingPolicyListResult) IsEmpty() bool { 11648 return spbaplr.Value == nil || len(*spbaplr.Value) == 0 11649} 11650 11651// hasNextLink returns true if the NextLink is not empty. 11652func (spbaplr SQLPoolBlobAuditingPolicyListResult) hasNextLink() bool { 11653 return spbaplr.NextLink != nil && len(*spbaplr.NextLink) != 0 11654} 11655 11656// sQLPoolBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results. 11657// It returns nil if no more results exist. 11658func (spbaplr SQLPoolBlobAuditingPolicyListResult) sQLPoolBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { 11659 if !spbaplr.hasNextLink() { 11660 return nil, nil 11661 } 11662 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11663 autorest.AsJSON(), 11664 autorest.AsGet(), 11665 autorest.WithBaseURL(to.String(spbaplr.NextLink))) 11666} 11667 11668// SQLPoolBlobAuditingPolicyListResultPage contains a page of SQLPoolBlobAuditingPolicy values. 11669type SQLPoolBlobAuditingPolicyListResultPage struct { 11670 fn func(context.Context, SQLPoolBlobAuditingPolicyListResult) (SQLPoolBlobAuditingPolicyListResult, error) 11671 spbaplr SQLPoolBlobAuditingPolicyListResult 11672} 11673 11674// NextWithContext advances to the next page of values. If there was an error making 11675// the request the page does not advance and the error is returned. 11676func (page *SQLPoolBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { 11677 if tracing.IsEnabled() { 11678 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicyListResultPage.NextWithContext") 11679 defer func() { 11680 sc := -1 11681 if page.Response().Response.Response != nil { 11682 sc = page.Response().Response.Response.StatusCode 11683 } 11684 tracing.EndSpan(ctx, sc, err) 11685 }() 11686 } 11687 for { 11688 next, err := page.fn(ctx, page.spbaplr) 11689 if err != nil { 11690 return err 11691 } 11692 page.spbaplr = next 11693 if !next.hasNextLink() || !next.IsEmpty() { 11694 break 11695 } 11696 } 11697 return nil 11698} 11699 11700// Next advances to the next page of values. If there was an error making 11701// the request the page does not advance and the error is returned. 11702// Deprecated: Use NextWithContext() instead. 11703func (page *SQLPoolBlobAuditingPolicyListResultPage) Next() error { 11704 return page.NextWithContext(context.Background()) 11705} 11706 11707// NotDone returns true if the page enumeration should be started or is not yet complete. 11708func (page SQLPoolBlobAuditingPolicyListResultPage) NotDone() bool { 11709 return !page.spbaplr.IsEmpty() 11710} 11711 11712// Response returns the raw server response from the last page request. 11713func (page SQLPoolBlobAuditingPolicyListResultPage) Response() SQLPoolBlobAuditingPolicyListResult { 11714 return page.spbaplr 11715} 11716 11717// Values returns the slice of values for the current page or nil if there are no values. 11718func (page SQLPoolBlobAuditingPolicyListResultPage) Values() []SQLPoolBlobAuditingPolicy { 11719 if page.spbaplr.IsEmpty() { 11720 return nil 11721 } 11722 return *page.spbaplr.Value 11723} 11724 11725// Creates a new instance of the SQLPoolBlobAuditingPolicyListResultPage type. 11726func NewSQLPoolBlobAuditingPolicyListResultPage(cur SQLPoolBlobAuditingPolicyListResult, getNextPage func(context.Context, SQLPoolBlobAuditingPolicyListResult) (SQLPoolBlobAuditingPolicyListResult, error)) SQLPoolBlobAuditingPolicyListResultPage { 11727 return SQLPoolBlobAuditingPolicyListResultPage{ 11728 fn: getNextPage, 11729 spbaplr: cur, 11730 } 11731} 11732 11733// SQLPoolBlobAuditingPolicyProperties properties of a Sql pool blob auditing policy. 11734type SQLPoolBlobAuditingPolicyProperties struct { 11735 // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' 11736 State BlobAuditingPolicyState `json:"state,omitempty"` 11737 // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. 11738 StorageEndpoint *string `json:"storageEndpoint,omitempty"` 11739 // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. 11740 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 11741 // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account. 11742 RetentionDays *int32 `json:"retentionDays,omitempty"` 11743 // AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit. 11744 // 11745 // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: 11746 // 11747 // BATCH_COMPLETED_GROUP, 11748 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 11749 // FAILED_DATABASE_AUTHENTICATION_GROUP. 11750 // 11751 // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. 11752 // 11753 // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 11754 // 11755 // APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 11756 // BACKUP_RESTORE_GROUP 11757 // DATABASE_LOGOUT_GROUP 11758 // DATABASE_OBJECT_CHANGE_GROUP 11759 // DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 11760 // DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 11761 // DATABASE_OPERATION_GROUP 11762 // DATABASE_PERMISSION_CHANGE_GROUP 11763 // DATABASE_PRINCIPAL_CHANGE_GROUP 11764 // DATABASE_PRINCIPAL_IMPERSONATION_GROUP 11765 // DATABASE_ROLE_MEMBER_CHANGE_GROUP 11766 // FAILED_DATABASE_AUTHENTICATION_GROUP 11767 // SCHEMA_OBJECT_ACCESS_GROUP 11768 // SCHEMA_OBJECT_CHANGE_GROUP 11769 // SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 11770 // SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 11771 // SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 11772 // USER_CHANGE_PASSWORD_GROUP 11773 // BATCH_STARTED_GROUP 11774 // BATCH_COMPLETED_GROUP 11775 // 11776 // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. 11777 // 11778 // For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). 11779 // 11780 // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: 11781 // SELECT 11782 // UPDATE 11783 // INSERT 11784 // DELETE 11785 // EXECUTE 11786 // RECEIVE 11787 // REFERENCES 11788 // 11789 // The general form for defining an action to be audited is: 11790 // {action} ON {object} BY {principal} 11791 // 11792 // Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 11793 // 11794 // For example: 11795 // SELECT on dbo.myTable by public 11796 // SELECT on DATABASE::myDatabase by public 11797 // SELECT on SCHEMA::mySchema by public 11798 // 11799 // For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) 11800 AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` 11801 // StorageAccountSubscriptionID - Specifies the blob storage subscription Id. 11802 StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` 11803 // IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key. 11804 IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` 11805 // IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor. 11806 // In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. 11807 // 11808 // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. 11809 // Note that for server level audit you should use the 'master' database as {databaseName}. 11810 // 11811 // Diagnostic Settings URI format: 11812 // PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 11813 // 11814 // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) 11815 // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) 11816 IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` 11817} 11818 11819// SQLPoolBlobAuditingPolicySQLPoolOperationListResult the response to a list Sql pool operations request 11820type SQLPoolBlobAuditingPolicySQLPoolOperationListResult struct { 11821 autorest.Response `json:"-"` 11822 // Value - READ-ONLY; Array of results. 11823 Value *[]SQLPoolOperation `json:"value,omitempty"` 11824 // NextLink - READ-ONLY; Link to retrieve next page of results. 11825 NextLink *string `json:"nextLink,omitempty"` 11826} 11827 11828// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicySQLPoolOperationListResult. 11829func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) MarshalJSON() ([]byte, error) { 11830 objectMap := make(map[string]interface{}) 11831 return json.Marshal(objectMap) 11832} 11833 11834// SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator provides access to a complete listing of 11835// SQLPoolOperation values. 11836type SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator struct { 11837 i int 11838 page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage 11839} 11840 11841// NextWithContext advances to the next value. If there was an error making 11842// the request the iterator does not advance and the error is returned. 11843func (iter *SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { 11844 if tracing.IsEnabled() { 11845 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator.NextWithContext") 11846 defer func() { 11847 sc := -1 11848 if iter.Response().Response.Response != nil { 11849 sc = iter.Response().Response.Response.StatusCode 11850 } 11851 tracing.EndSpan(ctx, sc, err) 11852 }() 11853 } 11854 iter.i++ 11855 if iter.i < len(iter.page.Values()) { 11856 return nil 11857 } 11858 err = iter.page.NextWithContext(ctx) 11859 if err != nil { 11860 iter.i-- 11861 return err 11862 } 11863 iter.i = 0 11864 return nil 11865} 11866 11867// Next advances to the next value. If there was an error making 11868// the request the iterator does not advance and the error is returned. 11869// Deprecated: Use NextWithContext() instead. 11870func (iter *SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Next() error { 11871 return iter.NextWithContext(context.Background()) 11872} 11873 11874// NotDone returns true if the enumeration should be started or is not yet complete. 11875func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) NotDone() bool { 11876 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11877} 11878 11879// Response returns the raw server response from the last page request. 11880func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Response() SQLPoolBlobAuditingPolicySQLPoolOperationListResult { 11881 return iter.page.Response() 11882} 11883 11884// Value returns the current value or a zero-initialized value if the 11885// iterator has advanced beyond the end of the collection. 11886func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Value() SQLPoolOperation { 11887 if !iter.page.NotDone() { 11888 return SQLPoolOperation{} 11889 } 11890 return iter.page.Values()[iter.i] 11891} 11892 11893// Creates a new instance of the SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator type. 11894func NewSQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator(page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator { 11895 return SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator{page: page} 11896} 11897 11898// IsEmpty returns true if the ListResult contains no values. 11899func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) IsEmpty() bool { 11900 return spbapspolr.Value == nil || len(*spbapspolr.Value) == 0 11901} 11902 11903// hasNextLink returns true if the NextLink is not empty. 11904func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) hasNextLink() bool { 11905 return spbapspolr.NextLink != nil && len(*spbapspolr.NextLink) != 0 11906} 11907 11908// sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer prepares a request to retrieve the next set of results. 11909// It returns nil if no more results exist. 11910func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer(ctx context.Context) (*http.Request, error) { 11911 if !spbapspolr.hasNextLink() { 11912 return nil, nil 11913 } 11914 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11915 autorest.AsJSON(), 11916 autorest.AsGet(), 11917 autorest.WithBaseURL(to.String(spbapspolr.NextLink))) 11918} 11919 11920// SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage contains a page of SQLPoolOperation values. 11921type SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage struct { 11922 fn func(context.Context, SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (SQLPoolBlobAuditingPolicySQLPoolOperationListResult, error) 11923 spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult 11924} 11925 11926// NextWithContext advances to the next page of values. If there was an error making 11927// the request the page does not advance and the error is returned. 11928func (page *SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) NextWithContext(ctx context.Context) (err error) { 11929 if tracing.IsEnabled() { 11930 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage.NextWithContext") 11931 defer func() { 11932 sc := -1 11933 if page.Response().Response.Response != nil { 11934 sc = page.Response().Response.Response.StatusCode 11935 } 11936 tracing.EndSpan(ctx, sc, err) 11937 }() 11938 } 11939 for { 11940 next, err := page.fn(ctx, page.spbapspolr) 11941 if err != nil { 11942 return err 11943 } 11944 page.spbapspolr = next 11945 if !next.hasNextLink() || !next.IsEmpty() { 11946 break 11947 } 11948 } 11949 return nil 11950} 11951 11952// Next advances to the next page of values. If there was an error making 11953// the request the page does not advance and the error is returned. 11954// Deprecated: Use NextWithContext() instead. 11955func (page *SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Next() error { 11956 return page.NextWithContext(context.Background()) 11957} 11958 11959// NotDone returns true if the page enumeration should be started or is not yet complete. 11960func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) NotDone() bool { 11961 return !page.spbapspolr.IsEmpty() 11962} 11963 11964// Response returns the raw server response from the last page request. 11965func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Response() SQLPoolBlobAuditingPolicySQLPoolOperationListResult { 11966 return page.spbapspolr 11967} 11968 11969// Values returns the slice of values for the current page or nil if there are no values. 11970func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Values() []SQLPoolOperation { 11971 if page.spbapspolr.IsEmpty() { 11972 return nil 11973 } 11974 return *page.spbapspolr.Value 11975} 11976 11977// Creates a new instance of the SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage type. 11978func NewSQLPoolBlobAuditingPolicySQLPoolOperationListResultPage(cur SQLPoolBlobAuditingPolicySQLPoolOperationListResult, getNextPage func(context.Context, SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (SQLPoolBlobAuditingPolicySQLPoolOperationListResult, error)) SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage { 11979 return SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage{ 11980 fn: getNextPage, 11981 spbapspolr: cur, 11982 } 11983} 11984 11985// SQLPoolColumn a Sql pool column resource. 11986type SQLPoolColumn struct { 11987 autorest.Response `json:"-"` 11988 // SQLPoolColumnProperties - Resource properties. 11989 *SQLPoolColumnProperties `json:"properties,omitempty"` 11990 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 11991 ID *string `json:"id,omitempty"` 11992 // Name - READ-ONLY; The name of the resource 11993 Name *string `json:"name,omitempty"` 11994 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 11995 Type *string `json:"type,omitempty"` 11996} 11997 11998// MarshalJSON is the custom marshaler for SQLPoolColumn. 11999func (spc SQLPoolColumn) MarshalJSON() ([]byte, error) { 12000 objectMap := make(map[string]interface{}) 12001 if spc.SQLPoolColumnProperties != nil { 12002 objectMap["properties"] = spc.SQLPoolColumnProperties 12003 } 12004 return json.Marshal(objectMap) 12005} 12006 12007// UnmarshalJSON is the custom unmarshaler for SQLPoolColumn struct. 12008func (spc *SQLPoolColumn) UnmarshalJSON(body []byte) error { 12009 var m map[string]*json.RawMessage 12010 err := json.Unmarshal(body, &m) 12011 if err != nil { 12012 return err 12013 } 12014 for k, v := range m { 12015 switch k { 12016 case "properties": 12017 if v != nil { 12018 var SQLPoolColumnProperties SQLPoolColumnProperties 12019 err = json.Unmarshal(*v, &SQLPoolColumnProperties) 12020 if err != nil { 12021 return err 12022 } 12023 spc.SQLPoolColumnProperties = &SQLPoolColumnProperties 12024 } 12025 case "id": 12026 if v != nil { 12027 var ID string 12028 err = json.Unmarshal(*v, &ID) 12029 if err != nil { 12030 return err 12031 } 12032 spc.ID = &ID 12033 } 12034 case "name": 12035 if v != nil { 12036 var name string 12037 err = json.Unmarshal(*v, &name) 12038 if err != nil { 12039 return err 12040 } 12041 spc.Name = &name 12042 } 12043 case "type": 12044 if v != nil { 12045 var typeVar string 12046 err = json.Unmarshal(*v, &typeVar) 12047 if err != nil { 12048 return err 12049 } 12050 spc.Type = &typeVar 12051 } 12052 } 12053 } 12054 12055 return nil 12056} 12057 12058// SQLPoolColumnListResult a list of Sql pool columns. 12059type SQLPoolColumnListResult struct { 12060 autorest.Response `json:"-"` 12061 // Value - READ-ONLY; Array of results. 12062 Value *[]SQLPoolColumn `json:"value,omitempty"` 12063 // NextLink - READ-ONLY; Link to retrieve next page of results. 12064 NextLink *string `json:"nextLink,omitempty"` 12065} 12066 12067// MarshalJSON is the custom marshaler for SQLPoolColumnListResult. 12068func (spclr SQLPoolColumnListResult) MarshalJSON() ([]byte, error) { 12069 objectMap := make(map[string]interface{}) 12070 return json.Marshal(objectMap) 12071} 12072 12073// SQLPoolColumnListResultIterator provides access to a complete listing of SQLPoolColumn values. 12074type SQLPoolColumnListResultIterator struct { 12075 i int 12076 page SQLPoolColumnListResultPage 12077} 12078 12079// NextWithContext advances to the next value. If there was an error making 12080// the request the iterator does not advance and the error is returned. 12081func (iter *SQLPoolColumnListResultIterator) NextWithContext(ctx context.Context) (err error) { 12082 if tracing.IsEnabled() { 12083 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnListResultIterator.NextWithContext") 12084 defer func() { 12085 sc := -1 12086 if iter.Response().Response.Response != nil { 12087 sc = iter.Response().Response.Response.StatusCode 12088 } 12089 tracing.EndSpan(ctx, sc, err) 12090 }() 12091 } 12092 iter.i++ 12093 if iter.i < len(iter.page.Values()) { 12094 return nil 12095 } 12096 err = iter.page.NextWithContext(ctx) 12097 if err != nil { 12098 iter.i-- 12099 return err 12100 } 12101 iter.i = 0 12102 return nil 12103} 12104 12105// Next advances to the next value. If there was an error making 12106// the request the iterator does not advance and the error is returned. 12107// Deprecated: Use NextWithContext() instead. 12108func (iter *SQLPoolColumnListResultIterator) Next() error { 12109 return iter.NextWithContext(context.Background()) 12110} 12111 12112// NotDone returns true if the enumeration should be started or is not yet complete. 12113func (iter SQLPoolColumnListResultIterator) NotDone() bool { 12114 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12115} 12116 12117// Response returns the raw server response from the last page request. 12118func (iter SQLPoolColumnListResultIterator) Response() SQLPoolColumnListResult { 12119 return iter.page.Response() 12120} 12121 12122// Value returns the current value or a zero-initialized value if the 12123// iterator has advanced beyond the end of the collection. 12124func (iter SQLPoolColumnListResultIterator) Value() SQLPoolColumn { 12125 if !iter.page.NotDone() { 12126 return SQLPoolColumn{} 12127 } 12128 return iter.page.Values()[iter.i] 12129} 12130 12131// Creates a new instance of the SQLPoolColumnListResultIterator type. 12132func NewSQLPoolColumnListResultIterator(page SQLPoolColumnListResultPage) SQLPoolColumnListResultIterator { 12133 return SQLPoolColumnListResultIterator{page: page} 12134} 12135 12136// IsEmpty returns true if the ListResult contains no values. 12137func (spclr SQLPoolColumnListResult) IsEmpty() bool { 12138 return spclr.Value == nil || len(*spclr.Value) == 0 12139} 12140 12141// hasNextLink returns true if the NextLink is not empty. 12142func (spclr SQLPoolColumnListResult) hasNextLink() bool { 12143 return spclr.NextLink != nil && len(*spclr.NextLink) != 0 12144} 12145 12146// sQLPoolColumnListResultPreparer prepares a request to retrieve the next set of results. 12147// It returns nil if no more results exist. 12148func (spclr SQLPoolColumnListResult) sQLPoolColumnListResultPreparer(ctx context.Context) (*http.Request, error) { 12149 if !spclr.hasNextLink() { 12150 return nil, nil 12151 } 12152 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12153 autorest.AsJSON(), 12154 autorest.AsGet(), 12155 autorest.WithBaseURL(to.String(spclr.NextLink))) 12156} 12157 12158// SQLPoolColumnListResultPage contains a page of SQLPoolColumn values. 12159type SQLPoolColumnListResultPage struct { 12160 fn func(context.Context, SQLPoolColumnListResult) (SQLPoolColumnListResult, error) 12161 spclr SQLPoolColumnListResult 12162} 12163 12164// NextWithContext advances to the next page of values. If there was an error making 12165// the request the page does not advance and the error is returned. 12166func (page *SQLPoolColumnListResultPage) NextWithContext(ctx context.Context) (err error) { 12167 if tracing.IsEnabled() { 12168 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnListResultPage.NextWithContext") 12169 defer func() { 12170 sc := -1 12171 if page.Response().Response.Response != nil { 12172 sc = page.Response().Response.Response.StatusCode 12173 } 12174 tracing.EndSpan(ctx, sc, err) 12175 }() 12176 } 12177 for { 12178 next, err := page.fn(ctx, page.spclr) 12179 if err != nil { 12180 return err 12181 } 12182 page.spclr = next 12183 if !next.hasNextLink() || !next.IsEmpty() { 12184 break 12185 } 12186 } 12187 return nil 12188} 12189 12190// Next advances to the next page of values. If there was an error making 12191// the request the page does not advance and the error is returned. 12192// Deprecated: Use NextWithContext() instead. 12193func (page *SQLPoolColumnListResultPage) Next() error { 12194 return page.NextWithContext(context.Background()) 12195} 12196 12197// NotDone returns true if the page enumeration should be started or is not yet complete. 12198func (page SQLPoolColumnListResultPage) NotDone() bool { 12199 return !page.spclr.IsEmpty() 12200} 12201 12202// Response returns the raw server response from the last page request. 12203func (page SQLPoolColumnListResultPage) Response() SQLPoolColumnListResult { 12204 return page.spclr 12205} 12206 12207// Values returns the slice of values for the current page or nil if there are no values. 12208func (page SQLPoolColumnListResultPage) Values() []SQLPoolColumn { 12209 if page.spclr.IsEmpty() { 12210 return nil 12211 } 12212 return *page.spclr.Value 12213} 12214 12215// Creates a new instance of the SQLPoolColumnListResultPage type. 12216func NewSQLPoolColumnListResultPage(cur SQLPoolColumnListResult, getNextPage func(context.Context, SQLPoolColumnListResult) (SQLPoolColumnListResult, error)) SQLPoolColumnListResultPage { 12217 return SQLPoolColumnListResultPage{ 12218 fn: getNextPage, 12219 spclr: cur, 12220 } 12221} 12222 12223// SQLPoolColumnProperties sql pool column properties. 12224type SQLPoolColumnProperties struct { 12225 // ColumnType - The column data type. Possible values include: 'ColumnDataTypeImage', 'ColumnDataTypeText', 'ColumnDataTypeUniqueidentifier', 'ColumnDataTypeDate', 'ColumnDataTypeTime', 'ColumnDataTypeDatetime2', 'ColumnDataTypeDatetimeoffset', 'ColumnDataTypeTinyint', 'ColumnDataTypeSmallint', 'ColumnDataTypeInt', 'ColumnDataTypeSmalldatetime', 'ColumnDataTypeReal', 'ColumnDataTypeMoney', 'ColumnDataTypeDatetime', 'ColumnDataTypeFloat', 'ColumnDataTypeSQLVariant', 'ColumnDataTypeNtext', 'ColumnDataTypeBit', 'ColumnDataTypeDecimal', 'ColumnDataTypeNumeric', 'ColumnDataTypeSmallmoney', 'ColumnDataTypeBigint', 'ColumnDataTypeHierarchyid', 'ColumnDataTypeGeometry', 'ColumnDataTypeGeography', 'ColumnDataTypeVarbinary', 'ColumnDataTypeVarchar', 'ColumnDataTypeBinary', 'ColumnDataTypeChar', 'ColumnDataTypeTimestamp', 'ColumnDataTypeNvarchar', 'ColumnDataTypeNchar', 'ColumnDataTypeXML', 'ColumnDataTypeSysname' 12226 ColumnType ColumnDataType `json:"columnType,omitempty"` 12227 // IsComputed - READ-ONLY; Indicates whether column value is computed or not 12228 IsComputed *bool `json:"isComputed,omitempty"` 12229} 12230 12231// MarshalJSON is the custom marshaler for SQLPoolColumnProperties. 12232func (spcp SQLPoolColumnProperties) MarshalJSON() ([]byte, error) { 12233 objectMap := make(map[string]interface{}) 12234 if spcp.ColumnType != "" { 12235 objectMap["columnType"] = spcp.ColumnType 12236 } 12237 return json.Marshal(objectMap) 12238} 12239 12240// SQLPoolConnectionPolicy a Sql pool connection policy. 12241type SQLPoolConnectionPolicy struct { 12242 autorest.Response `json:"-"` 12243 // Kind - READ-ONLY; Resource kind. 12244 Kind *string `json:"kind,omitempty"` 12245 // Location - READ-ONLY; Resource location. 12246 Location *string `json:"location,omitempty"` 12247 // SQLPoolConnectionPolicyProperties - Resource properties. 12248 *SQLPoolConnectionPolicyProperties `json:"properties,omitempty"` 12249 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 12250 ID *string `json:"id,omitempty"` 12251 // Name - READ-ONLY; The name of the resource 12252 Name *string `json:"name,omitempty"` 12253 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 12254 Type *string `json:"type,omitempty"` 12255} 12256 12257// MarshalJSON is the custom marshaler for SQLPoolConnectionPolicy. 12258func (spcp SQLPoolConnectionPolicy) MarshalJSON() ([]byte, error) { 12259 objectMap := make(map[string]interface{}) 12260 if spcp.SQLPoolConnectionPolicyProperties != nil { 12261 objectMap["properties"] = spcp.SQLPoolConnectionPolicyProperties 12262 } 12263 return json.Marshal(objectMap) 12264} 12265 12266// UnmarshalJSON is the custom unmarshaler for SQLPoolConnectionPolicy struct. 12267func (spcp *SQLPoolConnectionPolicy) UnmarshalJSON(body []byte) error { 12268 var m map[string]*json.RawMessage 12269 err := json.Unmarshal(body, &m) 12270 if err != nil { 12271 return err 12272 } 12273 for k, v := range m { 12274 switch k { 12275 case "kind": 12276 if v != nil { 12277 var kind string 12278 err = json.Unmarshal(*v, &kind) 12279 if err != nil { 12280 return err 12281 } 12282 spcp.Kind = &kind 12283 } 12284 case "location": 12285 if v != nil { 12286 var location string 12287 err = json.Unmarshal(*v, &location) 12288 if err != nil { 12289 return err 12290 } 12291 spcp.Location = &location 12292 } 12293 case "properties": 12294 if v != nil { 12295 var SQLPoolConnectionPolicyProperties SQLPoolConnectionPolicyProperties 12296 err = json.Unmarshal(*v, &SQLPoolConnectionPolicyProperties) 12297 if err != nil { 12298 return err 12299 } 12300 spcp.SQLPoolConnectionPolicyProperties = &SQLPoolConnectionPolicyProperties 12301 } 12302 case "id": 12303 if v != nil { 12304 var ID string 12305 err = json.Unmarshal(*v, &ID) 12306 if err != nil { 12307 return err 12308 } 12309 spcp.ID = &ID 12310 } 12311 case "name": 12312 if v != nil { 12313 var name string 12314 err = json.Unmarshal(*v, &name) 12315 if err != nil { 12316 return err 12317 } 12318 spcp.Name = &name 12319 } 12320 case "type": 12321 if v != nil { 12322 var typeVar string 12323 err = json.Unmarshal(*v, &typeVar) 12324 if err != nil { 12325 return err 12326 } 12327 spcp.Type = &typeVar 12328 } 12329 } 12330 } 12331 12332 return nil 12333} 12334 12335// SQLPoolConnectionPolicyProperties properties of a Sql pool connection policy. 12336type SQLPoolConnectionPolicyProperties struct { 12337 // SecurityEnabledAccess - The state of security access. 12338 SecurityEnabledAccess *string `json:"securityEnabledAccess,omitempty"` 12339 // ProxyDNSName - The fully qualified host name of the auditing proxy. 12340 ProxyDNSName *string `json:"proxyDnsName,omitempty"` 12341 // ProxyPort - The port number of the auditing proxy. 12342 ProxyPort *string `json:"proxyPort,omitempty"` 12343 // Visibility - The visibility of the auditing proxy. 12344 Visibility *string `json:"visibility,omitempty"` 12345 // UseServerDefault - Whether server default is enabled or disabled. 12346 UseServerDefault *string `json:"useServerDefault,omitempty"` 12347 // RedirectionState - The state of proxy redirection. 12348 RedirectionState *string `json:"redirectionState,omitempty"` 12349 // State - The connection policy state. 12350 State *string `json:"state,omitempty"` 12351} 12352 12353// SQLPoolInfoListResult list of SQL pools 12354type SQLPoolInfoListResult struct { 12355 autorest.Response `json:"-"` 12356 // NextLink - Link to the next page of results 12357 NextLink *string `json:"nextLink,omitempty"` 12358 // Value - List of SQL pools 12359 Value *[]SQLPool `json:"value,omitempty"` 12360} 12361 12362// SQLPoolInfoListResultIterator provides access to a complete listing of SQLPool values. 12363type SQLPoolInfoListResultIterator struct { 12364 i int 12365 page SQLPoolInfoListResultPage 12366} 12367 12368// NextWithContext advances to the next value. If there was an error making 12369// the request the iterator does not advance and the error is returned. 12370func (iter *SQLPoolInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { 12371 if tracing.IsEnabled() { 12372 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolInfoListResultIterator.NextWithContext") 12373 defer func() { 12374 sc := -1 12375 if iter.Response().Response.Response != nil { 12376 sc = iter.Response().Response.Response.StatusCode 12377 } 12378 tracing.EndSpan(ctx, sc, err) 12379 }() 12380 } 12381 iter.i++ 12382 if iter.i < len(iter.page.Values()) { 12383 return nil 12384 } 12385 err = iter.page.NextWithContext(ctx) 12386 if err != nil { 12387 iter.i-- 12388 return err 12389 } 12390 iter.i = 0 12391 return nil 12392} 12393 12394// Next advances to the next value. If there was an error making 12395// the request the iterator does not advance and the error is returned. 12396// Deprecated: Use NextWithContext() instead. 12397func (iter *SQLPoolInfoListResultIterator) Next() error { 12398 return iter.NextWithContext(context.Background()) 12399} 12400 12401// NotDone returns true if the enumeration should be started or is not yet complete. 12402func (iter SQLPoolInfoListResultIterator) NotDone() bool { 12403 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12404} 12405 12406// Response returns the raw server response from the last page request. 12407func (iter SQLPoolInfoListResultIterator) Response() SQLPoolInfoListResult { 12408 return iter.page.Response() 12409} 12410 12411// Value returns the current value or a zero-initialized value if the 12412// iterator has advanced beyond the end of the collection. 12413func (iter SQLPoolInfoListResultIterator) Value() SQLPool { 12414 if !iter.page.NotDone() { 12415 return SQLPool{} 12416 } 12417 return iter.page.Values()[iter.i] 12418} 12419 12420// Creates a new instance of the SQLPoolInfoListResultIterator type. 12421func NewSQLPoolInfoListResultIterator(page SQLPoolInfoListResultPage) SQLPoolInfoListResultIterator { 12422 return SQLPoolInfoListResultIterator{page: page} 12423} 12424 12425// IsEmpty returns true if the ListResult contains no values. 12426func (spilr SQLPoolInfoListResult) IsEmpty() bool { 12427 return spilr.Value == nil || len(*spilr.Value) == 0 12428} 12429 12430// hasNextLink returns true if the NextLink is not empty. 12431func (spilr SQLPoolInfoListResult) hasNextLink() bool { 12432 return spilr.NextLink != nil && len(*spilr.NextLink) != 0 12433} 12434 12435// sQLPoolInfoListResultPreparer prepares a request to retrieve the next set of results. 12436// It returns nil if no more results exist. 12437func (spilr SQLPoolInfoListResult) sQLPoolInfoListResultPreparer(ctx context.Context) (*http.Request, error) { 12438 if !spilr.hasNextLink() { 12439 return nil, nil 12440 } 12441 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12442 autorest.AsJSON(), 12443 autorest.AsGet(), 12444 autorest.WithBaseURL(to.String(spilr.NextLink))) 12445} 12446 12447// SQLPoolInfoListResultPage contains a page of SQLPool values. 12448type SQLPoolInfoListResultPage struct { 12449 fn func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error) 12450 spilr SQLPoolInfoListResult 12451} 12452 12453// NextWithContext advances to the next page of values. If there was an error making 12454// the request the page does not advance and the error is returned. 12455func (page *SQLPoolInfoListResultPage) NextWithContext(ctx context.Context) (err error) { 12456 if tracing.IsEnabled() { 12457 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolInfoListResultPage.NextWithContext") 12458 defer func() { 12459 sc := -1 12460 if page.Response().Response.Response != nil { 12461 sc = page.Response().Response.Response.StatusCode 12462 } 12463 tracing.EndSpan(ctx, sc, err) 12464 }() 12465 } 12466 for { 12467 next, err := page.fn(ctx, page.spilr) 12468 if err != nil { 12469 return err 12470 } 12471 page.spilr = next 12472 if !next.hasNextLink() || !next.IsEmpty() { 12473 break 12474 } 12475 } 12476 return nil 12477} 12478 12479// Next advances to the next page of values. If there was an error making 12480// the request the page does not advance and the error is returned. 12481// Deprecated: Use NextWithContext() instead. 12482func (page *SQLPoolInfoListResultPage) Next() error { 12483 return page.NextWithContext(context.Background()) 12484} 12485 12486// NotDone returns true if the page enumeration should be started or is not yet complete. 12487func (page SQLPoolInfoListResultPage) NotDone() bool { 12488 return !page.spilr.IsEmpty() 12489} 12490 12491// Response returns the raw server response from the last page request. 12492func (page SQLPoolInfoListResultPage) Response() SQLPoolInfoListResult { 12493 return page.spilr 12494} 12495 12496// Values returns the slice of values for the current page or nil if there are no values. 12497func (page SQLPoolInfoListResultPage) Values() []SQLPool { 12498 if page.spilr.IsEmpty() { 12499 return nil 12500 } 12501 return *page.spilr.Value 12502} 12503 12504// Creates a new instance of the SQLPoolInfoListResultPage type. 12505func NewSQLPoolInfoListResultPage(cur SQLPoolInfoListResult, getNextPage func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error)) SQLPoolInfoListResultPage { 12506 return SQLPoolInfoListResultPage{ 12507 fn: getNextPage, 12508 spilr: cur, 12509 } 12510} 12511 12512// SQLPoolOperation a Sql pool operation. 12513type SQLPoolOperation struct { 12514 // SQLPoolOperationProperties - Resource properties. 12515 *SQLPoolOperationProperties `json:"properties,omitempty"` 12516 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 12517 ID *string `json:"id,omitempty"` 12518 // Name - READ-ONLY; The name of the resource 12519 Name *string `json:"name,omitempty"` 12520 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 12521 Type *string `json:"type,omitempty"` 12522} 12523 12524// MarshalJSON is the custom marshaler for SQLPoolOperation. 12525func (spo SQLPoolOperation) MarshalJSON() ([]byte, error) { 12526 objectMap := make(map[string]interface{}) 12527 if spo.SQLPoolOperationProperties != nil { 12528 objectMap["properties"] = spo.SQLPoolOperationProperties 12529 } 12530 return json.Marshal(objectMap) 12531} 12532 12533// UnmarshalJSON is the custom unmarshaler for SQLPoolOperation struct. 12534func (spo *SQLPoolOperation) UnmarshalJSON(body []byte) error { 12535 var m map[string]*json.RawMessage 12536 err := json.Unmarshal(body, &m) 12537 if err != nil { 12538 return err 12539 } 12540 for k, v := range m { 12541 switch k { 12542 case "properties": 12543 if v != nil { 12544 var SQLPoolOperationProperties SQLPoolOperationProperties 12545 err = json.Unmarshal(*v, &SQLPoolOperationProperties) 12546 if err != nil { 12547 return err 12548 } 12549 spo.SQLPoolOperationProperties = &SQLPoolOperationProperties 12550 } 12551 case "id": 12552 if v != nil { 12553 var ID string 12554 err = json.Unmarshal(*v, &ID) 12555 if err != nil { 12556 return err 12557 } 12558 spo.ID = &ID 12559 } 12560 case "name": 12561 if v != nil { 12562 var name string 12563 err = json.Unmarshal(*v, &name) 12564 if err != nil { 12565 return err 12566 } 12567 spo.Name = &name 12568 } 12569 case "type": 12570 if v != nil { 12571 var typeVar string 12572 err = json.Unmarshal(*v, &typeVar) 12573 if err != nil { 12574 return err 12575 } 12576 spo.Type = &typeVar 12577 } 12578 } 12579 } 12580 12581 return nil 12582} 12583 12584// SQLPoolOperationProperties the properties of a Sql pool operation. 12585type SQLPoolOperationProperties struct { 12586 // DatabaseName - READ-ONLY; The name of the Sql pool the operation is being performed on. 12587 DatabaseName *string `json:"databaseName,omitempty"` 12588 // Operation - READ-ONLY; The name of operation. 12589 Operation *string `json:"operation,omitempty"` 12590 // OperationFriendlyName - READ-ONLY; The friendly name of operation. 12591 OperationFriendlyName *string `json:"operationFriendlyName,omitempty"` 12592 // PercentComplete - READ-ONLY; The percentage of the operation completed. 12593 PercentComplete *int32 `json:"percentComplete,omitempty"` 12594 // ServerName - READ-ONLY; The name of the server. 12595 ServerName *string `json:"serverName,omitempty"` 12596 // StartTime - READ-ONLY; The operation start time. 12597 StartTime *date.Time `json:"startTime,omitempty"` 12598 // State - READ-ONLY; The operation state. Possible values include: 'ManagementOperationStatePending', 'ManagementOperationStateInProgress', 'ManagementOperationStateSucceeded', 'ManagementOperationStateFailed', 'ManagementOperationStateCancelInProgress', 'ManagementOperationStateCancelled' 12599 State ManagementOperationState `json:"state,omitempty"` 12600 // ErrorCode - READ-ONLY; The operation error code. 12601 ErrorCode *int32 `json:"errorCode,omitempty"` 12602 // ErrorDescription - READ-ONLY; The operation error description. 12603 ErrorDescription *string `json:"errorDescription,omitempty"` 12604 // ErrorSeverity - READ-ONLY; The operation error severity. 12605 ErrorSeverity *int32 `json:"errorSeverity,omitempty"` 12606 // IsUserError - READ-ONLY; Whether or not the error is a user error. 12607 IsUserError *bool `json:"isUserError,omitempty"` 12608 // EstimatedCompletionTime - READ-ONLY; The estimated completion time of the operation. 12609 EstimatedCompletionTime *date.Time `json:"estimatedCompletionTime,omitempty"` 12610 // Description - READ-ONLY; The operation description. 12611 Description *string `json:"description,omitempty"` 12612 // IsCancellable - READ-ONLY; Whether the operation can be cancelled. 12613 IsCancellable *bool `json:"isCancellable,omitempty"` 12614} 12615 12616// MarshalJSON is the custom marshaler for SQLPoolOperationProperties. 12617func (spop SQLPoolOperationProperties) MarshalJSON() ([]byte, error) { 12618 objectMap := make(map[string]interface{}) 12619 return json.Marshal(objectMap) 12620} 12621 12622// SQLPoolPatchInfo a SQL Analytics pool patch info 12623type SQLPoolPatchInfo struct { 12624 // Tags - Resource tags. 12625 Tags map[string]*string `json:"tags"` 12626 // Location - The geo-location where the resource lives 12627 Location *string `json:"location,omitempty"` 12628 // Sku - SQL pool SKU 12629 Sku *Sku `json:"sku,omitempty"` 12630 // SQLPoolResourceProperties - SQL pool properties 12631 *SQLPoolResourceProperties `json:"properties,omitempty"` 12632} 12633 12634// MarshalJSON is the custom marshaler for SQLPoolPatchInfo. 12635func (sppi SQLPoolPatchInfo) MarshalJSON() ([]byte, error) { 12636 objectMap := make(map[string]interface{}) 12637 if sppi.Tags != nil { 12638 objectMap["tags"] = sppi.Tags 12639 } 12640 if sppi.Location != nil { 12641 objectMap["location"] = sppi.Location 12642 } 12643 if sppi.Sku != nil { 12644 objectMap["sku"] = sppi.Sku 12645 } 12646 if sppi.SQLPoolResourceProperties != nil { 12647 objectMap["properties"] = sppi.SQLPoolResourceProperties 12648 } 12649 return json.Marshal(objectMap) 12650} 12651 12652// UnmarshalJSON is the custom unmarshaler for SQLPoolPatchInfo struct. 12653func (sppi *SQLPoolPatchInfo) UnmarshalJSON(body []byte) error { 12654 var m map[string]*json.RawMessage 12655 err := json.Unmarshal(body, &m) 12656 if err != nil { 12657 return err 12658 } 12659 for k, v := range m { 12660 switch k { 12661 case "tags": 12662 if v != nil { 12663 var tags map[string]*string 12664 err = json.Unmarshal(*v, &tags) 12665 if err != nil { 12666 return err 12667 } 12668 sppi.Tags = tags 12669 } 12670 case "location": 12671 if v != nil { 12672 var location string 12673 err = json.Unmarshal(*v, &location) 12674 if err != nil { 12675 return err 12676 } 12677 sppi.Location = &location 12678 } 12679 case "sku": 12680 if v != nil { 12681 var sku Sku 12682 err = json.Unmarshal(*v, &sku) 12683 if err != nil { 12684 return err 12685 } 12686 sppi.Sku = &sku 12687 } 12688 case "properties": 12689 if v != nil { 12690 var SQLPoolResourceProperties SQLPoolResourceProperties 12691 err = json.Unmarshal(*v, &SQLPoolResourceProperties) 12692 if err != nil { 12693 return err 12694 } 12695 sppi.SQLPoolResourceProperties = &SQLPoolResourceProperties 12696 } 12697 } 12698 } 12699 12700 return nil 12701} 12702 12703// SQLPoolResourceProperties properties of a SQL Analytics pool 12704type SQLPoolResourceProperties struct { 12705 // MaxSizeBytes - Maximum size in bytes 12706 MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` 12707 // Collation - Collation mode 12708 Collation *string `json:"collation,omitempty"` 12709 // SourceDatabaseID - Source database to create from 12710 SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` 12711 // RecoverableDatabaseID - Backup database to restore from 12712 RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` 12713 // ProvisioningState - Resource state 12714 ProvisioningState *string `json:"provisioningState,omitempty"` 12715 // Status - Resource status 12716 Status *string `json:"status,omitempty"` 12717 // RestorePointInTime - Snapshot time to restore 12718 RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` 12719 // CreateMode - What is this? 12720 CreateMode *string `json:"createMode,omitempty"` 12721 // CreationDate - Date the SQL pool was created 12722 CreationDate *date.Time `json:"creationDate,omitempty"` 12723 // StorageAccountType - The storage account type used to store backups for this sql pool. Possible values include: 'StorageAccountTypeGRS', 'StorageAccountTypeLRS', 'StorageAccountTypeZRS' 12724 StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` 12725 // SourceDatabaseDeletionDate - Specifies the time that the sql pool was deleted 12726 SourceDatabaseDeletionDate *date.Time `json:"sourceDatabaseDeletionDate,omitempty"` 12727} 12728 12729// SQLPoolRestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a 12730// long-running operation. 12731type SQLPoolRestorePointsCreateFuture struct { 12732 azure.FutureAPI 12733 // Result returns the result of the asynchronous operation. 12734 // If the operation has not completed it will return an error. 12735 Result func(SQLPoolRestorePointsClient) (RestorePoint, error) 12736} 12737 12738// UnmarshalJSON is the custom unmarshaller for CreateFuture. 12739func (future *SQLPoolRestorePointsCreateFuture) UnmarshalJSON(body []byte) error { 12740 var azFuture azure.Future 12741 if err := json.Unmarshal(body, &azFuture); err != nil { 12742 return err 12743 } 12744 future.FutureAPI = &azFuture 12745 future.Result = future.result 12746 return nil 12747} 12748 12749// result is the default implementation for SQLPoolRestorePointsCreateFuture.Result. 12750func (future *SQLPoolRestorePointsCreateFuture) result(client SQLPoolRestorePointsClient) (rp RestorePoint, err error) { 12751 var done bool 12752 done, err = future.DoneWithContext(context.Background(), client) 12753 if err != nil { 12754 err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsCreateFuture", "Result", future.Response(), "Polling failure") 12755 return 12756 } 12757 if !done { 12758 rp.Response.Response = future.Response() 12759 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolRestorePointsCreateFuture") 12760 return 12761 } 12762 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12763 if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { 12764 rp, err = client.CreateResponder(rp.Response.Response) 12765 if err != nil { 12766 err = autorest.NewErrorWithError(err, "synapse.SQLPoolRestorePointsCreateFuture", "Result", rp.Response.Response, "Failure responding to request") 12767 } 12768 } 12769 return 12770} 12771 12772// SQLPoolSchema a Sql pool schema resource. 12773type SQLPoolSchema struct { 12774 autorest.Response `json:"-"` 12775 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 12776 ID *string `json:"id,omitempty"` 12777 // Name - READ-ONLY; The name of the resource 12778 Name *string `json:"name,omitempty"` 12779 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 12780 Type *string `json:"type,omitempty"` 12781} 12782 12783// MarshalJSON is the custom marshaler for SQLPoolSchema. 12784func (sps SQLPoolSchema) MarshalJSON() ([]byte, error) { 12785 objectMap := make(map[string]interface{}) 12786 return json.Marshal(objectMap) 12787} 12788 12789// SQLPoolSchemaListResult a list of Sql pool schemas. 12790type SQLPoolSchemaListResult struct { 12791 autorest.Response `json:"-"` 12792 // Value - READ-ONLY; Array of results. 12793 Value *[]SQLPoolSchema `json:"value,omitempty"` 12794 // NextLink - READ-ONLY; Link to retrieve next page of results. 12795 NextLink *string `json:"nextLink,omitempty"` 12796} 12797 12798// MarshalJSON is the custom marshaler for SQLPoolSchemaListResult. 12799func (spslr SQLPoolSchemaListResult) MarshalJSON() ([]byte, error) { 12800 objectMap := make(map[string]interface{}) 12801 return json.Marshal(objectMap) 12802} 12803 12804// SQLPoolSchemaListResultIterator provides access to a complete listing of SQLPoolSchema values. 12805type SQLPoolSchemaListResultIterator struct { 12806 i int 12807 page SQLPoolSchemaListResultPage 12808} 12809 12810// NextWithContext advances to the next value. If there was an error making 12811// the request the iterator does not advance and the error is returned. 12812func (iter *SQLPoolSchemaListResultIterator) NextWithContext(ctx context.Context) (err error) { 12813 if tracing.IsEnabled() { 12814 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemaListResultIterator.NextWithContext") 12815 defer func() { 12816 sc := -1 12817 if iter.Response().Response.Response != nil { 12818 sc = iter.Response().Response.Response.StatusCode 12819 } 12820 tracing.EndSpan(ctx, sc, err) 12821 }() 12822 } 12823 iter.i++ 12824 if iter.i < len(iter.page.Values()) { 12825 return nil 12826 } 12827 err = iter.page.NextWithContext(ctx) 12828 if err != nil { 12829 iter.i-- 12830 return err 12831 } 12832 iter.i = 0 12833 return nil 12834} 12835 12836// Next advances to the next value. If there was an error making 12837// the request the iterator does not advance and the error is returned. 12838// Deprecated: Use NextWithContext() instead. 12839func (iter *SQLPoolSchemaListResultIterator) Next() error { 12840 return iter.NextWithContext(context.Background()) 12841} 12842 12843// NotDone returns true if the enumeration should be started or is not yet complete. 12844func (iter SQLPoolSchemaListResultIterator) NotDone() bool { 12845 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12846} 12847 12848// Response returns the raw server response from the last page request. 12849func (iter SQLPoolSchemaListResultIterator) Response() SQLPoolSchemaListResult { 12850 return iter.page.Response() 12851} 12852 12853// Value returns the current value or a zero-initialized value if the 12854// iterator has advanced beyond the end of the collection. 12855func (iter SQLPoolSchemaListResultIterator) Value() SQLPoolSchema { 12856 if !iter.page.NotDone() { 12857 return SQLPoolSchema{} 12858 } 12859 return iter.page.Values()[iter.i] 12860} 12861 12862// Creates a new instance of the SQLPoolSchemaListResultIterator type. 12863func NewSQLPoolSchemaListResultIterator(page SQLPoolSchemaListResultPage) SQLPoolSchemaListResultIterator { 12864 return SQLPoolSchemaListResultIterator{page: page} 12865} 12866 12867// IsEmpty returns true if the ListResult contains no values. 12868func (spslr SQLPoolSchemaListResult) IsEmpty() bool { 12869 return spslr.Value == nil || len(*spslr.Value) == 0 12870} 12871 12872// hasNextLink returns true if the NextLink is not empty. 12873func (spslr SQLPoolSchemaListResult) hasNextLink() bool { 12874 return spslr.NextLink != nil && len(*spslr.NextLink) != 0 12875} 12876 12877// sQLPoolSchemaListResultPreparer prepares a request to retrieve the next set of results. 12878// It returns nil if no more results exist. 12879func (spslr SQLPoolSchemaListResult) sQLPoolSchemaListResultPreparer(ctx context.Context) (*http.Request, error) { 12880 if !spslr.hasNextLink() { 12881 return nil, nil 12882 } 12883 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12884 autorest.AsJSON(), 12885 autorest.AsGet(), 12886 autorest.WithBaseURL(to.String(spslr.NextLink))) 12887} 12888 12889// SQLPoolSchemaListResultPage contains a page of SQLPoolSchema values. 12890type SQLPoolSchemaListResultPage struct { 12891 fn func(context.Context, SQLPoolSchemaListResult) (SQLPoolSchemaListResult, error) 12892 spslr SQLPoolSchemaListResult 12893} 12894 12895// NextWithContext advances to the next page of values. If there was an error making 12896// the request the page does not advance and the error is returned. 12897func (page *SQLPoolSchemaListResultPage) NextWithContext(ctx context.Context) (err error) { 12898 if tracing.IsEnabled() { 12899 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemaListResultPage.NextWithContext") 12900 defer func() { 12901 sc := -1 12902 if page.Response().Response.Response != nil { 12903 sc = page.Response().Response.Response.StatusCode 12904 } 12905 tracing.EndSpan(ctx, sc, err) 12906 }() 12907 } 12908 for { 12909 next, err := page.fn(ctx, page.spslr) 12910 if err != nil { 12911 return err 12912 } 12913 page.spslr = next 12914 if !next.hasNextLink() || !next.IsEmpty() { 12915 break 12916 } 12917 } 12918 return nil 12919} 12920 12921// Next advances to the next page of values. If there was an error making 12922// the request the page does not advance and the error is returned. 12923// Deprecated: Use NextWithContext() instead. 12924func (page *SQLPoolSchemaListResultPage) Next() error { 12925 return page.NextWithContext(context.Background()) 12926} 12927 12928// NotDone returns true if the page enumeration should be started or is not yet complete. 12929func (page SQLPoolSchemaListResultPage) NotDone() bool { 12930 return !page.spslr.IsEmpty() 12931} 12932 12933// Response returns the raw server response from the last page request. 12934func (page SQLPoolSchemaListResultPage) Response() SQLPoolSchemaListResult { 12935 return page.spslr 12936} 12937 12938// Values returns the slice of values for the current page or nil if there are no values. 12939func (page SQLPoolSchemaListResultPage) Values() []SQLPoolSchema { 12940 if page.spslr.IsEmpty() { 12941 return nil 12942 } 12943 return *page.spslr.Value 12944} 12945 12946// Creates a new instance of the SQLPoolSchemaListResultPage type. 12947func NewSQLPoolSchemaListResultPage(cur SQLPoolSchemaListResult, getNextPage func(context.Context, SQLPoolSchemaListResult) (SQLPoolSchemaListResult, error)) SQLPoolSchemaListResultPage { 12948 return SQLPoolSchemaListResultPage{ 12949 fn: getNextPage, 12950 spslr: cur, 12951 } 12952} 12953 12954// SQLPoolsCreateFuture an abstraction for monitoring and retrieving the results of a long-running 12955// operation. 12956type SQLPoolsCreateFuture struct { 12957 azure.FutureAPI 12958 // Result returns the result of the asynchronous operation. 12959 // If the operation has not completed it will return an error. 12960 Result func(SQLPoolsClient) (SQLPool, error) 12961} 12962 12963// UnmarshalJSON is the custom unmarshaller for CreateFuture. 12964func (future *SQLPoolsCreateFuture) UnmarshalJSON(body []byte) error { 12965 var azFuture azure.Future 12966 if err := json.Unmarshal(body, &azFuture); err != nil { 12967 return err 12968 } 12969 future.FutureAPI = &azFuture 12970 future.Result = future.result 12971 return nil 12972} 12973 12974// result is the default implementation for SQLPoolsCreateFuture.Result. 12975func (future *SQLPoolsCreateFuture) result(client SQLPoolsClient) (sp SQLPool, err error) { 12976 var done bool 12977 done, err = future.DoneWithContext(context.Background(), client) 12978 if err != nil { 12979 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsCreateFuture", "Result", future.Response(), "Polling failure") 12980 return 12981 } 12982 if !done { 12983 sp.Response.Response = future.Response() 12984 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsCreateFuture") 12985 return 12986 } 12987 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12988 if sp.Response.Response, err = future.GetResult(sender); err == nil && sp.Response.Response.StatusCode != http.StatusNoContent { 12989 sp, err = client.CreateResponder(sp.Response.Response) 12990 if err != nil { 12991 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsCreateFuture", "Result", sp.Response.Response, "Failure responding to request") 12992 } 12993 } 12994 return 12995} 12996 12997// SQLPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 12998// operation. 12999type SQLPoolsDeleteFuture struct { 13000 azure.FutureAPI 13001 // Result returns the result of the asynchronous operation. 13002 // If the operation has not completed it will return an error. 13003 Result func(SQLPoolsClient) (SetObject, error) 13004} 13005 13006// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13007func (future *SQLPoolsDeleteFuture) UnmarshalJSON(body []byte) error { 13008 var azFuture azure.Future 13009 if err := json.Unmarshal(body, &azFuture); err != nil { 13010 return err 13011 } 13012 future.FutureAPI = &azFuture 13013 future.Result = future.result 13014 return nil 13015} 13016 13017// result is the default implementation for SQLPoolsDeleteFuture.Result. 13018func (future *SQLPoolsDeleteFuture) result(client SQLPoolsClient) (so SetObject, err error) { 13019 var done bool 13020 done, err = future.DoneWithContext(context.Background(), client) 13021 if err != nil { 13022 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsDeleteFuture", "Result", future.Response(), "Polling failure") 13023 return 13024 } 13025 if !done { 13026 so.Response.Response = future.Response() 13027 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsDeleteFuture") 13028 return 13029 } 13030 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13031 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 13032 so, err = client.DeleteResponder(so.Response.Response) 13033 if err != nil { 13034 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsDeleteFuture", "Result", so.Response.Response, "Failure responding to request") 13035 } 13036 } 13037 return 13038} 13039 13040// SQLPoolSecurityAlertPolicy a Sql pool security alert policy. 13041type SQLPoolSecurityAlertPolicy struct { 13042 autorest.Response `json:"-"` 13043 // SecurityAlertPolicyProperties - Resource properties. 13044 *SecurityAlertPolicyProperties `json:"properties,omitempty"` 13045 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 13046 ID *string `json:"id,omitempty"` 13047 // Name - READ-ONLY; The name of the resource 13048 Name *string `json:"name,omitempty"` 13049 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 13050 Type *string `json:"type,omitempty"` 13051} 13052 13053// MarshalJSON is the custom marshaler for SQLPoolSecurityAlertPolicy. 13054func (spsap SQLPoolSecurityAlertPolicy) MarshalJSON() ([]byte, error) { 13055 objectMap := make(map[string]interface{}) 13056 if spsap.SecurityAlertPolicyProperties != nil { 13057 objectMap["properties"] = spsap.SecurityAlertPolicyProperties 13058 } 13059 return json.Marshal(objectMap) 13060} 13061 13062// UnmarshalJSON is the custom unmarshaler for SQLPoolSecurityAlertPolicy struct. 13063func (spsap *SQLPoolSecurityAlertPolicy) UnmarshalJSON(body []byte) error { 13064 var m map[string]*json.RawMessage 13065 err := json.Unmarshal(body, &m) 13066 if err != nil { 13067 return err 13068 } 13069 for k, v := range m { 13070 switch k { 13071 case "properties": 13072 if v != nil { 13073 var securityAlertPolicyProperties SecurityAlertPolicyProperties 13074 err = json.Unmarshal(*v, &securityAlertPolicyProperties) 13075 if err != nil { 13076 return err 13077 } 13078 spsap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties 13079 } 13080 case "id": 13081 if v != nil { 13082 var ID string 13083 err = json.Unmarshal(*v, &ID) 13084 if err != nil { 13085 return err 13086 } 13087 spsap.ID = &ID 13088 } 13089 case "name": 13090 if v != nil { 13091 var name string 13092 err = json.Unmarshal(*v, &name) 13093 if err != nil { 13094 return err 13095 } 13096 spsap.Name = &name 13097 } 13098 case "type": 13099 if v != nil { 13100 var typeVar string 13101 err = json.Unmarshal(*v, &typeVar) 13102 if err != nil { 13103 return err 13104 } 13105 spsap.Type = &typeVar 13106 } 13107 } 13108 } 13109 13110 return nil 13111} 13112 13113// SQLPoolsPauseFuture an abstraction for monitoring and retrieving the results of a long-running 13114// operation. 13115type SQLPoolsPauseFuture struct { 13116 azure.FutureAPI 13117 // Result returns the result of the asynchronous operation. 13118 // If the operation has not completed it will return an error. 13119 Result func(SQLPoolsClient) (SetObject, error) 13120} 13121 13122// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13123func (future *SQLPoolsPauseFuture) UnmarshalJSON(body []byte) error { 13124 var azFuture azure.Future 13125 if err := json.Unmarshal(body, &azFuture); err != nil { 13126 return err 13127 } 13128 future.FutureAPI = &azFuture 13129 future.Result = future.result 13130 return nil 13131} 13132 13133// result is the default implementation for SQLPoolsPauseFuture.Result. 13134func (future *SQLPoolsPauseFuture) result(client SQLPoolsClient) (so SetObject, err error) { 13135 var done bool 13136 done, err = future.DoneWithContext(context.Background(), client) 13137 if err != nil { 13138 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsPauseFuture", "Result", future.Response(), "Polling failure") 13139 return 13140 } 13141 if !done { 13142 so.Response.Response = future.Response() 13143 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsPauseFuture") 13144 return 13145 } 13146 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13147 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 13148 so, err = client.PauseResponder(so.Response.Response) 13149 if err != nil { 13150 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsPauseFuture", "Result", so.Response.Response, "Failure responding to request") 13151 } 13152 } 13153 return 13154} 13155 13156// SQLPoolsResumeFuture an abstraction for monitoring and retrieving the results of a long-running 13157// operation. 13158type SQLPoolsResumeFuture struct { 13159 azure.FutureAPI 13160 // Result returns the result of the asynchronous operation. 13161 // If the operation has not completed it will return an error. 13162 Result func(SQLPoolsClient) (SetObject, error) 13163} 13164 13165// UnmarshalJSON is the custom unmarshaller for CreateFuture. 13166func (future *SQLPoolsResumeFuture) UnmarshalJSON(body []byte) error { 13167 var azFuture azure.Future 13168 if err := json.Unmarshal(body, &azFuture); err != nil { 13169 return err 13170 } 13171 future.FutureAPI = &azFuture 13172 future.Result = future.result 13173 return nil 13174} 13175 13176// result is the default implementation for SQLPoolsResumeFuture.Result. 13177func (future *SQLPoolsResumeFuture) result(client SQLPoolsClient) (so SetObject, err error) { 13178 var done bool 13179 done, err = future.DoneWithContext(context.Background(), client) 13180 if err != nil { 13181 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsResumeFuture", "Result", future.Response(), "Polling failure") 13182 return 13183 } 13184 if !done { 13185 so.Response.Response = future.Response() 13186 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolsResumeFuture") 13187 return 13188 } 13189 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13190 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 13191 so, err = client.ResumeResponder(so.Response.Response) 13192 if err != nil { 13193 err = autorest.NewErrorWithError(err, "synapse.SQLPoolsResumeFuture", "Result", so.Response.Response, "Failure responding to request") 13194 } 13195 } 13196 return 13197} 13198 13199// SQLPoolTable a Sql pool table resource. 13200type SQLPoolTable struct { 13201 autorest.Response `json:"-"` 13202 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 13203 ID *string `json:"id,omitempty"` 13204 // Name - READ-ONLY; The name of the resource 13205 Name *string `json:"name,omitempty"` 13206 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 13207 Type *string `json:"type,omitempty"` 13208} 13209 13210// MarshalJSON is the custom marshaler for SQLPoolTable. 13211func (spt SQLPoolTable) MarshalJSON() ([]byte, error) { 13212 objectMap := make(map[string]interface{}) 13213 return json.Marshal(objectMap) 13214} 13215 13216// SQLPoolTableListResult a list of Sql pool tables. 13217type SQLPoolTableListResult struct { 13218 autorest.Response `json:"-"` 13219 // Value - READ-ONLY; Array of results. 13220 Value *[]SQLPoolTable `json:"value,omitempty"` 13221 // NextLink - READ-ONLY; Link to retrieve next page of results. 13222 NextLink *string `json:"nextLink,omitempty"` 13223} 13224 13225// MarshalJSON is the custom marshaler for SQLPoolTableListResult. 13226func (sptlr SQLPoolTableListResult) MarshalJSON() ([]byte, error) { 13227 objectMap := make(map[string]interface{}) 13228 return json.Marshal(objectMap) 13229} 13230 13231// SQLPoolTableListResultIterator provides access to a complete listing of SQLPoolTable values. 13232type SQLPoolTableListResultIterator struct { 13233 i int 13234 page SQLPoolTableListResultPage 13235} 13236 13237// NextWithContext advances to the next value. If there was an error making 13238// the request the iterator does not advance and the error is returned. 13239func (iter *SQLPoolTableListResultIterator) NextWithContext(ctx context.Context) (err error) { 13240 if tracing.IsEnabled() { 13241 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableListResultIterator.NextWithContext") 13242 defer func() { 13243 sc := -1 13244 if iter.Response().Response.Response != nil { 13245 sc = iter.Response().Response.Response.StatusCode 13246 } 13247 tracing.EndSpan(ctx, sc, err) 13248 }() 13249 } 13250 iter.i++ 13251 if iter.i < len(iter.page.Values()) { 13252 return nil 13253 } 13254 err = iter.page.NextWithContext(ctx) 13255 if err != nil { 13256 iter.i-- 13257 return err 13258 } 13259 iter.i = 0 13260 return nil 13261} 13262 13263// Next advances to the next value. If there was an error making 13264// the request the iterator does not advance and the error is returned. 13265// Deprecated: Use NextWithContext() instead. 13266func (iter *SQLPoolTableListResultIterator) Next() error { 13267 return iter.NextWithContext(context.Background()) 13268} 13269 13270// NotDone returns true if the enumeration should be started or is not yet complete. 13271func (iter SQLPoolTableListResultIterator) NotDone() bool { 13272 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13273} 13274 13275// Response returns the raw server response from the last page request. 13276func (iter SQLPoolTableListResultIterator) Response() SQLPoolTableListResult { 13277 return iter.page.Response() 13278} 13279 13280// Value returns the current value or a zero-initialized value if the 13281// iterator has advanced beyond the end of the collection. 13282func (iter SQLPoolTableListResultIterator) Value() SQLPoolTable { 13283 if !iter.page.NotDone() { 13284 return SQLPoolTable{} 13285 } 13286 return iter.page.Values()[iter.i] 13287} 13288 13289// Creates a new instance of the SQLPoolTableListResultIterator type. 13290func NewSQLPoolTableListResultIterator(page SQLPoolTableListResultPage) SQLPoolTableListResultIterator { 13291 return SQLPoolTableListResultIterator{page: page} 13292} 13293 13294// IsEmpty returns true if the ListResult contains no values. 13295func (sptlr SQLPoolTableListResult) IsEmpty() bool { 13296 return sptlr.Value == nil || len(*sptlr.Value) == 0 13297} 13298 13299// hasNextLink returns true if the NextLink is not empty. 13300func (sptlr SQLPoolTableListResult) hasNextLink() bool { 13301 return sptlr.NextLink != nil && len(*sptlr.NextLink) != 0 13302} 13303 13304// sQLPoolTableListResultPreparer prepares a request to retrieve the next set of results. 13305// It returns nil if no more results exist. 13306func (sptlr SQLPoolTableListResult) sQLPoolTableListResultPreparer(ctx context.Context) (*http.Request, error) { 13307 if !sptlr.hasNextLink() { 13308 return nil, nil 13309 } 13310 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13311 autorest.AsJSON(), 13312 autorest.AsGet(), 13313 autorest.WithBaseURL(to.String(sptlr.NextLink))) 13314} 13315 13316// SQLPoolTableListResultPage contains a page of SQLPoolTable values. 13317type SQLPoolTableListResultPage struct { 13318 fn func(context.Context, SQLPoolTableListResult) (SQLPoolTableListResult, error) 13319 sptlr SQLPoolTableListResult 13320} 13321 13322// NextWithContext advances to the next page of values. If there was an error making 13323// the request the page does not advance and the error is returned. 13324func (page *SQLPoolTableListResultPage) NextWithContext(ctx context.Context) (err error) { 13325 if tracing.IsEnabled() { 13326 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableListResultPage.NextWithContext") 13327 defer func() { 13328 sc := -1 13329 if page.Response().Response.Response != nil { 13330 sc = page.Response().Response.Response.StatusCode 13331 } 13332 tracing.EndSpan(ctx, sc, err) 13333 }() 13334 } 13335 for { 13336 next, err := page.fn(ctx, page.sptlr) 13337 if err != nil { 13338 return err 13339 } 13340 page.sptlr = next 13341 if !next.hasNextLink() || !next.IsEmpty() { 13342 break 13343 } 13344 } 13345 return nil 13346} 13347 13348// Next advances to the next page of values. If there was an error making 13349// the request the page does not advance and the error is returned. 13350// Deprecated: Use NextWithContext() instead. 13351func (page *SQLPoolTableListResultPage) Next() error { 13352 return page.NextWithContext(context.Background()) 13353} 13354 13355// NotDone returns true if the page enumeration should be started or is not yet complete. 13356func (page SQLPoolTableListResultPage) NotDone() bool { 13357 return !page.sptlr.IsEmpty() 13358} 13359 13360// Response returns the raw server response from the last page request. 13361func (page SQLPoolTableListResultPage) Response() SQLPoolTableListResult { 13362 return page.sptlr 13363} 13364 13365// Values returns the slice of values for the current page or nil if there are no values. 13366func (page SQLPoolTableListResultPage) Values() []SQLPoolTable { 13367 if page.sptlr.IsEmpty() { 13368 return nil 13369 } 13370 return *page.sptlr.Value 13371} 13372 13373// Creates a new instance of the SQLPoolTableListResultPage type. 13374func NewSQLPoolTableListResultPage(cur SQLPoolTableListResult, getNextPage func(context.Context, SQLPoolTableListResult) (SQLPoolTableListResult, error)) SQLPoolTableListResultPage { 13375 return SQLPoolTableListResultPage{ 13376 fn: getNextPage, 13377 sptlr: cur, 13378 } 13379} 13380 13381// SQLPoolUsage the Sql pool usages. 13382type SQLPoolUsage struct { 13383 // Name - READ-ONLY; The name of the usage metric. 13384 Name *string `json:"name,omitempty"` 13385 // ResourceName - READ-ONLY; The name of the resource. 13386 ResourceName *string `json:"resourceName,omitempty"` 13387 // DisplayName - READ-ONLY; The usage metric display name. 13388 DisplayName *string `json:"displayName,omitempty"` 13389 // CurrentValue - READ-ONLY; The current value of the usage metric. 13390 CurrentValue *float64 `json:"currentValue,omitempty"` 13391 // Limit - READ-ONLY; The current limit of the usage metric. 13392 Limit *float64 `json:"limit,omitempty"` 13393 // Unit - READ-ONLY; The units of the usage metric. 13394 Unit *string `json:"unit,omitempty"` 13395 // NextResetTime - READ-ONLY; The next reset time for the usage metric (ISO8601 format). 13396 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 13397} 13398 13399// MarshalJSON is the custom marshaler for SQLPoolUsage. 13400func (spu SQLPoolUsage) MarshalJSON() ([]byte, error) { 13401 objectMap := make(map[string]interface{}) 13402 return json.Marshal(objectMap) 13403} 13404 13405// SQLPoolUsageListResult the response to a list Sql pool usages request. 13406type SQLPoolUsageListResult struct { 13407 autorest.Response `json:"-"` 13408 // Value - The list of usages for the Sql pool. 13409 Value *[]SQLPoolUsage `json:"value,omitempty"` 13410 // NextLink - READ-ONLY; Link to retrieve next page of results. 13411 NextLink *string `json:"nextLink,omitempty"` 13412} 13413 13414// MarshalJSON is the custom marshaler for SQLPoolUsageListResult. 13415func (spulr SQLPoolUsageListResult) MarshalJSON() ([]byte, error) { 13416 objectMap := make(map[string]interface{}) 13417 if spulr.Value != nil { 13418 objectMap["value"] = spulr.Value 13419 } 13420 return json.Marshal(objectMap) 13421} 13422 13423// SQLPoolUsageListResultIterator provides access to a complete listing of SQLPoolUsage values. 13424type SQLPoolUsageListResultIterator struct { 13425 i int 13426 page SQLPoolUsageListResultPage 13427} 13428 13429// NextWithContext advances to the next value. If there was an error making 13430// the request the iterator does not advance and the error is returned. 13431func (iter *SQLPoolUsageListResultIterator) NextWithContext(ctx context.Context) (err error) { 13432 if tracing.IsEnabled() { 13433 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsageListResultIterator.NextWithContext") 13434 defer func() { 13435 sc := -1 13436 if iter.Response().Response.Response != nil { 13437 sc = iter.Response().Response.Response.StatusCode 13438 } 13439 tracing.EndSpan(ctx, sc, err) 13440 }() 13441 } 13442 iter.i++ 13443 if iter.i < len(iter.page.Values()) { 13444 return nil 13445 } 13446 err = iter.page.NextWithContext(ctx) 13447 if err != nil { 13448 iter.i-- 13449 return err 13450 } 13451 iter.i = 0 13452 return nil 13453} 13454 13455// Next advances to the next value. If there was an error making 13456// the request the iterator does not advance and the error is returned. 13457// Deprecated: Use NextWithContext() instead. 13458func (iter *SQLPoolUsageListResultIterator) Next() error { 13459 return iter.NextWithContext(context.Background()) 13460} 13461 13462// NotDone returns true if the enumeration should be started or is not yet complete. 13463func (iter SQLPoolUsageListResultIterator) NotDone() bool { 13464 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13465} 13466 13467// Response returns the raw server response from the last page request. 13468func (iter SQLPoolUsageListResultIterator) Response() SQLPoolUsageListResult { 13469 return iter.page.Response() 13470} 13471 13472// Value returns the current value or a zero-initialized value if the 13473// iterator has advanced beyond the end of the collection. 13474func (iter SQLPoolUsageListResultIterator) Value() SQLPoolUsage { 13475 if !iter.page.NotDone() { 13476 return SQLPoolUsage{} 13477 } 13478 return iter.page.Values()[iter.i] 13479} 13480 13481// Creates a new instance of the SQLPoolUsageListResultIterator type. 13482func NewSQLPoolUsageListResultIterator(page SQLPoolUsageListResultPage) SQLPoolUsageListResultIterator { 13483 return SQLPoolUsageListResultIterator{page: page} 13484} 13485 13486// IsEmpty returns true if the ListResult contains no values. 13487func (spulr SQLPoolUsageListResult) IsEmpty() bool { 13488 return spulr.Value == nil || len(*spulr.Value) == 0 13489} 13490 13491// hasNextLink returns true if the NextLink is not empty. 13492func (spulr SQLPoolUsageListResult) hasNextLink() bool { 13493 return spulr.NextLink != nil && len(*spulr.NextLink) != 0 13494} 13495 13496// sQLPoolUsageListResultPreparer prepares a request to retrieve the next set of results. 13497// It returns nil if no more results exist. 13498func (spulr SQLPoolUsageListResult) sQLPoolUsageListResultPreparer(ctx context.Context) (*http.Request, error) { 13499 if !spulr.hasNextLink() { 13500 return nil, nil 13501 } 13502 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13503 autorest.AsJSON(), 13504 autorest.AsGet(), 13505 autorest.WithBaseURL(to.String(spulr.NextLink))) 13506} 13507 13508// SQLPoolUsageListResultPage contains a page of SQLPoolUsage values. 13509type SQLPoolUsageListResultPage struct { 13510 fn func(context.Context, SQLPoolUsageListResult) (SQLPoolUsageListResult, error) 13511 spulr SQLPoolUsageListResult 13512} 13513 13514// NextWithContext advances to the next page of values. If there was an error making 13515// the request the page does not advance and the error is returned. 13516func (page *SQLPoolUsageListResultPage) NextWithContext(ctx context.Context) (err error) { 13517 if tracing.IsEnabled() { 13518 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsageListResultPage.NextWithContext") 13519 defer func() { 13520 sc := -1 13521 if page.Response().Response.Response != nil { 13522 sc = page.Response().Response.Response.StatusCode 13523 } 13524 tracing.EndSpan(ctx, sc, err) 13525 }() 13526 } 13527 for { 13528 next, err := page.fn(ctx, page.spulr) 13529 if err != nil { 13530 return err 13531 } 13532 page.spulr = next 13533 if !next.hasNextLink() || !next.IsEmpty() { 13534 break 13535 } 13536 } 13537 return nil 13538} 13539 13540// Next advances to the next page of values. If there was an error making 13541// the request the page does not advance and the error is returned. 13542// Deprecated: Use NextWithContext() instead. 13543func (page *SQLPoolUsageListResultPage) Next() error { 13544 return page.NextWithContext(context.Background()) 13545} 13546 13547// NotDone returns true if the page enumeration should be started or is not yet complete. 13548func (page SQLPoolUsageListResultPage) NotDone() bool { 13549 return !page.spulr.IsEmpty() 13550} 13551 13552// Response returns the raw server response from the last page request. 13553func (page SQLPoolUsageListResultPage) Response() SQLPoolUsageListResult { 13554 return page.spulr 13555} 13556 13557// Values returns the slice of values for the current page or nil if there are no values. 13558func (page SQLPoolUsageListResultPage) Values() []SQLPoolUsage { 13559 if page.spulr.IsEmpty() { 13560 return nil 13561 } 13562 return *page.spulr.Value 13563} 13564 13565// Creates a new instance of the SQLPoolUsageListResultPage type. 13566func NewSQLPoolUsageListResultPage(cur SQLPoolUsageListResult, getNextPage func(context.Context, SQLPoolUsageListResult) (SQLPoolUsageListResult, error)) SQLPoolUsageListResultPage { 13567 return SQLPoolUsageListResultPage{ 13568 fn: getNextPage, 13569 spulr: cur, 13570 } 13571} 13572 13573// SQLPoolVulnerabilityAssessment a Sql pool vulnerability assessment. 13574type SQLPoolVulnerabilityAssessment struct { 13575 autorest.Response `json:"-"` 13576 // SQLPoolVulnerabilityAssessmentProperties - Resource properties. 13577 *SQLPoolVulnerabilityAssessmentProperties `json:"properties,omitempty"` 13578 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 13579 ID *string `json:"id,omitempty"` 13580 // Name - READ-ONLY; The name of the resource 13581 Name *string `json:"name,omitempty"` 13582 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 13583 Type *string `json:"type,omitempty"` 13584} 13585 13586// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessment. 13587func (spva SQLPoolVulnerabilityAssessment) MarshalJSON() ([]byte, error) { 13588 objectMap := make(map[string]interface{}) 13589 if spva.SQLPoolVulnerabilityAssessmentProperties != nil { 13590 objectMap["properties"] = spva.SQLPoolVulnerabilityAssessmentProperties 13591 } 13592 return json.Marshal(objectMap) 13593} 13594 13595// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessment struct. 13596func (spva *SQLPoolVulnerabilityAssessment) UnmarshalJSON(body []byte) error { 13597 var m map[string]*json.RawMessage 13598 err := json.Unmarshal(body, &m) 13599 if err != nil { 13600 return err 13601 } 13602 for k, v := range m { 13603 switch k { 13604 case "properties": 13605 if v != nil { 13606 var SQLPoolVulnerabilityAssessmentProperties SQLPoolVulnerabilityAssessmentProperties 13607 err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentProperties) 13608 if err != nil { 13609 return err 13610 } 13611 spva.SQLPoolVulnerabilityAssessmentProperties = &SQLPoolVulnerabilityAssessmentProperties 13612 } 13613 case "id": 13614 if v != nil { 13615 var ID string 13616 err = json.Unmarshal(*v, &ID) 13617 if err != nil { 13618 return err 13619 } 13620 spva.ID = &ID 13621 } 13622 case "name": 13623 if v != nil { 13624 var name string 13625 err = json.Unmarshal(*v, &name) 13626 if err != nil { 13627 return err 13628 } 13629 spva.Name = &name 13630 } 13631 case "type": 13632 if v != nil { 13633 var typeVar string 13634 err = json.Unmarshal(*v, &typeVar) 13635 if err != nil { 13636 return err 13637 } 13638 spva.Type = &typeVar 13639 } 13640 } 13641 } 13642 13643 return nil 13644} 13645 13646// SQLPoolVulnerabilityAssessmentListResult a list of the Sql pool's vulnerability assessments. 13647type SQLPoolVulnerabilityAssessmentListResult struct { 13648 autorest.Response `json:"-"` 13649 // Value - READ-ONLY; Array of results. 13650 Value *[]SQLPoolVulnerabilityAssessment `json:"value,omitempty"` 13651 // NextLink - READ-ONLY; Link to retrieve next page of results. 13652 NextLink *string `json:"nextLink,omitempty"` 13653} 13654 13655// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentListResult. 13656func (spvalr SQLPoolVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { 13657 objectMap := make(map[string]interface{}) 13658 return json.Marshal(objectMap) 13659} 13660 13661// SQLPoolVulnerabilityAssessmentListResultIterator provides access to a complete listing of 13662// SQLPoolVulnerabilityAssessment values. 13663type SQLPoolVulnerabilityAssessmentListResultIterator struct { 13664 i int 13665 page SQLPoolVulnerabilityAssessmentListResultPage 13666} 13667 13668// NextWithContext advances to the next value. If there was an error making 13669// the request the iterator does not advance and the error is returned. 13670func (iter *SQLPoolVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) { 13671 if tracing.IsEnabled() { 13672 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentListResultIterator.NextWithContext") 13673 defer func() { 13674 sc := -1 13675 if iter.Response().Response.Response != nil { 13676 sc = iter.Response().Response.Response.StatusCode 13677 } 13678 tracing.EndSpan(ctx, sc, err) 13679 }() 13680 } 13681 iter.i++ 13682 if iter.i < len(iter.page.Values()) { 13683 return nil 13684 } 13685 err = iter.page.NextWithContext(ctx) 13686 if err != nil { 13687 iter.i-- 13688 return err 13689 } 13690 iter.i = 0 13691 return nil 13692} 13693 13694// Next advances to the next value. If there was an error making 13695// the request the iterator does not advance and the error is returned. 13696// Deprecated: Use NextWithContext() instead. 13697func (iter *SQLPoolVulnerabilityAssessmentListResultIterator) Next() error { 13698 return iter.NextWithContext(context.Background()) 13699} 13700 13701// NotDone returns true if the enumeration should be started or is not yet complete. 13702func (iter SQLPoolVulnerabilityAssessmentListResultIterator) NotDone() bool { 13703 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13704} 13705 13706// Response returns the raw server response from the last page request. 13707func (iter SQLPoolVulnerabilityAssessmentListResultIterator) Response() SQLPoolVulnerabilityAssessmentListResult { 13708 return iter.page.Response() 13709} 13710 13711// Value returns the current value or a zero-initialized value if the 13712// iterator has advanced beyond the end of the collection. 13713func (iter SQLPoolVulnerabilityAssessmentListResultIterator) Value() SQLPoolVulnerabilityAssessment { 13714 if !iter.page.NotDone() { 13715 return SQLPoolVulnerabilityAssessment{} 13716 } 13717 return iter.page.Values()[iter.i] 13718} 13719 13720// Creates a new instance of the SQLPoolVulnerabilityAssessmentListResultIterator type. 13721func NewSQLPoolVulnerabilityAssessmentListResultIterator(page SQLPoolVulnerabilityAssessmentListResultPage) SQLPoolVulnerabilityAssessmentListResultIterator { 13722 return SQLPoolVulnerabilityAssessmentListResultIterator{page: page} 13723} 13724 13725// IsEmpty returns true if the ListResult contains no values. 13726func (spvalr SQLPoolVulnerabilityAssessmentListResult) IsEmpty() bool { 13727 return spvalr.Value == nil || len(*spvalr.Value) == 0 13728} 13729 13730// hasNextLink returns true if the NextLink is not empty. 13731func (spvalr SQLPoolVulnerabilityAssessmentListResult) hasNextLink() bool { 13732 return spvalr.NextLink != nil && len(*spvalr.NextLink) != 0 13733} 13734 13735// sQLPoolVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results. 13736// It returns nil if no more results exist. 13737func (spvalr SQLPoolVulnerabilityAssessmentListResult) sQLPoolVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) { 13738 if !spvalr.hasNextLink() { 13739 return nil, nil 13740 } 13741 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13742 autorest.AsJSON(), 13743 autorest.AsGet(), 13744 autorest.WithBaseURL(to.String(spvalr.NextLink))) 13745} 13746 13747// SQLPoolVulnerabilityAssessmentListResultPage contains a page of SQLPoolVulnerabilityAssessment values. 13748type SQLPoolVulnerabilityAssessmentListResultPage struct { 13749 fn func(context.Context, SQLPoolVulnerabilityAssessmentListResult) (SQLPoolVulnerabilityAssessmentListResult, error) 13750 spvalr SQLPoolVulnerabilityAssessmentListResult 13751} 13752 13753// NextWithContext advances to the next page of values. If there was an error making 13754// the request the page does not advance and the error is returned. 13755func (page *SQLPoolVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) { 13756 if tracing.IsEnabled() { 13757 ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentListResultPage.NextWithContext") 13758 defer func() { 13759 sc := -1 13760 if page.Response().Response.Response != nil { 13761 sc = page.Response().Response.Response.StatusCode 13762 } 13763 tracing.EndSpan(ctx, sc, err) 13764 }() 13765 } 13766 for { 13767 next, err := page.fn(ctx, page.spvalr) 13768 if err != nil { 13769 return err 13770 } 13771 page.spvalr = next 13772 if !next.hasNextLink() || !next.IsEmpty() { 13773 break 13774 } 13775 } 13776 return nil 13777} 13778 13779// Next advances to the next page of values. If there was an error making 13780// the request the page does not advance and the error is returned. 13781// Deprecated: Use NextWithContext() instead. 13782func (page *SQLPoolVulnerabilityAssessmentListResultPage) Next() error { 13783 return page.NextWithContext(context.Background()) 13784} 13785 13786// NotDone returns true if the page enumeration should be started or is not yet complete. 13787func (page SQLPoolVulnerabilityAssessmentListResultPage) NotDone() bool { 13788 return !page.spvalr.IsEmpty() 13789} 13790 13791// Response returns the raw server response from the last page request. 13792func (page SQLPoolVulnerabilityAssessmentListResultPage) Response() SQLPoolVulnerabilityAssessmentListResult { 13793 return page.spvalr 13794} 13795 13796// Values returns the slice of values for the current page or nil if there are no values. 13797func (page SQLPoolVulnerabilityAssessmentListResultPage) Values() []SQLPoolVulnerabilityAssessment { 13798 if page.spvalr.IsEmpty() { 13799 return nil 13800 } 13801 return *page.spvalr.Value 13802} 13803 13804// Creates a new instance of the SQLPoolVulnerabilityAssessmentListResultPage type. 13805func NewSQLPoolVulnerabilityAssessmentListResultPage(cur SQLPoolVulnerabilityAssessmentListResult, getNextPage func(context.Context, SQLPoolVulnerabilityAssessmentListResult) (SQLPoolVulnerabilityAssessmentListResult, error)) SQLPoolVulnerabilityAssessmentListResultPage { 13806 return SQLPoolVulnerabilityAssessmentListResultPage{ 13807 fn: getNextPage, 13808 spvalr: cur, 13809 } 13810} 13811 13812// SQLPoolVulnerabilityAssessmentProperties properties of a Sql pool Vulnerability Assessment. 13813type SQLPoolVulnerabilityAssessmentProperties struct { 13814 // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set 13815 StorageContainerPath *string `json:"storageContainerPath,omitempty"` 13816 // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. 13817 StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` 13818 // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. 13819 StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` 13820 // RecurringScans - The recurring scans settings 13821 RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` 13822} 13823 13824// SQLPoolVulnerabilityAssessmentRuleBaseline a Sql pool vulnerability assessment rule baseline. 13825type SQLPoolVulnerabilityAssessmentRuleBaseline struct { 13826 autorest.Response `json:"-"` 13827 // SQLPoolVulnerabilityAssessmentRuleBaselineProperties - Resource properties. 13828 *SQLPoolVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"` 13829 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 13830 ID *string `json:"id,omitempty"` 13831 // Name - READ-ONLY; The name of the resource 13832 Name *string `json:"name,omitempty"` 13833 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 13834 Type *string `json:"type,omitempty"` 13835} 13836 13837// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentRuleBaseline. 13838func (spvarb SQLPoolVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) { 13839 objectMap := make(map[string]interface{}) 13840 if spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties != nil { 13841 objectMap["properties"] = spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties 13842 } 13843 return json.Marshal(objectMap) 13844} 13845 13846// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessmentRuleBaseline struct. 13847func (spvarb *SQLPoolVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(body []byte) error { 13848 var m map[string]*json.RawMessage 13849 err := json.Unmarshal(body, &m) 13850 if err != nil { 13851 return err 13852 } 13853 for k, v := range m { 13854 switch k { 13855 case "properties": 13856 if v != nil { 13857 var SQLPoolVulnerabilityAssessmentRuleBaselineProperties SQLPoolVulnerabilityAssessmentRuleBaselineProperties 13858 err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentRuleBaselineProperties) 13859 if err != nil { 13860 return err 13861 } 13862 spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties = &SQLPoolVulnerabilityAssessmentRuleBaselineProperties 13863 } 13864 case "id": 13865 if v != nil { 13866 var ID string 13867 err = json.Unmarshal(*v, &ID) 13868 if err != nil { 13869 return err 13870 } 13871 spvarb.ID = &ID 13872 } 13873 case "name": 13874 if v != nil { 13875 var name string 13876 err = json.Unmarshal(*v, &name) 13877 if err != nil { 13878 return err 13879 } 13880 spvarb.Name = &name 13881 } 13882 case "type": 13883 if v != nil { 13884 var typeVar string 13885 err = json.Unmarshal(*v, &typeVar) 13886 if err != nil { 13887 return err 13888 } 13889 spvarb.Type = &typeVar 13890 } 13891 } 13892 } 13893 13894 return nil 13895} 13896 13897// SQLPoolVulnerabilityAssessmentRuleBaselineItem properties for an Sql pool vulnerability assessment rule 13898// baseline's result. 13899type SQLPoolVulnerabilityAssessmentRuleBaselineItem struct { 13900 // Result - The rule baseline result 13901 Result *[]string `json:"result,omitempty"` 13902} 13903 13904// SQLPoolVulnerabilityAssessmentRuleBaselineProperties properties of a Sql pool vulnerability assessment 13905// rule baseline. 13906type SQLPoolVulnerabilityAssessmentRuleBaselineProperties struct { 13907 // BaselineResults - The rule baseline result 13908 BaselineResults *[]SQLPoolVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults,omitempty"` 13909} 13910 13911// SQLPoolVulnerabilityAssessmentScanExportProperties properties of the export operation's result. 13912type SQLPoolVulnerabilityAssessmentScanExportProperties struct { 13913 // ExportedReportLocation - READ-ONLY; Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). 13914 ExportedReportLocation *string `json:"exportedReportLocation,omitempty"` 13915} 13916 13917// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentScanExportProperties. 13918func (spvasep SQLPoolVulnerabilityAssessmentScanExportProperties) MarshalJSON() ([]byte, error) { 13919 objectMap := make(map[string]interface{}) 13920 return json.Marshal(objectMap) 13921} 13922 13923// SQLPoolVulnerabilityAssessmentScansExport a Sql pool Vulnerability Assessment scan export resource. 13924type SQLPoolVulnerabilityAssessmentScansExport struct { 13925 autorest.Response `json:"-"` 13926 // SQLPoolVulnerabilityAssessmentScanExportProperties - Resource properties. 13927 *SQLPoolVulnerabilityAssessmentScanExportProperties `json:"properties,omitempty"` 13928 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 13929 ID *string `json:"id,omitempty"` 13930 // Name - READ-ONLY; The name of the resource 13931 Name *string `json:"name,omitempty"` 13932 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 13933 Type *string `json:"type,omitempty"` 13934} 13935 13936// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentScansExport. 13937func (spvase SQLPoolVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error) { 13938 objectMap := make(map[string]interface{}) 13939 if spvase.SQLPoolVulnerabilityAssessmentScanExportProperties != nil { 13940 objectMap["properties"] = spvase.SQLPoolVulnerabilityAssessmentScanExportProperties 13941 } 13942 return json.Marshal(objectMap) 13943} 13944 13945// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessmentScansExport struct. 13946func (spvase *SQLPoolVulnerabilityAssessmentScansExport) UnmarshalJSON(body []byte) error { 13947 var m map[string]*json.RawMessage 13948 err := json.Unmarshal(body, &m) 13949 if err != nil { 13950 return err 13951 } 13952 for k, v := range m { 13953 switch k { 13954 case "properties": 13955 if v != nil { 13956 var SQLPoolVulnerabilityAssessmentScanExportProperties SQLPoolVulnerabilityAssessmentScanExportProperties 13957 err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentScanExportProperties) 13958 if err != nil { 13959 return err 13960 } 13961 spvase.SQLPoolVulnerabilityAssessmentScanExportProperties = &SQLPoolVulnerabilityAssessmentScanExportProperties 13962 } 13963 case "id": 13964 if v != nil { 13965 var ID string 13966 err = json.Unmarshal(*v, &ID) 13967 if err != nil { 13968 return err 13969 } 13970 spvase.ID = &ID 13971 } 13972 case "name": 13973 if v != nil { 13974 var name string 13975 err = json.Unmarshal(*v, &name) 13976 if err != nil { 13977 return err 13978 } 13979 spvase.Name = &name 13980 } 13981 case "type": 13982 if v != nil { 13983 var typeVar string 13984 err = json.Unmarshal(*v, &typeVar) 13985 if err != nil { 13986 return err 13987 } 13988 spvase.Type = &typeVar 13989 } 13990 } 13991 } 13992 13993 return nil 13994} 13995 13996// SQLPoolVulnerabilityAssessmentScansInitiateScanFuture an abstraction for monitoring and retrieving the 13997// results of a long-running operation. 13998type SQLPoolVulnerabilityAssessmentScansInitiateScanFuture struct { 13999 azure.FutureAPI 14000 // Result returns the result of the asynchronous operation. 14001 // If the operation has not completed it will return an error. 14002 Result func(SQLPoolVulnerabilityAssessmentScansClient) (autorest.Response, error) 14003} 14004 14005// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14006func (future *SQLPoolVulnerabilityAssessmentScansInitiateScanFuture) UnmarshalJSON(body []byte) error { 14007 var azFuture azure.Future 14008 if err := json.Unmarshal(body, &azFuture); err != nil { 14009 return err 14010 } 14011 future.FutureAPI = &azFuture 14012 future.Result = future.result 14013 return nil 14014} 14015 14016// result is the default implementation for SQLPoolVulnerabilityAssessmentScansInitiateScanFuture.Result. 14017func (future *SQLPoolVulnerabilityAssessmentScansInitiateScanFuture) result(client SQLPoolVulnerabilityAssessmentScansClient) (ar autorest.Response, err error) { 14018 var done bool 14019 done, err = future.DoneWithContext(context.Background(), client) 14020 if err != nil { 14021 err = autorest.NewErrorWithError(err, "synapse.SQLPoolVulnerabilityAssessmentScansInitiateScanFuture", "Result", future.Response(), "Polling failure") 14022 return 14023 } 14024 if !done { 14025 ar.Response = future.Response() 14026 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolVulnerabilityAssessmentScansInitiateScanFuture") 14027 return 14028 } 14029 ar.Response = future.Response() 14030 return 14031} 14032 14033// SQLPoolWorkloadClassifierCreateOrUpdateFuture an abstraction for monitoring and retrieving the results 14034// of a long-running operation. 14035type SQLPoolWorkloadClassifierCreateOrUpdateFuture struct { 14036 azure.FutureAPI 14037 // Result returns the result of the asynchronous operation. 14038 // If the operation has not completed it will return an error. 14039 Result func(SQLPoolWorkloadClassifierClient) (WorkloadClassifier, error) 14040} 14041 14042// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14043func (future *SQLPoolWorkloadClassifierCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 14044 var azFuture azure.Future 14045 if err := json.Unmarshal(body, &azFuture); err != nil { 14046 return err 14047 } 14048 future.FutureAPI = &azFuture 14049 future.Result = future.result 14050 return nil 14051} 14052 14053// result is the default implementation for SQLPoolWorkloadClassifierCreateOrUpdateFuture.Result. 14054func (future *SQLPoolWorkloadClassifierCreateOrUpdateFuture) result(client SQLPoolWorkloadClassifierClient) (wc WorkloadClassifier, err error) { 14055 var done bool 14056 done, err = future.DoneWithContext(context.Background(), client) 14057 if err != nil { 14058 err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 14059 return 14060 } 14061 if !done { 14062 wc.Response.Response = future.Response() 14063 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture") 14064 return 14065 } 14066 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14067 if wc.Response.Response, err = future.GetResult(sender); err == nil && wc.Response.Response.StatusCode != http.StatusNoContent { 14068 wc, err = client.CreateOrUpdateResponder(wc.Response.Response) 14069 if err != nil { 14070 err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierCreateOrUpdateFuture", "Result", wc.Response.Response, "Failure responding to request") 14071 } 14072 } 14073 return 14074} 14075 14076// SQLPoolWorkloadClassifierDeleteFuture an abstraction for monitoring and retrieving the results of a 14077// long-running operation. 14078type SQLPoolWorkloadClassifierDeleteFuture struct { 14079 azure.FutureAPI 14080 // Result returns the result of the asynchronous operation. 14081 // If the operation has not completed it will return an error. 14082 Result func(SQLPoolWorkloadClassifierClient) (autorest.Response, error) 14083} 14084 14085// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14086func (future *SQLPoolWorkloadClassifierDeleteFuture) UnmarshalJSON(body []byte) error { 14087 var azFuture azure.Future 14088 if err := json.Unmarshal(body, &azFuture); err != nil { 14089 return err 14090 } 14091 future.FutureAPI = &azFuture 14092 future.Result = future.result 14093 return nil 14094} 14095 14096// result is the default implementation for SQLPoolWorkloadClassifierDeleteFuture.Result. 14097func (future *SQLPoolWorkloadClassifierDeleteFuture) result(client SQLPoolWorkloadClassifierClient) (ar autorest.Response, err error) { 14098 var done bool 14099 done, err = future.DoneWithContext(context.Background(), client) 14100 if err != nil { 14101 err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadClassifierDeleteFuture", "Result", future.Response(), "Polling failure") 14102 return 14103 } 14104 if !done { 14105 ar.Response = future.Response() 14106 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadClassifierDeleteFuture") 14107 return 14108 } 14109 ar.Response = future.Response() 14110 return 14111} 14112 14113// SQLPoolWorkloadGroupCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 14114// long-running operation. 14115type SQLPoolWorkloadGroupCreateOrUpdateFuture struct { 14116 azure.FutureAPI 14117 // Result returns the result of the asynchronous operation. 14118 // If the operation has not completed it will return an error. 14119 Result func(SQLPoolWorkloadGroupClient) (WorkloadGroup, error) 14120} 14121 14122// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14123func (future *SQLPoolWorkloadGroupCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 14124 var azFuture azure.Future 14125 if err := json.Unmarshal(body, &azFuture); err != nil { 14126 return err 14127 } 14128 future.FutureAPI = &azFuture 14129 future.Result = future.result 14130 return nil 14131} 14132 14133// result is the default implementation for SQLPoolWorkloadGroupCreateOrUpdateFuture.Result. 14134func (future *SQLPoolWorkloadGroupCreateOrUpdateFuture) result(client SQLPoolWorkloadGroupClient) (wg WorkloadGroup, err error) { 14135 var done bool 14136 done, err = future.DoneWithContext(context.Background(), client) 14137 if err != nil { 14138 err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 14139 return 14140 } 14141 if !done { 14142 wg.Response.Response = future.Response() 14143 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture") 14144 return 14145 } 14146 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14147 if wg.Response.Response, err = future.GetResult(sender); err == nil && wg.Response.Response.StatusCode != http.StatusNoContent { 14148 wg, err = client.CreateOrUpdateResponder(wg.Response.Response) 14149 if err != nil { 14150 err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupCreateOrUpdateFuture", "Result", wg.Response.Response, "Failure responding to request") 14151 } 14152 } 14153 return 14154} 14155 14156// SQLPoolWorkloadGroupDeleteFuture an abstraction for monitoring and retrieving the results of a 14157// long-running operation. 14158type SQLPoolWorkloadGroupDeleteFuture struct { 14159 azure.FutureAPI 14160 // Result returns the result of the asynchronous operation. 14161 // If the operation has not completed it will return an error. 14162 Result func(SQLPoolWorkloadGroupClient) (autorest.Response, error) 14163} 14164 14165// UnmarshalJSON is the custom unmarshaller for CreateFuture. 14166func (future *SQLPoolWorkloadGroupDeleteFuture) UnmarshalJSON(body []byte) error { 14167 var azFuture azure.Future 14168 if err := json.Unmarshal(body, &azFuture); err != nil { 14169 return err 14170 } 14171 future.FutureAPI = &azFuture 14172 future.Result = future.result 14173 return nil 14174} 14175 14176// result is the default implementation for SQLPoolWorkloadGroupDeleteFuture.Result. 14177func (future *SQLPoolWorkloadGroupDeleteFuture) result(client SQLPoolWorkloadGroupClient) (ar autorest.Response, err error) { 14178 var done bool 14179 done, err = future.DoneWithContext(context.Background(), client) 14180 if err != nil { 14181 err = autorest.NewErrorWithError(err, "synapse.SQLPoolWorkloadGroupDeleteFuture", "Result", future.Response(), "Polling failure") 14182 return 14183 } 14184 if !done { 14185 ar.Response = future.Response() 14186 err = azure.NewAsyncOpIncompleteError("synapse.SQLPoolWorkloadGroupDeleteFuture") 14187 return 14188 } 14189 ar.Response = future.Response() 14190 return 14191} 14192 14193// SsisEnvironment ssis environment. 14194type SsisEnvironment struct { 14195 // FolderID - Folder id which contains environment. 14196 FolderID *int64 `json:"folderId,omitempty"` 14197 // Variables - Variable in environment 14198 Variables *[]SsisVariable `json:"variables,omitempty"` 14199 // ID - Metadata id. 14200 ID *int64 `json:"id,omitempty"` 14201 // Name - Metadata name. 14202 Name *string `json:"name,omitempty"` 14203 // Description - Metadata description. 14204 Description *string `json:"description,omitempty"` 14205 // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' 14206 Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` 14207} 14208 14209// MarshalJSON is the custom marshaler for SsisEnvironment. 14210func (se SsisEnvironment) MarshalJSON() ([]byte, error) { 14211 se.Type = TypeBasicSsisObjectMetadataTypeEnvironment 14212 objectMap := make(map[string]interface{}) 14213 if se.FolderID != nil { 14214 objectMap["folderId"] = se.FolderID 14215 } 14216 if se.Variables != nil { 14217 objectMap["variables"] = se.Variables 14218 } 14219 if se.ID != nil { 14220 objectMap["id"] = se.ID 14221 } 14222 if se.Name != nil { 14223 objectMap["name"] = se.Name 14224 } 14225 if se.Description != nil { 14226 objectMap["description"] = se.Description 14227 } 14228 if se.Type != "" { 14229 objectMap["type"] = se.Type 14230 } 14231 return json.Marshal(objectMap) 14232} 14233 14234// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisEnvironment. 14235func (se SsisEnvironment) AsSsisFolder() (*SsisFolder, bool) { 14236 return nil, false 14237} 14238 14239// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisEnvironment. 14240func (se SsisEnvironment) AsSsisProject() (*SsisProject, bool) { 14241 return nil, false 14242} 14243 14244// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisEnvironment. 14245func (se SsisEnvironment) AsSsisPackage() (*SsisPackage, bool) { 14246 return nil, false 14247} 14248 14249// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisEnvironment. 14250func (se SsisEnvironment) AsSsisEnvironment() (*SsisEnvironment, bool) { 14251 return &se, true 14252} 14253 14254// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisEnvironment. 14255func (se SsisEnvironment) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { 14256 return nil, false 14257} 14258 14259// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisEnvironment. 14260func (se SsisEnvironment) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { 14261 return &se, true 14262} 14263 14264// SsisEnvironmentReference ssis environment reference. 14265type SsisEnvironmentReference struct { 14266 // ID - Environment reference id. 14267 ID *int64 `json:"id,omitempty"` 14268 // EnvironmentFolderName - Environment folder name. 14269 EnvironmentFolderName *string `json:"environmentFolderName,omitempty"` 14270 // EnvironmentName - Environment name. 14271 EnvironmentName *string `json:"environmentName,omitempty"` 14272 // ReferenceType - Reference type 14273 ReferenceType *string `json:"referenceType,omitempty"` 14274} 14275 14276// SsisFolder ssis folder. 14277type SsisFolder struct { 14278 // ID - Metadata id. 14279 ID *int64 `json:"id,omitempty"` 14280 // Name - Metadata name. 14281 Name *string `json:"name,omitempty"` 14282 // Description - Metadata description. 14283 Description *string `json:"description,omitempty"` 14284 // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' 14285 Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` 14286} 14287 14288// MarshalJSON is the custom marshaler for SsisFolder. 14289func (sf SsisFolder) MarshalJSON() ([]byte, error) { 14290 sf.Type = TypeBasicSsisObjectMetadataTypeFolder 14291 objectMap := make(map[string]interface{}) 14292 if sf.ID != nil { 14293 objectMap["id"] = sf.ID 14294 } 14295 if sf.Name != nil { 14296 objectMap["name"] = sf.Name 14297 } 14298 if sf.Description != nil { 14299 objectMap["description"] = sf.Description 14300 } 14301 if sf.Type != "" { 14302 objectMap["type"] = sf.Type 14303 } 14304 return json.Marshal(objectMap) 14305} 14306 14307// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisFolder. 14308func (sf SsisFolder) AsSsisFolder() (*SsisFolder, bool) { 14309 return &sf, true 14310} 14311 14312// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisFolder. 14313func (sf SsisFolder) AsSsisProject() (*SsisProject, bool) { 14314 return nil, false 14315} 14316 14317// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisFolder. 14318func (sf SsisFolder) AsSsisPackage() (*SsisPackage, bool) { 14319 return nil, false 14320} 14321 14322// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisFolder. 14323func (sf SsisFolder) AsSsisEnvironment() (*SsisEnvironment, bool) { 14324 return nil, false 14325} 14326 14327// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisFolder. 14328func (sf SsisFolder) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { 14329 return nil, false 14330} 14331 14332// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisFolder. 14333func (sf SsisFolder) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { 14334 return &sf, true 14335} 14336 14337// BasicSsisObjectMetadata SSIS object metadata. 14338type BasicSsisObjectMetadata interface { 14339 AsSsisFolder() (*SsisFolder, bool) 14340 AsSsisProject() (*SsisProject, bool) 14341 AsSsisPackage() (*SsisPackage, bool) 14342 AsSsisEnvironment() (*SsisEnvironment, bool) 14343 AsSsisObjectMetadata() (*SsisObjectMetadata, bool) 14344} 14345 14346// SsisObjectMetadata SSIS object metadata. 14347type SsisObjectMetadata struct { 14348 // ID - Metadata id. 14349 ID *int64 `json:"id,omitempty"` 14350 // Name - Metadata name. 14351 Name *string `json:"name,omitempty"` 14352 // Description - Metadata description. 14353 Description *string `json:"description,omitempty"` 14354 // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' 14355 Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` 14356} 14357 14358func unmarshalBasicSsisObjectMetadata(body []byte) (BasicSsisObjectMetadata, error) { 14359 var m map[string]interface{} 14360 err := json.Unmarshal(body, &m) 14361 if err != nil { 14362 return nil, err 14363 } 14364 14365 switch m["type"] { 14366 case string(TypeBasicSsisObjectMetadataTypeFolder): 14367 var sf SsisFolder 14368 err := json.Unmarshal(body, &sf) 14369 return sf, err 14370 case string(TypeBasicSsisObjectMetadataTypeProject): 14371 var sp SsisProject 14372 err := json.Unmarshal(body, &sp) 14373 return sp, err 14374 case string(TypeBasicSsisObjectMetadataTypePackage): 14375 var sp SsisPackage 14376 err := json.Unmarshal(body, &sp) 14377 return sp, err 14378 case string(TypeBasicSsisObjectMetadataTypeEnvironment): 14379 var se SsisEnvironment 14380 err := json.Unmarshal(body, &se) 14381 return se, err 14382 default: 14383 var som SsisObjectMetadata 14384 err := json.Unmarshal(body, &som) 14385 return som, err 14386 } 14387} 14388func unmarshalBasicSsisObjectMetadataArray(body []byte) ([]BasicSsisObjectMetadata, error) { 14389 var rawMessages []*json.RawMessage 14390 err := json.Unmarshal(body, &rawMessages) 14391 if err != nil { 14392 return nil, err 14393 } 14394 14395 somArray := make([]BasicSsisObjectMetadata, len(rawMessages)) 14396 14397 for index, rawMessage := range rawMessages { 14398 som, err := unmarshalBasicSsisObjectMetadata(*rawMessage) 14399 if err != nil { 14400 return nil, err 14401 } 14402 somArray[index] = som 14403 } 14404 return somArray, nil 14405} 14406 14407// MarshalJSON is the custom marshaler for SsisObjectMetadata. 14408func (som SsisObjectMetadata) MarshalJSON() ([]byte, error) { 14409 som.Type = TypeBasicSsisObjectMetadataTypeSsisObjectMetadata 14410 objectMap := make(map[string]interface{}) 14411 if som.ID != nil { 14412 objectMap["id"] = som.ID 14413 } 14414 if som.Name != nil { 14415 objectMap["name"] = som.Name 14416 } 14417 if som.Description != nil { 14418 objectMap["description"] = som.Description 14419 } 14420 if som.Type != "" { 14421 objectMap["type"] = som.Type 14422 } 14423 return json.Marshal(objectMap) 14424} 14425 14426// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. 14427func (som SsisObjectMetadata) AsSsisFolder() (*SsisFolder, bool) { 14428 return nil, false 14429} 14430 14431// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. 14432func (som SsisObjectMetadata) AsSsisProject() (*SsisProject, bool) { 14433 return nil, false 14434} 14435 14436// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. 14437func (som SsisObjectMetadata) AsSsisPackage() (*SsisPackage, bool) { 14438 return nil, false 14439} 14440 14441// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. 14442func (som SsisObjectMetadata) AsSsisEnvironment() (*SsisEnvironment, bool) { 14443 return nil, false 14444} 14445 14446// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. 14447func (som SsisObjectMetadata) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { 14448 return &som, true 14449} 14450 14451// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisObjectMetadata. 14452func (som SsisObjectMetadata) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { 14453 return &som, true 14454} 14455 14456// SsisObjectMetadataListResponse a list of SSIS object metadata. 14457type SsisObjectMetadataListResponse struct { 14458 autorest.Response `json:"-"` 14459 // Value - List of SSIS object metadata. 14460 Value *[]BasicSsisObjectMetadata `json:"value,omitempty"` 14461 // NextLink - The link to the next page of results, if any remaining results exist. 14462 NextLink *string `json:"nextLink,omitempty"` 14463} 14464 14465// UnmarshalJSON is the custom unmarshaler for SsisObjectMetadataListResponse struct. 14466func (somlr *SsisObjectMetadataListResponse) UnmarshalJSON(body []byte) error { 14467 var m map[string]*json.RawMessage 14468 err := json.Unmarshal(body, &m) 14469 if err != nil { 14470 return err 14471 } 14472 for k, v := range m { 14473 switch k { 14474 case "value": 14475 if v != nil { 14476 value, err := unmarshalBasicSsisObjectMetadataArray(*v) 14477 if err != nil { 14478 return err 14479 } 14480 somlr.Value = &value 14481 } 14482 case "nextLink": 14483 if v != nil { 14484 var nextLink string 14485 err = json.Unmarshal(*v, &nextLink) 14486 if err != nil { 14487 return err 14488 } 14489 somlr.NextLink = &nextLink 14490 } 14491 } 14492 } 14493 14494 return nil 14495} 14496 14497// SsisObjectMetadataStatusResponse the status of the operation. 14498type SsisObjectMetadataStatusResponse struct { 14499 autorest.Response `json:"-"` 14500 // Status - The status of the operation. 14501 Status *string `json:"status,omitempty"` 14502 // Name - The operation name. 14503 Name *string `json:"name,omitempty"` 14504 // Properties - The operation properties. 14505 Properties *string `json:"properties,omitempty"` 14506 // Error - The operation error message. 14507 Error *string `json:"error,omitempty"` 14508} 14509 14510// SsisPackage ssis Package. 14511type SsisPackage struct { 14512 // FolderID - Folder id which contains package. 14513 FolderID *int64 `json:"folderId,omitempty"` 14514 // ProjectVersion - Project version which contains package. 14515 ProjectVersion *int64 `json:"projectVersion,omitempty"` 14516 // ProjectID - Project id which contains package. 14517 ProjectID *int64 `json:"projectId,omitempty"` 14518 // Parameters - Parameters in package 14519 Parameters *[]SsisParameter `json:"parameters,omitempty"` 14520 // ID - Metadata id. 14521 ID *int64 `json:"id,omitempty"` 14522 // Name - Metadata name. 14523 Name *string `json:"name,omitempty"` 14524 // Description - Metadata description. 14525 Description *string `json:"description,omitempty"` 14526 // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' 14527 Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` 14528} 14529 14530// MarshalJSON is the custom marshaler for SsisPackage. 14531func (sp SsisPackage) MarshalJSON() ([]byte, error) { 14532 sp.Type = TypeBasicSsisObjectMetadataTypePackage 14533 objectMap := make(map[string]interface{}) 14534 if sp.FolderID != nil { 14535 objectMap["folderId"] = sp.FolderID 14536 } 14537 if sp.ProjectVersion != nil { 14538 objectMap["projectVersion"] = sp.ProjectVersion 14539 } 14540 if sp.ProjectID != nil { 14541 objectMap["projectId"] = sp.ProjectID 14542 } 14543 if sp.Parameters != nil { 14544 objectMap["parameters"] = sp.Parameters 14545 } 14546 if sp.ID != nil { 14547 objectMap["id"] = sp.ID 14548 } 14549 if sp.Name != nil { 14550 objectMap["name"] = sp.Name 14551 } 14552 if sp.Description != nil { 14553 objectMap["description"] = sp.Description 14554 } 14555 if sp.Type != "" { 14556 objectMap["type"] = sp.Type 14557 } 14558 return json.Marshal(objectMap) 14559} 14560 14561// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisPackage. 14562func (sp SsisPackage) AsSsisFolder() (*SsisFolder, bool) { 14563 return nil, false 14564} 14565 14566// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisPackage. 14567func (sp SsisPackage) AsSsisProject() (*SsisProject, bool) { 14568 return nil, false 14569} 14570 14571// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisPackage. 14572func (sp SsisPackage) AsSsisPackage() (*SsisPackage, bool) { 14573 return &sp, true 14574} 14575 14576// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisPackage. 14577func (sp SsisPackage) AsSsisEnvironment() (*SsisEnvironment, bool) { 14578 return nil, false 14579} 14580 14581// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisPackage. 14582func (sp SsisPackage) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { 14583 return nil, false 14584} 14585 14586// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisPackage. 14587func (sp SsisPackage) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { 14588 return &sp, true 14589} 14590 14591// SsisParameter ssis parameter. 14592type SsisParameter struct { 14593 // ID - Parameter id. 14594 ID *int64 `json:"id,omitempty"` 14595 // Name - Parameter name. 14596 Name *string `json:"name,omitempty"` 14597 // Description - Parameter description. 14598 Description *string `json:"description,omitempty"` 14599 // DataType - Parameter type. 14600 DataType *string `json:"dataType,omitempty"` 14601 // Required - Whether parameter is required. 14602 Required *bool `json:"required,omitempty"` 14603 // Sensitive - Whether parameter is sensitive. 14604 Sensitive *bool `json:"sensitive,omitempty"` 14605 // DesignDefaultValue - Design default value of parameter. 14606 DesignDefaultValue *string `json:"designDefaultValue,omitempty"` 14607 // DefaultValue - Default value of parameter. 14608 DefaultValue *string `json:"defaultValue,omitempty"` 14609 // SensitiveDefaultValue - Default sensitive value of parameter. 14610 SensitiveDefaultValue *string `json:"sensitiveDefaultValue,omitempty"` 14611 // ValueType - Parameter value type. 14612 ValueType *string `json:"valueType,omitempty"` 14613 // ValueSet - Parameter value set. 14614 ValueSet *bool `json:"valueSet,omitempty"` 14615 // Variable - Parameter reference variable. 14616 Variable *string `json:"variable,omitempty"` 14617} 14618 14619// SsisProject ssis project. 14620type SsisProject struct { 14621 // FolderID - Folder id which contains project. 14622 FolderID *int64 `json:"folderId,omitempty"` 14623 // Version - Project version. 14624 Version *int64 `json:"version,omitempty"` 14625 // EnvironmentRefs - Environment reference in project 14626 EnvironmentRefs *[]SsisEnvironmentReference `json:"environmentRefs,omitempty"` 14627 // Parameters - Parameters in project 14628 Parameters *[]SsisParameter `json:"parameters,omitempty"` 14629 // ID - Metadata id. 14630 ID *int64 `json:"id,omitempty"` 14631 // Name - Metadata name. 14632 Name *string `json:"name,omitempty"` 14633 // Description - Metadata description. 14634 Description *string `json:"description,omitempty"` 14635 // Type - Possible values include: 'TypeBasicSsisObjectMetadataTypeSsisObjectMetadata', 'TypeBasicSsisObjectMetadataTypeFolder', 'TypeBasicSsisObjectMetadataTypeProject', 'TypeBasicSsisObjectMetadataTypePackage', 'TypeBasicSsisObjectMetadataTypeEnvironment' 14636 Type TypeBasicSsisObjectMetadata `json:"type,omitempty"` 14637} 14638 14639// MarshalJSON is the custom marshaler for SsisProject. 14640func (sp SsisProject) MarshalJSON() ([]byte, error) { 14641 sp.Type = TypeBasicSsisObjectMetadataTypeProject 14642 objectMap := make(map[string]interface{}) 14643 if sp.FolderID != nil { 14644 objectMap["folderId"] = sp.FolderID 14645 } 14646 if sp.Version != nil { 14647 objectMap["version"] = sp.Version 14648 } 14649 if sp.EnvironmentRefs != nil { 14650 objectMap["environmentRefs"] = sp.EnvironmentRefs 14651 } 14652 if sp.Parameters != nil { 14653 objectMap["parameters"] = sp.Parameters 14654 } 14655 if sp.ID != nil { 14656 objectMap["id"] = sp.ID 14657 } 14658 if sp.Name != nil { 14659 objectMap["name"] = sp.Name 14660 } 14661 if sp.Description != nil { 14662 objectMap["description"] = sp.Description 14663 } 14664 if sp.Type != "" { 14665 objectMap["type"] = sp.Type 14666 } 14667 return json.Marshal(objectMap) 14668} 14669 14670// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisProject. 14671func (sp SsisProject) AsSsisFolder() (*SsisFolder, bool) { 14672 return nil, false 14673} 14674 14675// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisProject. 14676func (sp SsisProject) AsSsisProject() (*SsisProject, bool) { 14677 return &sp, true 14678} 14679 14680// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisProject. 14681func (sp SsisProject) AsSsisPackage() (*SsisPackage, bool) { 14682 return nil, false 14683} 14684 14685// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisProject. 14686func (sp SsisProject) AsSsisEnvironment() (*SsisEnvironment, bool) { 14687 return nil, false 14688} 14689 14690// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisProject. 14691func (sp SsisProject) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) { 14692 return nil, false 14693} 14694 14695// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisProject. 14696func (sp SsisProject) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) { 14697 return &sp, true 14698} 14699 14700// SsisVariable ssis variable. 14701type SsisVariable struct { 14702 // ID - Variable id. 14703 ID *int64 `json:"id,omitempty"` 14704 // Name - Variable name. 14705 Name *string `json:"name,omitempty"` 14706 // Description - Variable description. 14707 Description *string `json:"description,omitempty"` 14708 // DataType - Variable type. 14709 DataType *string `json:"dataType,omitempty"` 14710 // Sensitive - Whether variable is sensitive. 14711 Sensitive *bool `json:"sensitive,omitempty"` 14712 // Value - Variable value. 14713 Value *string `json:"value,omitempty"` 14714 // SensitiveValue - Variable sensitive value. 14715 SensitiveValue *string `json:"sensitiveValue,omitempty"` 14716} 14717 14718// SubResource azure Synapse nested resource, which belongs to a workspace. 14719type SubResource struct { 14720 // Etag - READ-ONLY; Resource Etag. 14721 Etag *string `json:"etag,omitempty"` 14722 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 14723 ID *string `json:"id,omitempty"` 14724 // Name - READ-ONLY; The name of the resource 14725 Name *string `json:"name,omitempty"` 14726 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 14727 Type *string `json:"type,omitempty"` 14728} 14729 14730// MarshalJSON is the custom marshaler for SubResource. 14731func (sr SubResource) MarshalJSON() ([]byte, error) { 14732 objectMap := make(map[string]interface{}) 14733 return json.Marshal(objectMap) 14734} 14735 14736// TopQueries a database query. 14737type TopQueries struct { 14738 // AggregationFunction - READ-ONLY; The function that is used to aggregate each query's metrics. Possible values include: 'QueryAggregationFunctionMin', 'QueryAggregationFunctionMax', 'QueryAggregationFunctionAvg', 'QueryAggregationFunctionSum' 14739 AggregationFunction QueryAggregationFunction `json:"aggregationFunction,omitempty"` 14740 // ExecutionType - READ-ONLY; The execution type that is used to filter the query instances that are returned. Possible values include: 'QueryExecutionTypeAny', 'QueryExecutionTypeRegular', 'QueryExecutionTypeIrregular', 'QueryExecutionTypeAborted', 'QueryExecutionTypeException' 14741 ExecutionType QueryExecutionType `json:"executionType,omitempty"` 14742 // IntervalType - READ-ONLY; The duration of the interval (ISO8601 duration format). 14743 IntervalType *string `json:"intervalType,omitempty"` 14744 // NumberOfTopQueries - READ-ONLY; The number of requested queries. 14745 NumberOfTopQueries *float64 `json:"numberOfTopQueries,omitempty"` 14746 // ObservationStartTime - READ-ONLY; The start time for queries that are returned (ISO8601 format) 14747 ObservationStartTime *date.Time `json:"observationStartTime,omitempty"` 14748 // ObservationEndTime - READ-ONLY; The end time for queries that are returned (ISO8601 format) 14749 ObservationEndTime *date.Time `json:"observationEndTime,omitempty"` 14750 // ObservedMetric - READ-ONLY; The type of metric to use for ordering the top metrics. Possible values include: 'QueryObservedMetricTypeCPU', 'QueryObservedMetricTypeIo', 'QueryObservedMetricTypeLogio', 'QueryObservedMetricTypeDuration', 'QueryObservedMetricTypeExecutionCount' 14751 ObservedMetric QueryObservedMetricType `json:"observedMetric,omitempty"` 14752 // Queries - READ-ONLY; The list of queries. 14753 Queries *[]QueryStatistic `json:"queries,omitempty"` 14754} 14755 14756// MarshalJSON is the custom marshaler for TopQueries. 14757func (tq TopQueries) MarshalJSON() ([]byte, error) { 14758 objectMap := make(map[string]interface{}) 14759 return json.Marshal(objectMap) 14760} 14761 14762// TopQueriesListResult represents the response to a get top queries request. 14763type TopQueriesListResult struct { 14764 // Value - The list of top queries. 14765 Value *[]TopQueries `json:"value,omitempty"` 14766} 14767 14768// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource 14769// which has 'tags' and a 'location' 14770type TrackedResource struct { 14771 // Tags - Resource tags. 14772 Tags map[string]*string `json:"tags"` 14773 // Location - The geo-location where the resource lives 14774 Location *string `json:"location,omitempty"` 14775 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 14776 ID *string `json:"id,omitempty"` 14777 // Name - READ-ONLY; The name of the resource 14778 Name *string `json:"name,omitempty"` 14779 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 14780 Type *string `json:"type,omitempty"` 14781} 14782 14783// MarshalJSON is the custom marshaler for TrackedResource. 14784func (tr TrackedResource) MarshalJSON() ([]byte, error) { 14785 objectMap := make(map[string]interface{}) 14786 if tr.Tags != nil { 14787 objectMap["tags"] = tr.Tags 14788 } 14789 if tr.Location != nil { 14790 objectMap["location"] = tr.Location 14791 } 14792 return json.Marshal(objectMap) 14793} 14794 14795// TransparentDataEncryption represents a Sql pool transparent data encryption configuration. 14796type TransparentDataEncryption struct { 14797 autorest.Response `json:"-"` 14798 // Location - READ-ONLY; Resource location. 14799 Location *string `json:"location,omitempty"` 14800 // TransparentDataEncryptionProperties - Represents the properties of the resource. 14801 *TransparentDataEncryptionProperties `json:"properties,omitempty"` 14802 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 14803 ID *string `json:"id,omitempty"` 14804 // Name - READ-ONLY; The name of the resource 14805 Name *string `json:"name,omitempty"` 14806 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 14807 Type *string `json:"type,omitempty"` 14808} 14809 14810// MarshalJSON is the custom marshaler for TransparentDataEncryption. 14811func (tde TransparentDataEncryption) MarshalJSON() ([]byte, error) { 14812 objectMap := make(map[string]interface{}) 14813 if tde.TransparentDataEncryptionProperties != nil { 14814 objectMap["properties"] = tde.TransparentDataEncryptionProperties 14815 } 14816 return json.Marshal(objectMap) 14817} 14818 14819// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryption struct. 14820func (tde *TransparentDataEncryption) UnmarshalJSON(body []byte) error { 14821 var m map[string]*json.RawMessage 14822 err := json.Unmarshal(body, &m) 14823 if err != nil { 14824 return err 14825 } 14826 for k, v := range m { 14827 switch k { 14828 case "location": 14829 if v != nil { 14830 var location string 14831 err = json.Unmarshal(*v, &location) 14832 if err != nil { 14833 return err 14834 } 14835 tde.Location = &location 14836 } 14837 case "properties": 14838 if v != nil { 14839 var transparentDataEncryptionProperties TransparentDataEncryptionProperties 14840 err = json.Unmarshal(*v, &transparentDataEncryptionProperties) 14841 if err != nil { 14842 return err 14843 } 14844 tde.TransparentDataEncryptionProperties = &transparentDataEncryptionProperties 14845 } 14846 case "id": 14847 if v != nil { 14848 var ID string 14849 err = json.Unmarshal(*v, &ID) 14850 if err != nil { 14851 return err 14852 } 14853 tde.ID = &ID 14854 } 14855 case "name": 14856 if v != nil { 14857 var name string 14858 err = json.Unmarshal(*v, &name) 14859 if err != nil { 14860 return err 14861 } 14862 tde.Name = &name 14863 } 14864 case "type": 14865 if v != nil { 14866 var typeVar string 14867 err = json.Unmarshal(*v, &typeVar) 14868 if err != nil { 14869 return err 14870 } 14871 tde.Type = &typeVar 14872 } 14873 } 14874 } 14875 14876 return nil 14877} 14878 14879// TransparentDataEncryptionListResult a list of transparent data encryption configurations. 14880type TransparentDataEncryptionListResult struct { 14881 autorest.Response `json:"-"` 14882 // Value - READ-ONLY; Array of results. 14883 Value *[]TransparentDataEncryption `json:"value,omitempty"` 14884 // NextLink - READ-ONLY; Link to retrieve next page of results. 14885 NextLink *string `json:"nextLink,omitempty"` 14886} 14887 14888// MarshalJSON is the custom marshaler for TransparentDataEncryptionListResult. 14889func (tdelr TransparentDataEncryptionListResult) MarshalJSON() ([]byte, error) { 14890 objectMap := make(map[string]interface{}) 14891 return json.Marshal(objectMap) 14892} 14893 14894// TransparentDataEncryptionListResultIterator provides access to a complete listing of 14895// TransparentDataEncryption values. 14896type TransparentDataEncryptionListResultIterator struct { 14897 i int 14898 page TransparentDataEncryptionListResultPage 14899} 14900 14901// NextWithContext advances to the next value. If there was an error making 14902// the request the iterator does not advance and the error is returned. 14903func (iter *TransparentDataEncryptionListResultIterator) NextWithContext(ctx context.Context) (err error) { 14904 if tracing.IsEnabled() { 14905 ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionListResultIterator.NextWithContext") 14906 defer func() { 14907 sc := -1 14908 if iter.Response().Response.Response != nil { 14909 sc = iter.Response().Response.Response.StatusCode 14910 } 14911 tracing.EndSpan(ctx, sc, err) 14912 }() 14913 } 14914 iter.i++ 14915 if iter.i < len(iter.page.Values()) { 14916 return nil 14917 } 14918 err = iter.page.NextWithContext(ctx) 14919 if err != nil { 14920 iter.i-- 14921 return err 14922 } 14923 iter.i = 0 14924 return nil 14925} 14926 14927// Next advances to the next value. If there was an error making 14928// the request the iterator does not advance and the error is returned. 14929// Deprecated: Use NextWithContext() instead. 14930func (iter *TransparentDataEncryptionListResultIterator) Next() error { 14931 return iter.NextWithContext(context.Background()) 14932} 14933 14934// NotDone returns true if the enumeration should be started or is not yet complete. 14935func (iter TransparentDataEncryptionListResultIterator) NotDone() bool { 14936 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14937} 14938 14939// Response returns the raw server response from the last page request. 14940func (iter TransparentDataEncryptionListResultIterator) Response() TransparentDataEncryptionListResult { 14941 return iter.page.Response() 14942} 14943 14944// Value returns the current value or a zero-initialized value if the 14945// iterator has advanced beyond the end of the collection. 14946func (iter TransparentDataEncryptionListResultIterator) Value() TransparentDataEncryption { 14947 if !iter.page.NotDone() { 14948 return TransparentDataEncryption{} 14949 } 14950 return iter.page.Values()[iter.i] 14951} 14952 14953// Creates a new instance of the TransparentDataEncryptionListResultIterator type. 14954func NewTransparentDataEncryptionListResultIterator(page TransparentDataEncryptionListResultPage) TransparentDataEncryptionListResultIterator { 14955 return TransparentDataEncryptionListResultIterator{page: page} 14956} 14957 14958// IsEmpty returns true if the ListResult contains no values. 14959func (tdelr TransparentDataEncryptionListResult) IsEmpty() bool { 14960 return tdelr.Value == nil || len(*tdelr.Value) == 0 14961} 14962 14963// hasNextLink returns true if the NextLink is not empty. 14964func (tdelr TransparentDataEncryptionListResult) hasNextLink() bool { 14965 return tdelr.NextLink != nil && len(*tdelr.NextLink) != 0 14966} 14967 14968// transparentDataEncryptionListResultPreparer prepares a request to retrieve the next set of results. 14969// It returns nil if no more results exist. 14970func (tdelr TransparentDataEncryptionListResult) transparentDataEncryptionListResultPreparer(ctx context.Context) (*http.Request, error) { 14971 if !tdelr.hasNextLink() { 14972 return nil, nil 14973 } 14974 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14975 autorest.AsJSON(), 14976 autorest.AsGet(), 14977 autorest.WithBaseURL(to.String(tdelr.NextLink))) 14978} 14979 14980// TransparentDataEncryptionListResultPage contains a page of TransparentDataEncryption values. 14981type TransparentDataEncryptionListResultPage struct { 14982 fn func(context.Context, TransparentDataEncryptionListResult) (TransparentDataEncryptionListResult, error) 14983 tdelr TransparentDataEncryptionListResult 14984} 14985 14986// NextWithContext advances to the next page of values. If there was an error making 14987// the request the page does not advance and the error is returned. 14988func (page *TransparentDataEncryptionListResultPage) NextWithContext(ctx context.Context) (err error) { 14989 if tracing.IsEnabled() { 14990 ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionListResultPage.NextWithContext") 14991 defer func() { 14992 sc := -1 14993 if page.Response().Response.Response != nil { 14994 sc = page.Response().Response.Response.StatusCode 14995 } 14996 tracing.EndSpan(ctx, sc, err) 14997 }() 14998 } 14999 for { 15000 next, err := page.fn(ctx, page.tdelr) 15001 if err != nil { 15002 return err 15003 } 15004 page.tdelr = next 15005 if !next.hasNextLink() || !next.IsEmpty() { 15006 break 15007 } 15008 } 15009 return nil 15010} 15011 15012// Next advances to the next page of values. If there was an error making 15013// the request the page does not advance and the error is returned. 15014// Deprecated: Use NextWithContext() instead. 15015func (page *TransparentDataEncryptionListResultPage) Next() error { 15016 return page.NextWithContext(context.Background()) 15017} 15018 15019// NotDone returns true if the page enumeration should be started or is not yet complete. 15020func (page TransparentDataEncryptionListResultPage) NotDone() bool { 15021 return !page.tdelr.IsEmpty() 15022} 15023 15024// Response returns the raw server response from the last page request. 15025func (page TransparentDataEncryptionListResultPage) Response() TransparentDataEncryptionListResult { 15026 return page.tdelr 15027} 15028 15029// Values returns the slice of values for the current page or nil if there are no values. 15030func (page TransparentDataEncryptionListResultPage) Values() []TransparentDataEncryption { 15031 if page.tdelr.IsEmpty() { 15032 return nil 15033 } 15034 return *page.tdelr.Value 15035} 15036 15037// Creates a new instance of the TransparentDataEncryptionListResultPage type. 15038func NewTransparentDataEncryptionListResultPage(cur TransparentDataEncryptionListResult, getNextPage func(context.Context, TransparentDataEncryptionListResult) (TransparentDataEncryptionListResult, error)) TransparentDataEncryptionListResultPage { 15039 return TransparentDataEncryptionListResultPage{ 15040 fn: getNextPage, 15041 tdelr: cur, 15042 } 15043} 15044 15045// TransparentDataEncryptionProperties represents the properties of a database transparent data encryption. 15046type TransparentDataEncryptionProperties struct { 15047 // Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled' 15048 Status TransparentDataEncryptionStatus `json:"status,omitempty"` 15049} 15050 15051// UpdateIntegrationRuntimeNodeRequest update integration runtime node request. 15052type UpdateIntegrationRuntimeNodeRequest struct { 15053 // ConcurrentJobsLimit - The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and maxConcurrentJobs(inclusive) are allowed. 15054 ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"` 15055} 15056 15057// UpdateIntegrationRuntimeRequest update integration runtime request. 15058type UpdateIntegrationRuntimeRequest struct { 15059 // AutoUpdate - Enables or disables the auto-update feature of the self-hosted integration runtime. See https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: 'IntegrationRuntimeAutoUpdateOn', 'IntegrationRuntimeAutoUpdateOff' 15060 AutoUpdate IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"` 15061 // UpdateDelayOffset - The time offset (in hours) in the day, e.g., PT03H is 3 hours. The integration runtime auto update will happen on that time. 15062 UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"` 15063} 15064 15065// UserAssignedManagedIdentity user Assigned Managed Identity 15066type UserAssignedManagedIdentity struct { 15067 // ClientID - READ-ONLY; The client ID. 15068 ClientID *uuid.UUID `json:"clientId,omitempty"` 15069 // PrincipalID - READ-ONLY; The principal ID. 15070 PrincipalID *uuid.UUID `json:"principalId,omitempty"` 15071} 15072 15073// MarshalJSON is the custom marshaler for UserAssignedManagedIdentity. 15074func (uami UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { 15075 objectMap := make(map[string]interface{}) 15076 return json.Marshal(objectMap) 15077} 15078 15079// VirtualNetworkProfile virtual Network Profile 15080type VirtualNetworkProfile struct { 15081 // ComputeSubnetID - Subnet ID used for computes in workspace 15082 ComputeSubnetID *string `json:"computeSubnetId,omitempty"` 15083} 15084 15085// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring 15086// scans. 15087type VulnerabilityAssessmentRecurringScansProperties struct { 15088 // IsEnabled - Recurring scans state. 15089 IsEnabled *bool `json:"isEnabled,omitempty"` 15090 // EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators. 15091 EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` 15092 // Emails - Specifies an array of e-mail addresses to which the scan notification is sent. 15093 Emails *[]string `json:"emails,omitempty"` 15094} 15095 15096// VulnerabilityAssessmentScanError properties of a vulnerability assessment scan error. 15097type VulnerabilityAssessmentScanError struct { 15098 // Code - READ-ONLY; The error code. 15099 Code *string `json:"code,omitempty"` 15100 // Message - READ-ONLY; The error message. 15101 Message *string `json:"message,omitempty"` 15102} 15103 15104// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanError. 15105func (vase VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error) { 15106 objectMap := make(map[string]interface{}) 15107 return json.Marshal(objectMap) 15108} 15109 15110// VulnerabilityAssessmentScanRecord a vulnerability assessment scan record. 15111type VulnerabilityAssessmentScanRecord struct { 15112 autorest.Response `json:"-"` 15113 // VulnerabilityAssessmentScanRecordProperties - Resource properties. 15114 *VulnerabilityAssessmentScanRecordProperties `json:"properties,omitempty"` 15115 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 15116 ID *string `json:"id,omitempty"` 15117 // Name - READ-ONLY; The name of the resource 15118 Name *string `json:"name,omitempty"` 15119 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 15120 Type *string `json:"type,omitempty"` 15121} 15122 15123// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecord. 15124func (vasr VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error) { 15125 objectMap := make(map[string]interface{}) 15126 if vasr.VulnerabilityAssessmentScanRecordProperties != nil { 15127 objectMap["properties"] = vasr.VulnerabilityAssessmentScanRecordProperties 15128 } 15129 return json.Marshal(objectMap) 15130} 15131 15132// UnmarshalJSON is the custom unmarshaler for VulnerabilityAssessmentScanRecord struct. 15133func (vasr *VulnerabilityAssessmentScanRecord) UnmarshalJSON(body []byte) error { 15134 var m map[string]*json.RawMessage 15135 err := json.Unmarshal(body, &m) 15136 if err != nil { 15137 return err 15138 } 15139 for k, v := range m { 15140 switch k { 15141 case "properties": 15142 if v != nil { 15143 var vulnerabilityAssessmentScanRecordProperties VulnerabilityAssessmentScanRecordProperties 15144 err = json.Unmarshal(*v, &vulnerabilityAssessmentScanRecordProperties) 15145 if err != nil { 15146 return err 15147 } 15148 vasr.VulnerabilityAssessmentScanRecordProperties = &vulnerabilityAssessmentScanRecordProperties 15149 } 15150 case "id": 15151 if v != nil { 15152 var ID string 15153 err = json.Unmarshal(*v, &ID) 15154 if err != nil { 15155 return err 15156 } 15157 vasr.ID = &ID 15158 } 15159 case "name": 15160 if v != nil { 15161 var name string 15162 err = json.Unmarshal(*v, &name) 15163 if err != nil { 15164 return err 15165 } 15166 vasr.Name = &name 15167 } 15168 case "type": 15169 if v != nil { 15170 var typeVar string 15171 err = json.Unmarshal(*v, &typeVar) 15172 if err != nil { 15173 return err 15174 } 15175 vasr.Type = &typeVar 15176 } 15177 } 15178 } 15179 15180 return nil 15181} 15182 15183// VulnerabilityAssessmentScanRecordListResult a list of vulnerability assessment scan records. 15184type VulnerabilityAssessmentScanRecordListResult struct { 15185 autorest.Response `json:"-"` 15186 // Value - READ-ONLY; Array of results. 15187 Value *[]VulnerabilityAssessmentScanRecord `json:"value,omitempty"` 15188 // NextLink - READ-ONLY; Link to retrieve next page of results. 15189 NextLink *string `json:"nextLink,omitempty"` 15190} 15191 15192// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecordListResult. 15193func (vasrlr VulnerabilityAssessmentScanRecordListResult) MarshalJSON() ([]byte, error) { 15194 objectMap := make(map[string]interface{}) 15195 return json.Marshal(objectMap) 15196} 15197 15198// VulnerabilityAssessmentScanRecordListResultIterator provides access to a complete listing of 15199// VulnerabilityAssessmentScanRecord values. 15200type VulnerabilityAssessmentScanRecordListResultIterator struct { 15201 i int 15202 page VulnerabilityAssessmentScanRecordListResultPage 15203} 15204 15205// NextWithContext advances to the next value. If there was an error making 15206// the request the iterator does not advance and the error is returned. 15207func (iter *VulnerabilityAssessmentScanRecordListResultIterator) NextWithContext(ctx context.Context) (err error) { 15208 if tracing.IsEnabled() { 15209 ctx = tracing.StartSpan(ctx, fqdn+"/VulnerabilityAssessmentScanRecordListResultIterator.NextWithContext") 15210 defer func() { 15211 sc := -1 15212 if iter.Response().Response.Response != nil { 15213 sc = iter.Response().Response.Response.StatusCode 15214 } 15215 tracing.EndSpan(ctx, sc, err) 15216 }() 15217 } 15218 iter.i++ 15219 if iter.i < len(iter.page.Values()) { 15220 return nil 15221 } 15222 err = iter.page.NextWithContext(ctx) 15223 if err != nil { 15224 iter.i-- 15225 return err 15226 } 15227 iter.i = 0 15228 return nil 15229} 15230 15231// Next advances to the next value. If there was an error making 15232// the request the iterator does not advance and the error is returned. 15233// Deprecated: Use NextWithContext() instead. 15234func (iter *VulnerabilityAssessmentScanRecordListResultIterator) Next() error { 15235 return iter.NextWithContext(context.Background()) 15236} 15237 15238// NotDone returns true if the enumeration should be started or is not yet complete. 15239func (iter VulnerabilityAssessmentScanRecordListResultIterator) NotDone() bool { 15240 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15241} 15242 15243// Response returns the raw server response from the last page request. 15244func (iter VulnerabilityAssessmentScanRecordListResultIterator) Response() VulnerabilityAssessmentScanRecordListResult { 15245 return iter.page.Response() 15246} 15247 15248// Value returns the current value or a zero-initialized value if the 15249// iterator has advanced beyond the end of the collection. 15250func (iter VulnerabilityAssessmentScanRecordListResultIterator) Value() VulnerabilityAssessmentScanRecord { 15251 if !iter.page.NotDone() { 15252 return VulnerabilityAssessmentScanRecord{} 15253 } 15254 return iter.page.Values()[iter.i] 15255} 15256 15257// Creates a new instance of the VulnerabilityAssessmentScanRecordListResultIterator type. 15258func NewVulnerabilityAssessmentScanRecordListResultIterator(page VulnerabilityAssessmentScanRecordListResultPage) VulnerabilityAssessmentScanRecordListResultIterator { 15259 return VulnerabilityAssessmentScanRecordListResultIterator{page: page} 15260} 15261 15262// IsEmpty returns true if the ListResult contains no values. 15263func (vasrlr VulnerabilityAssessmentScanRecordListResult) IsEmpty() bool { 15264 return vasrlr.Value == nil || len(*vasrlr.Value) == 0 15265} 15266 15267// hasNextLink returns true if the NextLink is not empty. 15268func (vasrlr VulnerabilityAssessmentScanRecordListResult) hasNextLink() bool { 15269 return vasrlr.NextLink != nil && len(*vasrlr.NextLink) != 0 15270} 15271 15272// vulnerabilityAssessmentScanRecordListResultPreparer prepares a request to retrieve the next set of results. 15273// It returns nil if no more results exist. 15274func (vasrlr VulnerabilityAssessmentScanRecordListResult) vulnerabilityAssessmentScanRecordListResultPreparer(ctx context.Context) (*http.Request, error) { 15275 if !vasrlr.hasNextLink() { 15276 return nil, nil 15277 } 15278 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15279 autorest.AsJSON(), 15280 autorest.AsGet(), 15281 autorest.WithBaseURL(to.String(vasrlr.NextLink))) 15282} 15283 15284// VulnerabilityAssessmentScanRecordListResultPage contains a page of VulnerabilityAssessmentScanRecord 15285// values. 15286type VulnerabilityAssessmentScanRecordListResultPage struct { 15287 fn func(context.Context, VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error) 15288 vasrlr VulnerabilityAssessmentScanRecordListResult 15289} 15290 15291// NextWithContext advances to the next page of values. If there was an error making 15292// the request the page does not advance and the error is returned. 15293func (page *VulnerabilityAssessmentScanRecordListResultPage) NextWithContext(ctx context.Context) (err error) { 15294 if tracing.IsEnabled() { 15295 ctx = tracing.StartSpan(ctx, fqdn+"/VulnerabilityAssessmentScanRecordListResultPage.NextWithContext") 15296 defer func() { 15297 sc := -1 15298 if page.Response().Response.Response != nil { 15299 sc = page.Response().Response.Response.StatusCode 15300 } 15301 tracing.EndSpan(ctx, sc, err) 15302 }() 15303 } 15304 for { 15305 next, err := page.fn(ctx, page.vasrlr) 15306 if err != nil { 15307 return err 15308 } 15309 page.vasrlr = next 15310 if !next.hasNextLink() || !next.IsEmpty() { 15311 break 15312 } 15313 } 15314 return nil 15315} 15316 15317// Next advances to the next page of values. If there was an error making 15318// the request the page does not advance and the error is returned. 15319// Deprecated: Use NextWithContext() instead. 15320func (page *VulnerabilityAssessmentScanRecordListResultPage) Next() error { 15321 return page.NextWithContext(context.Background()) 15322} 15323 15324// NotDone returns true if the page enumeration should be started or is not yet complete. 15325func (page VulnerabilityAssessmentScanRecordListResultPage) NotDone() bool { 15326 return !page.vasrlr.IsEmpty() 15327} 15328 15329// Response returns the raw server response from the last page request. 15330func (page VulnerabilityAssessmentScanRecordListResultPage) Response() VulnerabilityAssessmentScanRecordListResult { 15331 return page.vasrlr 15332} 15333 15334// Values returns the slice of values for the current page or nil if there are no values. 15335func (page VulnerabilityAssessmentScanRecordListResultPage) Values() []VulnerabilityAssessmentScanRecord { 15336 if page.vasrlr.IsEmpty() { 15337 return nil 15338 } 15339 return *page.vasrlr.Value 15340} 15341 15342// Creates a new instance of the VulnerabilityAssessmentScanRecordListResultPage type. 15343func NewVulnerabilityAssessmentScanRecordListResultPage(cur VulnerabilityAssessmentScanRecordListResult, getNextPage func(context.Context, VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error)) VulnerabilityAssessmentScanRecordListResultPage { 15344 return VulnerabilityAssessmentScanRecordListResultPage{ 15345 fn: getNextPage, 15346 vasrlr: cur, 15347 } 15348} 15349 15350// VulnerabilityAssessmentScanRecordProperties properties of a vulnerability assessment scan record. 15351type VulnerabilityAssessmentScanRecordProperties struct { 15352 // ScanID - READ-ONLY; The scan ID. 15353 ScanID *string `json:"scanId,omitempty"` 15354 // TriggerType - READ-ONLY; The scan trigger type. Possible values include: 'VulnerabilityAssessmentScanTriggerTypeOnDemand', 'VulnerabilityAssessmentScanTriggerTypeRecurring' 15355 TriggerType VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty"` 15356 // State - READ-ONLY; The scan status. Possible values include: 'VulnerabilityAssessmentScanStatePassed', 'VulnerabilityAssessmentScanStateFailed', 'VulnerabilityAssessmentScanStateFailedToRun', 'VulnerabilityAssessmentScanStateInProgress' 15357 State VulnerabilityAssessmentScanState `json:"state,omitempty"` 15358 // StartTime - READ-ONLY; The scan start time (UTC). 15359 StartTime *date.Time `json:"startTime,omitempty"` 15360 // EndTime - READ-ONLY; The scan end time (UTC). 15361 EndTime *date.Time `json:"endTime,omitempty"` 15362 // Errors - READ-ONLY; The scan errors. 15363 Errors *[]VulnerabilityAssessmentScanError `json:"errors,omitempty"` 15364 // StorageContainerPath - READ-ONLY; The scan results storage container path. 15365 StorageContainerPath *string `json:"storageContainerPath,omitempty"` 15366 // NumberOfFailedSecurityChecks - READ-ONLY; The number of failed security checks. 15367 NumberOfFailedSecurityChecks *int32 `json:"numberOfFailedSecurityChecks,omitempty"` 15368} 15369 15370// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecordProperties. 15371func (vasrp VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error) { 15372 objectMap := make(map[string]interface{}) 15373 return json.Marshal(objectMap) 15374} 15375 15376// WorkloadClassifier workload classifier operations for a data warehouse 15377type WorkloadClassifier struct { 15378 autorest.Response `json:"-"` 15379 // WorkloadClassifierProperties - Resource properties. 15380 *WorkloadClassifierProperties `json:"properties,omitempty"` 15381 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 15382 ID *string `json:"id,omitempty"` 15383 // Name - READ-ONLY; The name of the resource 15384 Name *string `json:"name,omitempty"` 15385 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 15386 Type *string `json:"type,omitempty"` 15387} 15388 15389// MarshalJSON is the custom marshaler for WorkloadClassifier. 15390func (wc WorkloadClassifier) MarshalJSON() ([]byte, error) { 15391 objectMap := make(map[string]interface{}) 15392 if wc.WorkloadClassifierProperties != nil { 15393 objectMap["properties"] = wc.WorkloadClassifierProperties 15394 } 15395 return json.Marshal(objectMap) 15396} 15397 15398// UnmarshalJSON is the custom unmarshaler for WorkloadClassifier struct. 15399func (wc *WorkloadClassifier) UnmarshalJSON(body []byte) error { 15400 var m map[string]*json.RawMessage 15401 err := json.Unmarshal(body, &m) 15402 if err != nil { 15403 return err 15404 } 15405 for k, v := range m { 15406 switch k { 15407 case "properties": 15408 if v != nil { 15409 var workloadClassifierProperties WorkloadClassifierProperties 15410 err = json.Unmarshal(*v, &workloadClassifierProperties) 15411 if err != nil { 15412 return err 15413 } 15414 wc.WorkloadClassifierProperties = &workloadClassifierProperties 15415 } 15416 case "id": 15417 if v != nil { 15418 var ID string 15419 err = json.Unmarshal(*v, &ID) 15420 if err != nil { 15421 return err 15422 } 15423 wc.ID = &ID 15424 } 15425 case "name": 15426 if v != nil { 15427 var name string 15428 err = json.Unmarshal(*v, &name) 15429 if err != nil { 15430 return err 15431 } 15432 wc.Name = &name 15433 } 15434 case "type": 15435 if v != nil { 15436 var typeVar string 15437 err = json.Unmarshal(*v, &typeVar) 15438 if err != nil { 15439 return err 15440 } 15441 wc.Type = &typeVar 15442 } 15443 } 15444 } 15445 15446 return nil 15447} 15448 15449// WorkloadClassifierListResult a list of workload classifiers for a workload group. 15450type WorkloadClassifierListResult struct { 15451 autorest.Response `json:"-"` 15452 // Value - READ-ONLY; Array of results. 15453 Value *[]WorkloadClassifier `json:"value,omitempty"` 15454 // NextLink - READ-ONLY; Link to retrieve next page of results. 15455 NextLink *string `json:"nextLink,omitempty"` 15456} 15457 15458// MarshalJSON is the custom marshaler for WorkloadClassifierListResult. 15459func (wclr WorkloadClassifierListResult) MarshalJSON() ([]byte, error) { 15460 objectMap := make(map[string]interface{}) 15461 return json.Marshal(objectMap) 15462} 15463 15464// WorkloadClassifierListResultIterator provides access to a complete listing of WorkloadClassifier values. 15465type WorkloadClassifierListResultIterator struct { 15466 i int 15467 page WorkloadClassifierListResultPage 15468} 15469 15470// NextWithContext advances to the next value. If there was an error making 15471// the request the iterator does not advance and the error is returned. 15472func (iter *WorkloadClassifierListResultIterator) NextWithContext(ctx context.Context) (err error) { 15473 if tracing.IsEnabled() { 15474 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifierListResultIterator.NextWithContext") 15475 defer func() { 15476 sc := -1 15477 if iter.Response().Response.Response != nil { 15478 sc = iter.Response().Response.Response.StatusCode 15479 } 15480 tracing.EndSpan(ctx, sc, err) 15481 }() 15482 } 15483 iter.i++ 15484 if iter.i < len(iter.page.Values()) { 15485 return nil 15486 } 15487 err = iter.page.NextWithContext(ctx) 15488 if err != nil { 15489 iter.i-- 15490 return err 15491 } 15492 iter.i = 0 15493 return nil 15494} 15495 15496// Next advances to the next value. If there was an error making 15497// the request the iterator does not advance and the error is returned. 15498// Deprecated: Use NextWithContext() instead. 15499func (iter *WorkloadClassifierListResultIterator) Next() error { 15500 return iter.NextWithContext(context.Background()) 15501} 15502 15503// NotDone returns true if the enumeration should be started or is not yet complete. 15504func (iter WorkloadClassifierListResultIterator) NotDone() bool { 15505 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15506} 15507 15508// Response returns the raw server response from the last page request. 15509func (iter WorkloadClassifierListResultIterator) Response() WorkloadClassifierListResult { 15510 return iter.page.Response() 15511} 15512 15513// Value returns the current value or a zero-initialized value if the 15514// iterator has advanced beyond the end of the collection. 15515func (iter WorkloadClassifierListResultIterator) Value() WorkloadClassifier { 15516 if !iter.page.NotDone() { 15517 return WorkloadClassifier{} 15518 } 15519 return iter.page.Values()[iter.i] 15520} 15521 15522// Creates a new instance of the WorkloadClassifierListResultIterator type. 15523func NewWorkloadClassifierListResultIterator(page WorkloadClassifierListResultPage) WorkloadClassifierListResultIterator { 15524 return WorkloadClassifierListResultIterator{page: page} 15525} 15526 15527// IsEmpty returns true if the ListResult contains no values. 15528func (wclr WorkloadClassifierListResult) IsEmpty() bool { 15529 return wclr.Value == nil || len(*wclr.Value) == 0 15530} 15531 15532// hasNextLink returns true if the NextLink is not empty. 15533func (wclr WorkloadClassifierListResult) hasNextLink() bool { 15534 return wclr.NextLink != nil && len(*wclr.NextLink) != 0 15535} 15536 15537// workloadClassifierListResultPreparer prepares a request to retrieve the next set of results. 15538// It returns nil if no more results exist. 15539func (wclr WorkloadClassifierListResult) workloadClassifierListResultPreparer(ctx context.Context) (*http.Request, error) { 15540 if !wclr.hasNextLink() { 15541 return nil, nil 15542 } 15543 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15544 autorest.AsJSON(), 15545 autorest.AsGet(), 15546 autorest.WithBaseURL(to.String(wclr.NextLink))) 15547} 15548 15549// WorkloadClassifierListResultPage contains a page of WorkloadClassifier values. 15550type WorkloadClassifierListResultPage struct { 15551 fn func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error) 15552 wclr WorkloadClassifierListResult 15553} 15554 15555// NextWithContext advances to the next page of values. If there was an error making 15556// the request the page does not advance and the error is returned. 15557func (page *WorkloadClassifierListResultPage) NextWithContext(ctx context.Context) (err error) { 15558 if tracing.IsEnabled() { 15559 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifierListResultPage.NextWithContext") 15560 defer func() { 15561 sc := -1 15562 if page.Response().Response.Response != nil { 15563 sc = page.Response().Response.Response.StatusCode 15564 } 15565 tracing.EndSpan(ctx, sc, err) 15566 }() 15567 } 15568 for { 15569 next, err := page.fn(ctx, page.wclr) 15570 if err != nil { 15571 return err 15572 } 15573 page.wclr = next 15574 if !next.hasNextLink() || !next.IsEmpty() { 15575 break 15576 } 15577 } 15578 return nil 15579} 15580 15581// Next advances to the next page of values. If there was an error making 15582// the request the page does not advance and the error is returned. 15583// Deprecated: Use NextWithContext() instead. 15584func (page *WorkloadClassifierListResultPage) Next() error { 15585 return page.NextWithContext(context.Background()) 15586} 15587 15588// NotDone returns true if the page enumeration should be started or is not yet complete. 15589func (page WorkloadClassifierListResultPage) NotDone() bool { 15590 return !page.wclr.IsEmpty() 15591} 15592 15593// Response returns the raw server response from the last page request. 15594func (page WorkloadClassifierListResultPage) Response() WorkloadClassifierListResult { 15595 return page.wclr 15596} 15597 15598// Values returns the slice of values for the current page or nil if there are no values. 15599func (page WorkloadClassifierListResultPage) Values() []WorkloadClassifier { 15600 if page.wclr.IsEmpty() { 15601 return nil 15602 } 15603 return *page.wclr.Value 15604} 15605 15606// Creates a new instance of the WorkloadClassifierListResultPage type. 15607func NewWorkloadClassifierListResultPage(cur WorkloadClassifierListResult, getNextPage func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error)) WorkloadClassifierListResultPage { 15608 return WorkloadClassifierListResultPage{ 15609 fn: getNextPage, 15610 wclr: cur, 15611 } 15612} 15613 15614// WorkloadClassifierProperties workload classifier definition. For more information look at 15615// sys.workload_management_workload_classifiers (DMV). 15616type WorkloadClassifierProperties struct { 15617 // MemberName - The workload classifier member name. 15618 MemberName *string `json:"memberName,omitempty"` 15619 // Label - The workload classifier label. 15620 Label *string `json:"label,omitempty"` 15621 // Context - The workload classifier context. 15622 Context *string `json:"context,omitempty"` 15623 // StartTime - The workload classifier start time for classification. 15624 StartTime *string `json:"startTime,omitempty"` 15625 // EndTime - The workload classifier end time for classification. 15626 EndTime *string `json:"endTime,omitempty"` 15627 // Importance - The workload classifier importance. 15628 Importance *string `json:"importance,omitempty"` 15629} 15630 15631// WorkloadGroup workload group operations for a sql pool 15632type WorkloadGroup struct { 15633 autorest.Response `json:"-"` 15634 // WorkloadGroupProperties - Resource properties. 15635 *WorkloadGroupProperties `json:"properties,omitempty"` 15636 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 15637 ID *string `json:"id,omitempty"` 15638 // Name - READ-ONLY; The name of the resource 15639 Name *string `json:"name,omitempty"` 15640 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 15641 Type *string `json:"type,omitempty"` 15642} 15643 15644// MarshalJSON is the custom marshaler for WorkloadGroup. 15645func (wg WorkloadGroup) MarshalJSON() ([]byte, error) { 15646 objectMap := make(map[string]interface{}) 15647 if wg.WorkloadGroupProperties != nil { 15648 objectMap["properties"] = wg.WorkloadGroupProperties 15649 } 15650 return json.Marshal(objectMap) 15651} 15652 15653// UnmarshalJSON is the custom unmarshaler for WorkloadGroup struct. 15654func (wg *WorkloadGroup) UnmarshalJSON(body []byte) error { 15655 var m map[string]*json.RawMessage 15656 err := json.Unmarshal(body, &m) 15657 if err != nil { 15658 return err 15659 } 15660 for k, v := range m { 15661 switch k { 15662 case "properties": 15663 if v != nil { 15664 var workloadGroupProperties WorkloadGroupProperties 15665 err = json.Unmarshal(*v, &workloadGroupProperties) 15666 if err != nil { 15667 return err 15668 } 15669 wg.WorkloadGroupProperties = &workloadGroupProperties 15670 } 15671 case "id": 15672 if v != nil { 15673 var ID string 15674 err = json.Unmarshal(*v, &ID) 15675 if err != nil { 15676 return err 15677 } 15678 wg.ID = &ID 15679 } 15680 case "name": 15681 if v != nil { 15682 var name string 15683 err = json.Unmarshal(*v, &name) 15684 if err != nil { 15685 return err 15686 } 15687 wg.Name = &name 15688 } 15689 case "type": 15690 if v != nil { 15691 var typeVar string 15692 err = json.Unmarshal(*v, &typeVar) 15693 if err != nil { 15694 return err 15695 } 15696 wg.Type = &typeVar 15697 } 15698 } 15699 } 15700 15701 return nil 15702} 15703 15704// WorkloadGroupListResult a list of workload groups. 15705type WorkloadGroupListResult struct { 15706 autorest.Response `json:"-"` 15707 // Value - READ-ONLY; Array of results. 15708 Value *[]WorkloadGroup `json:"value,omitempty"` 15709 // NextLink - READ-ONLY; Link to retrieve next page of results. 15710 NextLink *string `json:"nextLink,omitempty"` 15711} 15712 15713// MarshalJSON is the custom marshaler for WorkloadGroupListResult. 15714func (wglr WorkloadGroupListResult) MarshalJSON() ([]byte, error) { 15715 objectMap := make(map[string]interface{}) 15716 return json.Marshal(objectMap) 15717} 15718 15719// WorkloadGroupListResultIterator provides access to a complete listing of WorkloadGroup values. 15720type WorkloadGroupListResultIterator struct { 15721 i int 15722 page WorkloadGroupListResultPage 15723} 15724 15725// NextWithContext advances to the next value. If there was an error making 15726// the request the iterator does not advance and the error is returned. 15727func (iter *WorkloadGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { 15728 if tracing.IsEnabled() { 15729 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupListResultIterator.NextWithContext") 15730 defer func() { 15731 sc := -1 15732 if iter.Response().Response.Response != nil { 15733 sc = iter.Response().Response.Response.StatusCode 15734 } 15735 tracing.EndSpan(ctx, sc, err) 15736 }() 15737 } 15738 iter.i++ 15739 if iter.i < len(iter.page.Values()) { 15740 return nil 15741 } 15742 err = iter.page.NextWithContext(ctx) 15743 if err != nil { 15744 iter.i-- 15745 return err 15746 } 15747 iter.i = 0 15748 return nil 15749} 15750 15751// Next advances to the next value. If there was an error making 15752// the request the iterator does not advance and the error is returned. 15753// Deprecated: Use NextWithContext() instead. 15754func (iter *WorkloadGroupListResultIterator) Next() error { 15755 return iter.NextWithContext(context.Background()) 15756} 15757 15758// NotDone returns true if the enumeration should be started or is not yet complete. 15759func (iter WorkloadGroupListResultIterator) NotDone() bool { 15760 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15761} 15762 15763// Response returns the raw server response from the last page request. 15764func (iter WorkloadGroupListResultIterator) Response() WorkloadGroupListResult { 15765 return iter.page.Response() 15766} 15767 15768// Value returns the current value or a zero-initialized value if the 15769// iterator has advanced beyond the end of the collection. 15770func (iter WorkloadGroupListResultIterator) Value() WorkloadGroup { 15771 if !iter.page.NotDone() { 15772 return WorkloadGroup{} 15773 } 15774 return iter.page.Values()[iter.i] 15775} 15776 15777// Creates a new instance of the WorkloadGroupListResultIterator type. 15778func NewWorkloadGroupListResultIterator(page WorkloadGroupListResultPage) WorkloadGroupListResultIterator { 15779 return WorkloadGroupListResultIterator{page: page} 15780} 15781 15782// IsEmpty returns true if the ListResult contains no values. 15783func (wglr WorkloadGroupListResult) IsEmpty() bool { 15784 return wglr.Value == nil || len(*wglr.Value) == 0 15785} 15786 15787// hasNextLink returns true if the NextLink is not empty. 15788func (wglr WorkloadGroupListResult) hasNextLink() bool { 15789 return wglr.NextLink != nil && len(*wglr.NextLink) != 0 15790} 15791 15792// workloadGroupListResultPreparer prepares a request to retrieve the next set of results. 15793// It returns nil if no more results exist. 15794func (wglr WorkloadGroupListResult) workloadGroupListResultPreparer(ctx context.Context) (*http.Request, error) { 15795 if !wglr.hasNextLink() { 15796 return nil, nil 15797 } 15798 return autorest.Prepare((&http.Request{}).WithContext(ctx), 15799 autorest.AsJSON(), 15800 autorest.AsGet(), 15801 autorest.WithBaseURL(to.String(wglr.NextLink))) 15802} 15803 15804// WorkloadGroupListResultPage contains a page of WorkloadGroup values. 15805type WorkloadGroupListResultPage struct { 15806 fn func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error) 15807 wglr WorkloadGroupListResult 15808} 15809 15810// NextWithContext advances to the next page of values. If there was an error making 15811// the request the page does not advance and the error is returned. 15812func (page *WorkloadGroupListResultPage) NextWithContext(ctx context.Context) (err error) { 15813 if tracing.IsEnabled() { 15814 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupListResultPage.NextWithContext") 15815 defer func() { 15816 sc := -1 15817 if page.Response().Response.Response != nil { 15818 sc = page.Response().Response.Response.StatusCode 15819 } 15820 tracing.EndSpan(ctx, sc, err) 15821 }() 15822 } 15823 for { 15824 next, err := page.fn(ctx, page.wglr) 15825 if err != nil { 15826 return err 15827 } 15828 page.wglr = next 15829 if !next.hasNextLink() || !next.IsEmpty() { 15830 break 15831 } 15832 } 15833 return nil 15834} 15835 15836// Next advances to the next page of values. If there was an error making 15837// the request the page does not advance and the error is returned. 15838// Deprecated: Use NextWithContext() instead. 15839func (page *WorkloadGroupListResultPage) Next() error { 15840 return page.NextWithContext(context.Background()) 15841} 15842 15843// NotDone returns true if the page enumeration should be started or is not yet complete. 15844func (page WorkloadGroupListResultPage) NotDone() bool { 15845 return !page.wglr.IsEmpty() 15846} 15847 15848// Response returns the raw server response from the last page request. 15849func (page WorkloadGroupListResultPage) Response() WorkloadGroupListResult { 15850 return page.wglr 15851} 15852 15853// Values returns the slice of values for the current page or nil if there are no values. 15854func (page WorkloadGroupListResultPage) Values() []WorkloadGroup { 15855 if page.wglr.IsEmpty() { 15856 return nil 15857 } 15858 return *page.wglr.Value 15859} 15860 15861// Creates a new instance of the WorkloadGroupListResultPage type. 15862func NewWorkloadGroupListResultPage(cur WorkloadGroupListResult, getNextPage func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error)) WorkloadGroupListResultPage { 15863 return WorkloadGroupListResultPage{ 15864 fn: getNextPage, 15865 wglr: cur, 15866 } 15867} 15868 15869// WorkloadGroupProperties workload group definition. For more information look at 15870// sys.workload_management_workload_groups (DMV). 15871type WorkloadGroupProperties struct { 15872 // MinResourcePercent - The workload group minimum percentage resource. 15873 MinResourcePercent *int32 `json:"minResourcePercent,omitempty"` 15874 // MaxResourcePercent - The workload group cap percentage resource. 15875 MaxResourcePercent *int32 `json:"maxResourcePercent,omitempty"` 15876 // MinResourcePercentPerRequest - The workload group request minimum grant percentage. 15877 MinResourcePercentPerRequest *float64 `json:"minResourcePercentPerRequest,omitempty"` 15878 // MaxResourcePercentPerRequest - The workload group request maximum grant percentage. 15879 MaxResourcePercentPerRequest *float64 `json:"maxResourcePercentPerRequest,omitempty"` 15880 // Importance - The workload group importance level. 15881 Importance *string `json:"importance,omitempty"` 15882 // QueryExecutionTimeout - The workload group query execution timeout. 15883 QueryExecutionTimeout *int32 `json:"queryExecutionTimeout,omitempty"` 15884} 15885 15886// Workspace a workspace 15887type Workspace struct { 15888 autorest.Response `json:"-"` 15889 // WorkspaceProperties - Workspace resource properties 15890 *WorkspaceProperties `json:"properties,omitempty"` 15891 // Identity - Identity of the workspace 15892 Identity *ManagedIdentity `json:"identity,omitempty"` 15893 // Tags - Resource tags. 15894 Tags map[string]*string `json:"tags"` 15895 // Location - The geo-location where the resource lives 15896 Location *string `json:"location,omitempty"` 15897 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 15898 ID *string `json:"id,omitempty"` 15899 // Name - READ-ONLY; The name of the resource 15900 Name *string `json:"name,omitempty"` 15901 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 15902 Type *string `json:"type,omitempty"` 15903} 15904 15905// MarshalJSON is the custom marshaler for Workspace. 15906func (w Workspace) MarshalJSON() ([]byte, error) { 15907 objectMap := make(map[string]interface{}) 15908 if w.WorkspaceProperties != nil { 15909 objectMap["properties"] = w.WorkspaceProperties 15910 } 15911 if w.Identity != nil { 15912 objectMap["identity"] = w.Identity 15913 } 15914 if w.Tags != nil { 15915 objectMap["tags"] = w.Tags 15916 } 15917 if w.Location != nil { 15918 objectMap["location"] = w.Location 15919 } 15920 return json.Marshal(objectMap) 15921} 15922 15923// UnmarshalJSON is the custom unmarshaler for Workspace struct. 15924func (w *Workspace) UnmarshalJSON(body []byte) error { 15925 var m map[string]*json.RawMessage 15926 err := json.Unmarshal(body, &m) 15927 if err != nil { 15928 return err 15929 } 15930 for k, v := range m { 15931 switch k { 15932 case "properties": 15933 if v != nil { 15934 var workspaceProperties WorkspaceProperties 15935 err = json.Unmarshal(*v, &workspaceProperties) 15936 if err != nil { 15937 return err 15938 } 15939 w.WorkspaceProperties = &workspaceProperties 15940 } 15941 case "identity": 15942 if v != nil { 15943 var identity ManagedIdentity 15944 err = json.Unmarshal(*v, &identity) 15945 if err != nil { 15946 return err 15947 } 15948 w.Identity = &identity 15949 } 15950 case "tags": 15951 if v != nil { 15952 var tags map[string]*string 15953 err = json.Unmarshal(*v, &tags) 15954 if err != nil { 15955 return err 15956 } 15957 w.Tags = tags 15958 } 15959 case "location": 15960 if v != nil { 15961 var location string 15962 err = json.Unmarshal(*v, &location) 15963 if err != nil { 15964 return err 15965 } 15966 w.Location = &location 15967 } 15968 case "id": 15969 if v != nil { 15970 var ID string 15971 err = json.Unmarshal(*v, &ID) 15972 if err != nil { 15973 return err 15974 } 15975 w.ID = &ID 15976 } 15977 case "name": 15978 if v != nil { 15979 var name string 15980 err = json.Unmarshal(*v, &name) 15981 if err != nil { 15982 return err 15983 } 15984 w.Name = &name 15985 } 15986 case "type": 15987 if v != nil { 15988 var typeVar string 15989 err = json.Unmarshal(*v, &typeVar) 15990 if err != nil { 15991 return err 15992 } 15993 w.Type = &typeVar 15994 } 15995 } 15996 } 15997 15998 return nil 15999} 16000 16001// WorkspaceAadAdminInfo workspace active directory administrator 16002type WorkspaceAadAdminInfo struct { 16003 autorest.Response `json:"-"` 16004 // AadAdminProperties - Workspace active directory administrator properties 16005 *AadAdminProperties `json:"properties,omitempty"` 16006 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 16007 ID *string `json:"id,omitempty"` 16008 // Name - READ-ONLY; The name of the resource 16009 Name *string `json:"name,omitempty"` 16010 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 16011 Type *string `json:"type,omitempty"` 16012} 16013 16014// MarshalJSON is the custom marshaler for WorkspaceAadAdminInfo. 16015func (waai WorkspaceAadAdminInfo) MarshalJSON() ([]byte, error) { 16016 objectMap := make(map[string]interface{}) 16017 if waai.AadAdminProperties != nil { 16018 objectMap["properties"] = waai.AadAdminProperties 16019 } 16020 return json.Marshal(objectMap) 16021} 16022 16023// UnmarshalJSON is the custom unmarshaler for WorkspaceAadAdminInfo struct. 16024func (waai *WorkspaceAadAdminInfo) UnmarshalJSON(body []byte) error { 16025 var m map[string]*json.RawMessage 16026 err := json.Unmarshal(body, &m) 16027 if err != nil { 16028 return err 16029 } 16030 for k, v := range m { 16031 switch k { 16032 case "properties": 16033 if v != nil { 16034 var aadAdminProperties AadAdminProperties 16035 err = json.Unmarshal(*v, &aadAdminProperties) 16036 if err != nil { 16037 return err 16038 } 16039 waai.AadAdminProperties = &aadAdminProperties 16040 } 16041 case "id": 16042 if v != nil { 16043 var ID string 16044 err = json.Unmarshal(*v, &ID) 16045 if err != nil { 16046 return err 16047 } 16048 waai.ID = &ID 16049 } 16050 case "name": 16051 if v != nil { 16052 var name string 16053 err = json.Unmarshal(*v, &name) 16054 if err != nil { 16055 return err 16056 } 16057 waai.Name = &name 16058 } 16059 case "type": 16060 if v != nil { 16061 var typeVar string 16062 err = json.Unmarshal(*v, &typeVar) 16063 if err != nil { 16064 return err 16065 } 16066 waai.Type = &typeVar 16067 } 16068 } 16069 } 16070 16071 return nil 16072} 16073 16074// WorkspaceAadAdminsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 16075// long-running operation. 16076type WorkspaceAadAdminsCreateOrUpdateFuture struct { 16077 azure.FutureAPI 16078 // Result returns the result of the asynchronous operation. 16079 // If the operation has not completed it will return an error. 16080 Result func(WorkspaceAadAdminsClient) (WorkspaceAadAdminInfo, error) 16081} 16082 16083// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16084func (future *WorkspaceAadAdminsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16085 var azFuture azure.Future 16086 if err := json.Unmarshal(body, &azFuture); err != nil { 16087 return err 16088 } 16089 future.FutureAPI = &azFuture 16090 future.Result = future.result 16091 return nil 16092} 16093 16094// result is the default implementation for WorkspaceAadAdminsCreateOrUpdateFuture.Result. 16095func (future *WorkspaceAadAdminsCreateOrUpdateFuture) result(client WorkspaceAadAdminsClient) (waai WorkspaceAadAdminInfo, err error) { 16096 var done bool 16097 done, err = future.DoneWithContext(context.Background(), client) 16098 if err != nil { 16099 err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16100 return 16101 } 16102 if !done { 16103 waai.Response.Response = future.Response() 16104 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceAadAdminsCreateOrUpdateFuture") 16105 return 16106 } 16107 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16108 if waai.Response.Response, err = future.GetResult(sender); err == nil && waai.Response.Response.StatusCode != http.StatusNoContent { 16109 waai, err = client.CreateOrUpdateResponder(waai.Response.Response) 16110 if err != nil { 16111 err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsCreateOrUpdateFuture", "Result", waai.Response.Response, "Failure responding to request") 16112 } 16113 } 16114 return 16115} 16116 16117// WorkspaceAadAdminsDeleteFuture an abstraction for monitoring and retrieving the results of a 16118// long-running operation. 16119type WorkspaceAadAdminsDeleteFuture struct { 16120 azure.FutureAPI 16121 // Result returns the result of the asynchronous operation. 16122 // If the operation has not completed it will return an error. 16123 Result func(WorkspaceAadAdminsClient) (autorest.Response, error) 16124} 16125 16126// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16127func (future *WorkspaceAadAdminsDeleteFuture) UnmarshalJSON(body []byte) error { 16128 var azFuture azure.Future 16129 if err := json.Unmarshal(body, &azFuture); err != nil { 16130 return err 16131 } 16132 future.FutureAPI = &azFuture 16133 future.Result = future.result 16134 return nil 16135} 16136 16137// result is the default implementation for WorkspaceAadAdminsDeleteFuture.Result. 16138func (future *WorkspaceAadAdminsDeleteFuture) result(client WorkspaceAadAdminsClient) (ar autorest.Response, err error) { 16139 var done bool 16140 done, err = future.DoneWithContext(context.Background(), client) 16141 if err != nil { 16142 err = autorest.NewErrorWithError(err, "synapse.WorkspaceAadAdminsDeleteFuture", "Result", future.Response(), "Polling failure") 16143 return 16144 } 16145 if !done { 16146 ar.Response = future.Response() 16147 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceAadAdminsDeleteFuture") 16148 return 16149 } 16150 ar.Response = future.Response() 16151 return 16152} 16153 16154// WorkspaceInfoListResult list of workspaces 16155type WorkspaceInfoListResult struct { 16156 autorest.Response `json:"-"` 16157 // NextLink - Link to the next page of results 16158 NextLink *string `json:"nextLink,omitempty"` 16159 // Value - List of workspaces 16160 Value *[]Workspace `json:"value,omitempty"` 16161} 16162 16163// WorkspaceInfoListResultIterator provides access to a complete listing of Workspace values. 16164type WorkspaceInfoListResultIterator struct { 16165 i int 16166 page WorkspaceInfoListResultPage 16167} 16168 16169// NextWithContext advances to the next value. If there was an error making 16170// the request the iterator does not advance and the error is returned. 16171func (iter *WorkspaceInfoListResultIterator) NextWithContext(ctx context.Context) (err error) { 16172 if tracing.IsEnabled() { 16173 ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceInfoListResultIterator.NextWithContext") 16174 defer func() { 16175 sc := -1 16176 if iter.Response().Response.Response != nil { 16177 sc = iter.Response().Response.Response.StatusCode 16178 } 16179 tracing.EndSpan(ctx, sc, err) 16180 }() 16181 } 16182 iter.i++ 16183 if iter.i < len(iter.page.Values()) { 16184 return nil 16185 } 16186 err = iter.page.NextWithContext(ctx) 16187 if err != nil { 16188 iter.i-- 16189 return err 16190 } 16191 iter.i = 0 16192 return nil 16193} 16194 16195// Next advances to the next value. If there was an error making 16196// the request the iterator does not advance and the error is returned. 16197// Deprecated: Use NextWithContext() instead. 16198func (iter *WorkspaceInfoListResultIterator) Next() error { 16199 return iter.NextWithContext(context.Background()) 16200} 16201 16202// NotDone returns true if the enumeration should be started or is not yet complete. 16203func (iter WorkspaceInfoListResultIterator) NotDone() bool { 16204 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16205} 16206 16207// Response returns the raw server response from the last page request. 16208func (iter WorkspaceInfoListResultIterator) Response() WorkspaceInfoListResult { 16209 return iter.page.Response() 16210} 16211 16212// Value returns the current value or a zero-initialized value if the 16213// iterator has advanced beyond the end of the collection. 16214func (iter WorkspaceInfoListResultIterator) Value() Workspace { 16215 if !iter.page.NotDone() { 16216 return Workspace{} 16217 } 16218 return iter.page.Values()[iter.i] 16219} 16220 16221// Creates a new instance of the WorkspaceInfoListResultIterator type. 16222func NewWorkspaceInfoListResultIterator(page WorkspaceInfoListResultPage) WorkspaceInfoListResultIterator { 16223 return WorkspaceInfoListResultIterator{page: page} 16224} 16225 16226// IsEmpty returns true if the ListResult contains no values. 16227func (wilr WorkspaceInfoListResult) IsEmpty() bool { 16228 return wilr.Value == nil || len(*wilr.Value) == 0 16229} 16230 16231// hasNextLink returns true if the NextLink is not empty. 16232func (wilr WorkspaceInfoListResult) hasNextLink() bool { 16233 return wilr.NextLink != nil && len(*wilr.NextLink) != 0 16234} 16235 16236// workspaceInfoListResultPreparer prepares a request to retrieve the next set of results. 16237// It returns nil if no more results exist. 16238func (wilr WorkspaceInfoListResult) workspaceInfoListResultPreparer(ctx context.Context) (*http.Request, error) { 16239 if !wilr.hasNextLink() { 16240 return nil, nil 16241 } 16242 return autorest.Prepare((&http.Request{}).WithContext(ctx), 16243 autorest.AsJSON(), 16244 autorest.AsGet(), 16245 autorest.WithBaseURL(to.String(wilr.NextLink))) 16246} 16247 16248// WorkspaceInfoListResultPage contains a page of Workspace values. 16249type WorkspaceInfoListResultPage struct { 16250 fn func(context.Context, WorkspaceInfoListResult) (WorkspaceInfoListResult, error) 16251 wilr WorkspaceInfoListResult 16252} 16253 16254// NextWithContext advances to the next page of values. If there was an error making 16255// the request the page does not advance and the error is returned. 16256func (page *WorkspaceInfoListResultPage) NextWithContext(ctx context.Context) (err error) { 16257 if tracing.IsEnabled() { 16258 ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceInfoListResultPage.NextWithContext") 16259 defer func() { 16260 sc := -1 16261 if page.Response().Response.Response != nil { 16262 sc = page.Response().Response.Response.StatusCode 16263 } 16264 tracing.EndSpan(ctx, sc, err) 16265 }() 16266 } 16267 for { 16268 next, err := page.fn(ctx, page.wilr) 16269 if err != nil { 16270 return err 16271 } 16272 page.wilr = next 16273 if !next.hasNextLink() || !next.IsEmpty() { 16274 break 16275 } 16276 } 16277 return nil 16278} 16279 16280// Next advances to the next page of values. If there was an error making 16281// the request the page does not advance and the error is returned. 16282// Deprecated: Use NextWithContext() instead. 16283func (page *WorkspaceInfoListResultPage) Next() error { 16284 return page.NextWithContext(context.Background()) 16285} 16286 16287// NotDone returns true if the page enumeration should be started or is not yet complete. 16288func (page WorkspaceInfoListResultPage) NotDone() bool { 16289 return !page.wilr.IsEmpty() 16290} 16291 16292// Response returns the raw server response from the last page request. 16293func (page WorkspaceInfoListResultPage) Response() WorkspaceInfoListResult { 16294 return page.wilr 16295} 16296 16297// Values returns the slice of values for the current page or nil if there are no values. 16298func (page WorkspaceInfoListResultPage) Values() []Workspace { 16299 if page.wilr.IsEmpty() { 16300 return nil 16301 } 16302 return *page.wilr.Value 16303} 16304 16305// Creates a new instance of the WorkspaceInfoListResultPage type. 16306func NewWorkspaceInfoListResultPage(cur WorkspaceInfoListResult, getNextPage func(context.Context, WorkspaceInfoListResult) (WorkspaceInfoListResult, error)) WorkspaceInfoListResultPage { 16307 return WorkspaceInfoListResultPage{ 16308 fn: getNextPage, 16309 wilr: cur, 16310 } 16311} 16312 16313// WorkspaceKeyDetails details of the customer managed key associated with the workspace 16314type WorkspaceKeyDetails struct { 16315 // Name - Workspace Key sub-resource name 16316 Name *string `json:"name,omitempty"` 16317 // KeyVaultURL - Workspace Key sub-resource key vault url 16318 KeyVaultURL *string `json:"keyVaultUrl,omitempty"` 16319} 16320 16321// WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture an abstraction for monitoring and 16322// retrieving the results of a long-running operation. 16323type WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture struct { 16324 azure.FutureAPI 16325 // Result returns the result of the asynchronous operation. 16326 // If the operation has not completed it will return an error. 16327 Result func(WorkspaceManagedIdentitySQLControlSettingsClient) (ManagedIdentitySQLControlSettingsModel, error) 16328} 16329 16330// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16331func (future *WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16332 var azFuture azure.Future 16333 if err := json.Unmarshal(body, &azFuture); err != nil { 16334 return err 16335 } 16336 future.FutureAPI = &azFuture 16337 future.Result = future.result 16338 return nil 16339} 16340 16341// result is the default implementation for WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture.Result. 16342func (future *WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture) result(client WorkspaceManagedIdentitySQLControlSettingsClient) (miscsm ManagedIdentitySQLControlSettingsModel, err error) { 16343 var done bool 16344 done, err = future.DoneWithContext(context.Background(), client) 16345 if err != nil { 16346 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16347 return 16348 } 16349 if !done { 16350 miscsm.Response.Response = future.Response() 16351 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture") 16352 return 16353 } 16354 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16355 if miscsm.Response.Response, err = future.GetResult(sender); err == nil && miscsm.Response.Response.StatusCode != http.StatusNoContent { 16356 miscsm, err = client.CreateOrUpdateResponder(miscsm.Response.Response) 16357 if err != nil { 16358 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture", "Result", miscsm.Response.Response, "Failure responding to request") 16359 } 16360 } 16361 return 16362} 16363 16364// WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring and 16365// retrieving the results of a long-running operation. 16366type WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture struct { 16367 azure.FutureAPI 16368 // Result returns the result of the asynchronous operation. 16369 // If the operation has not completed it will return an error. 16370 Result func(WorkspaceManagedSQLServerBlobAuditingPoliciesClient) (ServerBlobAuditingPolicy, error) 16371} 16372 16373// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16374func (future *WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16375 var azFuture azure.Future 16376 if err := json.Unmarshal(body, &azFuture); err != nil { 16377 return err 16378 } 16379 future.FutureAPI = &azFuture 16380 future.Result = future.result 16381 return nil 16382} 16383 16384// result is the default implementation for WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture.Result. 16385func (future *WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerBlobAuditingPoliciesClient) (sbap ServerBlobAuditingPolicy, err error) { 16386 var done bool 16387 done, err = future.DoneWithContext(context.Background(), client) 16388 if err != nil { 16389 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16390 return 16391 } 16392 if !done { 16393 sbap.Response.Response = future.Response() 16394 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture") 16395 return 16396 } 16397 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16398 if sbap.Response.Response, err = future.GetResult(sender); err == nil && sbap.Response.Response.StatusCode != http.StatusNoContent { 16399 sbap, err = client.CreateOrUpdateResponder(sbap.Response.Response) 16400 if err != nil { 16401 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture", "Result", sbap.Response.Response, "Failure responding to request") 16402 } 16403 } 16404 return 16405} 16406 16407// WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture an abstraction for monitoring and 16408// retrieving the results of a long-running operation. 16409type WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture struct { 16410 azure.FutureAPI 16411 // Result returns the result of the asynchronous operation. 16412 // If the operation has not completed it will return an error. 16413 Result func(WorkspaceManagedSQLServerEncryptionProtectorClient) (EncryptionProtector, error) 16414} 16415 16416// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16417func (future *WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16418 var azFuture azure.Future 16419 if err := json.Unmarshal(body, &azFuture); err != nil { 16420 return err 16421 } 16422 future.FutureAPI = &azFuture 16423 future.Result = future.result 16424 return nil 16425} 16426 16427// result is the default implementation for WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture.Result. 16428func (future *WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerEncryptionProtectorClient) (ep EncryptionProtector, err error) { 16429 var done bool 16430 done, err = future.DoneWithContext(context.Background(), client) 16431 if err != nil { 16432 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16433 return 16434 } 16435 if !done { 16436 ep.Response.Response = future.Response() 16437 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture") 16438 return 16439 } 16440 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16441 if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent { 16442 ep, err = client.CreateOrUpdateResponder(ep.Response.Response) 16443 if err != nil { 16444 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request") 16445 } 16446 } 16447 return 16448} 16449 16450// WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture an abstraction for monitoring and 16451// retrieving the results of a long-running operation. 16452type WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture struct { 16453 azure.FutureAPI 16454 // Result returns the result of the asynchronous operation. 16455 // If the operation has not completed it will return an error. 16456 Result func(WorkspaceManagedSQLServerEncryptionProtectorClient) (autorest.Response, error) 16457} 16458 16459// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16460func (future *WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture) UnmarshalJSON(body []byte) error { 16461 var azFuture azure.Future 16462 if err := json.Unmarshal(body, &azFuture); err != nil { 16463 return err 16464 } 16465 future.FutureAPI = &azFuture 16466 future.Result = future.result 16467 return nil 16468} 16469 16470// result is the default implementation for WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture.Result. 16471func (future *WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture) result(client WorkspaceManagedSQLServerEncryptionProtectorClient) (ar autorest.Response, err error) { 16472 var done bool 16473 done, err = future.DoneWithContext(context.Background(), client) 16474 if err != nil { 16475 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture", "Result", future.Response(), "Polling failure") 16476 return 16477 } 16478 if !done { 16479 ar.Response = future.Response() 16480 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture") 16481 return 16482 } 16483 ar.Response = future.Response() 16484 return 16485} 16486 16487// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring 16488// and retrieving the results of a long-running operation. 16489type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture struct { 16490 azure.FutureAPI 16491 // Result returns the result of the asynchronous operation. 16492 // If the operation has not completed it will return an error. 16493 Result func(WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) (ExtendedServerBlobAuditingPolicy, error) 16494} 16495 16496// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16497func (future *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16498 var azFuture azure.Future 16499 if err := json.Unmarshal(body, &azFuture); err != nil { 16500 return err 16501 } 16502 future.FutureAPI = &azFuture 16503 future.Result = future.result 16504 return nil 16505} 16506 16507// result is the default implementation for WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture.Result. 16508func (future *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) (esbap ExtendedServerBlobAuditingPolicy, err error) { 16509 var done bool 16510 done, err = future.DoneWithContext(context.Background(), client) 16511 if err != nil { 16512 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16513 return 16514 } 16515 if !done { 16516 esbap.Response.Response = future.Response() 16517 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture") 16518 return 16519 } 16520 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16521 if esbap.Response.Response, err = future.GetResult(sender); err == nil && esbap.Response.Response.StatusCode != http.StatusNoContent { 16522 esbap, err = client.CreateOrUpdateResponder(esbap.Response.Response) 16523 if err != nil { 16524 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture", "Result", esbap.Response.Response, "Failure responding to request") 16525 } 16526 } 16527 return 16528} 16529 16530// WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture an abstraction for monitoring and 16531// retrieving the results of a long-running operation. 16532type WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture struct { 16533 azure.FutureAPI 16534 // Result returns the result of the asynchronous operation. 16535 // If the operation has not completed it will return an error. 16536 Result func(WorkspaceManagedSQLServerSecurityAlertPolicyClient) (ServerSecurityAlertPolicy, error) 16537} 16538 16539// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16540func (future *WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16541 var azFuture azure.Future 16542 if err := json.Unmarshal(body, &azFuture); err != nil { 16543 return err 16544 } 16545 future.FutureAPI = &azFuture 16546 future.Result = future.result 16547 return nil 16548} 16549 16550// result is the default implementation for WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture.Result. 16551func (future *WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture) result(client WorkspaceManagedSQLServerSecurityAlertPolicyClient) (ssap ServerSecurityAlertPolicy, err error) { 16552 var done bool 16553 done, err = future.DoneWithContext(context.Background(), client) 16554 if err != nil { 16555 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16556 return 16557 } 16558 if !done { 16559 ssap.Response.Response = future.Response() 16560 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture") 16561 return 16562 } 16563 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16564 if ssap.Response.Response, err = future.GetResult(sender); err == nil && ssap.Response.Response.StatusCode != http.StatusNoContent { 16565 ssap, err = client.CreateOrUpdateResponder(ssap.Response.Response) 16566 if err != nil { 16567 err = autorest.NewErrorWithError(err, "synapse.WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture", "Result", ssap.Response.Response, "Failure responding to request") 16568 } 16569 } 16570 return 16571} 16572 16573// WorkspacePatchInfo workspace patch details 16574type WorkspacePatchInfo struct { 16575 // Tags - Resource tags 16576 Tags map[string]*string `json:"tags"` 16577 // Identity - The identity of the workspace 16578 Identity *ManagedIdentity `json:"identity,omitempty"` 16579 // WorkspacePatchProperties - Workspace patch properties 16580 *WorkspacePatchProperties `json:"properties,omitempty"` 16581} 16582 16583// MarshalJSON is the custom marshaler for WorkspacePatchInfo. 16584func (wpi WorkspacePatchInfo) MarshalJSON() ([]byte, error) { 16585 objectMap := make(map[string]interface{}) 16586 if wpi.Tags != nil { 16587 objectMap["tags"] = wpi.Tags 16588 } 16589 if wpi.Identity != nil { 16590 objectMap["identity"] = wpi.Identity 16591 } 16592 if wpi.WorkspacePatchProperties != nil { 16593 objectMap["properties"] = wpi.WorkspacePatchProperties 16594 } 16595 return json.Marshal(objectMap) 16596} 16597 16598// UnmarshalJSON is the custom unmarshaler for WorkspacePatchInfo struct. 16599func (wpi *WorkspacePatchInfo) UnmarshalJSON(body []byte) error { 16600 var m map[string]*json.RawMessage 16601 err := json.Unmarshal(body, &m) 16602 if err != nil { 16603 return err 16604 } 16605 for k, v := range m { 16606 switch k { 16607 case "tags": 16608 if v != nil { 16609 var tags map[string]*string 16610 err = json.Unmarshal(*v, &tags) 16611 if err != nil { 16612 return err 16613 } 16614 wpi.Tags = tags 16615 } 16616 case "identity": 16617 if v != nil { 16618 var identity ManagedIdentity 16619 err = json.Unmarshal(*v, &identity) 16620 if err != nil { 16621 return err 16622 } 16623 wpi.Identity = &identity 16624 } 16625 case "properties": 16626 if v != nil { 16627 var workspacePatchProperties WorkspacePatchProperties 16628 err = json.Unmarshal(*v, &workspacePatchProperties) 16629 if err != nil { 16630 return err 16631 } 16632 wpi.WorkspacePatchProperties = &workspacePatchProperties 16633 } 16634 } 16635 } 16636 16637 return nil 16638} 16639 16640// WorkspacePatchProperties workspace patch properties 16641type WorkspacePatchProperties struct { 16642 // SQLAdministratorLoginPassword - SQL administrator login password 16643 SQLAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"` 16644 // ManagedVirtualNetworkSettings - Managed Virtual Network Settings 16645 ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"` 16646 // WorkspaceRepositoryConfiguration - Git integration settings 16647 WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"` 16648 // PurviewConfiguration - Purview Configuration 16649 PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"` 16650 // ProvisioningState - READ-ONLY; Resource provisioning state 16651 ProvisioningState *string `json:"provisioningState,omitempty"` 16652 // Encryption - The encryption details of the workspace 16653 Encryption *EncryptionDetails `json:"encryption,omitempty"` 16654 // PublicNetworkAccess - Enable or Disable public network access to workspace. Possible values include: 'WorkspacePublicNetworkAccessEnabled', 'WorkspacePublicNetworkAccessDisabled' 16655 PublicNetworkAccess WorkspacePublicNetworkAccess `json:"publicNetworkAccess,omitempty"` 16656} 16657 16658// MarshalJSON is the custom marshaler for WorkspacePatchProperties. 16659func (wpp WorkspacePatchProperties) MarshalJSON() ([]byte, error) { 16660 objectMap := make(map[string]interface{}) 16661 if wpp.SQLAdministratorLoginPassword != nil { 16662 objectMap["sqlAdministratorLoginPassword"] = wpp.SQLAdministratorLoginPassword 16663 } 16664 if wpp.ManagedVirtualNetworkSettings != nil { 16665 objectMap["managedVirtualNetworkSettings"] = wpp.ManagedVirtualNetworkSettings 16666 } 16667 if wpp.WorkspaceRepositoryConfiguration != nil { 16668 objectMap["workspaceRepositoryConfiguration"] = wpp.WorkspaceRepositoryConfiguration 16669 } 16670 if wpp.PurviewConfiguration != nil { 16671 objectMap["purviewConfiguration"] = wpp.PurviewConfiguration 16672 } 16673 if wpp.Encryption != nil { 16674 objectMap["encryption"] = wpp.Encryption 16675 } 16676 if wpp.PublicNetworkAccess != "" { 16677 objectMap["publicNetworkAccess"] = wpp.PublicNetworkAccess 16678 } 16679 return json.Marshal(objectMap) 16680} 16681 16682// WorkspaceProperties workspace properties 16683type WorkspaceProperties struct { 16684 // DefaultDataLakeStorage - Workspace default data lake storage account details 16685 DefaultDataLakeStorage *DataLakeStorageAccountDetails `json:"defaultDataLakeStorage,omitempty"` 16686 // SQLAdministratorLoginPassword - SQL administrator login password 16687 SQLAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"` 16688 // ManagedResourceGroupName - Workspace managed resource group. The resource group name uniquely identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note that the name cannot end with '.' 16689 ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty"` 16690 // ProvisioningState - READ-ONLY; Resource provisioning state 16691 ProvisioningState *string `json:"provisioningState,omitempty"` 16692 // SQLAdministratorLogin - Login for workspace SQL active directory administrator 16693 SQLAdministratorLogin *string `json:"sqlAdministratorLogin,omitempty"` 16694 // VirtualNetworkProfile - Virtual Network profile 16695 VirtualNetworkProfile *VirtualNetworkProfile `json:"virtualNetworkProfile,omitempty"` 16696 // ConnectivityEndpoints - Connectivity endpoints 16697 ConnectivityEndpoints map[string]*string `json:"connectivityEndpoints"` 16698 // ManagedVirtualNetwork - Setting this to 'default' will ensure that all compute for this workspace is in a virtual network managed on behalf of the user. 16699 ManagedVirtualNetwork *string `json:"managedVirtualNetwork,omitempty"` 16700 // PrivateEndpointConnections - Private endpoint connections to the workspace 16701 PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` 16702 // Encryption - The encryption details of the workspace 16703 Encryption *EncryptionDetails `json:"encryption,omitempty"` 16704 // WorkspaceUID - READ-ONLY; The workspace unique identifier 16705 WorkspaceUID *uuid.UUID `json:"workspaceUID,omitempty"` 16706 // ExtraProperties - READ-ONLY; Workspace level configs and feature flags 16707 ExtraProperties map[string]interface{} `json:"extraProperties"` 16708 // ManagedVirtualNetworkSettings - Managed Virtual Network Settings 16709 ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"` 16710 // WorkspaceRepositoryConfiguration - Git integration settings 16711 WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"` 16712 // PurviewConfiguration - Purview Configuration 16713 PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"` 16714 // AdlaResourceID - READ-ONLY; The ADLA resource ID. 16715 AdlaResourceID *string `json:"adlaResourceId,omitempty"` 16716 // PublicNetworkAccess - Enable or Disable public network access to workspace. Possible values include: 'WorkspacePublicNetworkAccessEnabled', 'WorkspacePublicNetworkAccessDisabled' 16717 PublicNetworkAccess WorkspacePublicNetworkAccess `json:"publicNetworkAccess,omitempty"` 16718 // CspWorkspaceAdminProperties - Initial workspace AAD admin properties for a CSP subscription 16719 CspWorkspaceAdminProperties *CspWorkspaceAdminProperties `json:"cspWorkspaceAdminProperties,omitempty"` 16720 // Settings - READ-ONLY; Workspace settings 16721 Settings map[string]interface{} `json:"settings"` 16722 // AzureADOnlyAuthentication - Enable or Disable AzureADOnlyAuthentication on All Workspace subresource 16723 AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` 16724} 16725 16726// MarshalJSON is the custom marshaler for WorkspaceProperties. 16727func (wp WorkspaceProperties) MarshalJSON() ([]byte, error) { 16728 objectMap := make(map[string]interface{}) 16729 if wp.DefaultDataLakeStorage != nil { 16730 objectMap["defaultDataLakeStorage"] = wp.DefaultDataLakeStorage 16731 } 16732 if wp.SQLAdministratorLoginPassword != nil { 16733 objectMap["sqlAdministratorLoginPassword"] = wp.SQLAdministratorLoginPassword 16734 } 16735 if wp.ManagedResourceGroupName != nil { 16736 objectMap["managedResourceGroupName"] = wp.ManagedResourceGroupName 16737 } 16738 if wp.SQLAdministratorLogin != nil { 16739 objectMap["sqlAdministratorLogin"] = wp.SQLAdministratorLogin 16740 } 16741 if wp.VirtualNetworkProfile != nil { 16742 objectMap["virtualNetworkProfile"] = wp.VirtualNetworkProfile 16743 } 16744 if wp.ConnectivityEndpoints != nil { 16745 objectMap["connectivityEndpoints"] = wp.ConnectivityEndpoints 16746 } 16747 if wp.ManagedVirtualNetwork != nil { 16748 objectMap["managedVirtualNetwork"] = wp.ManagedVirtualNetwork 16749 } 16750 if wp.PrivateEndpointConnections != nil { 16751 objectMap["privateEndpointConnections"] = wp.PrivateEndpointConnections 16752 } 16753 if wp.Encryption != nil { 16754 objectMap["encryption"] = wp.Encryption 16755 } 16756 if wp.ManagedVirtualNetworkSettings != nil { 16757 objectMap["managedVirtualNetworkSettings"] = wp.ManagedVirtualNetworkSettings 16758 } 16759 if wp.WorkspaceRepositoryConfiguration != nil { 16760 objectMap["workspaceRepositoryConfiguration"] = wp.WorkspaceRepositoryConfiguration 16761 } 16762 if wp.PurviewConfiguration != nil { 16763 objectMap["purviewConfiguration"] = wp.PurviewConfiguration 16764 } 16765 if wp.PublicNetworkAccess != "" { 16766 objectMap["publicNetworkAccess"] = wp.PublicNetworkAccess 16767 } 16768 if wp.CspWorkspaceAdminProperties != nil { 16769 objectMap["cspWorkspaceAdminProperties"] = wp.CspWorkspaceAdminProperties 16770 } 16771 if wp.AzureADOnlyAuthentication != nil { 16772 objectMap["azureADOnlyAuthentication"] = wp.AzureADOnlyAuthentication 16773 } 16774 return json.Marshal(objectMap) 16775} 16776 16777// WorkspaceRepositoryConfiguration git integration settings 16778type WorkspaceRepositoryConfiguration struct { 16779 // Type - Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration 16780 Type *string `json:"type,omitempty"` 16781 // HostName - GitHub Enterprise host name. For example: https://github.mydomain.com 16782 HostName *string `json:"hostName,omitempty"` 16783 // AccountName - Account name 16784 AccountName *string `json:"accountName,omitempty"` 16785 // ProjectName - VSTS project name 16786 ProjectName *string `json:"projectName,omitempty"` 16787 // RepositoryName - Repository name 16788 RepositoryName *string `json:"repositoryName,omitempty"` 16789 // CollaborationBranch - Collaboration branch 16790 CollaborationBranch *string `json:"collaborationBranch,omitempty"` 16791 // RootFolder - Root folder to use in the repository 16792 RootFolder *string `json:"rootFolder,omitempty"` 16793 // LastCommitID - The last commit ID 16794 LastCommitID *string `json:"lastCommitId,omitempty"` 16795 // TenantID - The VSTS tenant ID 16796 TenantID *uuid.UUID `json:"tenantId,omitempty"` 16797} 16798 16799// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 16800// long-running operation. 16801type WorkspacesCreateOrUpdateFuture struct { 16802 azure.FutureAPI 16803 // Result returns the result of the asynchronous operation. 16804 // If the operation has not completed it will return an error. 16805 Result func(WorkspacesClient) (Workspace, error) 16806} 16807 16808// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16809func (future *WorkspacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16810 var azFuture azure.Future 16811 if err := json.Unmarshal(body, &azFuture); err != nil { 16812 return err 16813 } 16814 future.FutureAPI = &azFuture 16815 future.Result = future.result 16816 return nil 16817} 16818 16819// result is the default implementation for WorkspacesCreateOrUpdateFuture.Result. 16820func (future *WorkspacesCreateOrUpdateFuture) result(client WorkspacesClient) (w Workspace, err error) { 16821 var done bool 16822 done, err = future.DoneWithContext(context.Background(), client) 16823 if err != nil { 16824 err = autorest.NewErrorWithError(err, "synapse.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16825 return 16826 } 16827 if !done { 16828 w.Response.Response = future.Response() 16829 err = azure.NewAsyncOpIncompleteError("synapse.WorkspacesCreateOrUpdateFuture") 16830 return 16831 } 16832 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16833 if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent { 16834 w, err = client.CreateOrUpdateResponder(w.Response.Response) 16835 if err != nil { 16836 err = autorest.NewErrorWithError(err, "synapse.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") 16837 } 16838 } 16839 return 16840} 16841 16842// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 16843// operation. 16844type WorkspacesDeleteFuture struct { 16845 azure.FutureAPI 16846 // Result returns the result of the asynchronous operation. 16847 // If the operation has not completed it will return an error. 16848 Result func(WorkspacesClient) (SetObject, error) 16849} 16850 16851// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16852func (future *WorkspacesDeleteFuture) UnmarshalJSON(body []byte) error { 16853 var azFuture azure.Future 16854 if err := json.Unmarshal(body, &azFuture); err != nil { 16855 return err 16856 } 16857 future.FutureAPI = &azFuture 16858 future.Result = future.result 16859 return nil 16860} 16861 16862// result is the default implementation for WorkspacesDeleteFuture.Result. 16863func (future *WorkspacesDeleteFuture) result(client WorkspacesClient) (so SetObject, err error) { 16864 var done bool 16865 done, err = future.DoneWithContext(context.Background(), client) 16866 if err != nil { 16867 err = autorest.NewErrorWithError(err, "synapse.WorkspacesDeleteFuture", "Result", future.Response(), "Polling failure") 16868 return 16869 } 16870 if !done { 16871 so.Response.Response = future.Response() 16872 err = azure.NewAsyncOpIncompleteError("synapse.WorkspacesDeleteFuture") 16873 return 16874 } 16875 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16876 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 16877 so, err = client.DeleteResponder(so.Response.Response) 16878 if err != nil { 16879 err = autorest.NewErrorWithError(err, "synapse.WorkspacesDeleteFuture", "Result", so.Response.Response, "Failure responding to request") 16880 } 16881 } 16882 return 16883} 16884 16885// WorkspaceSQLAadAdminsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 16886// long-running operation. 16887type WorkspaceSQLAadAdminsCreateOrUpdateFuture struct { 16888 azure.FutureAPI 16889 // Result returns the result of the asynchronous operation. 16890 // If the operation has not completed it will return an error. 16891 Result func(WorkspaceSQLAadAdminsClient) (WorkspaceAadAdminInfo, error) 16892} 16893 16894// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16895func (future *WorkspaceSQLAadAdminsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 16896 var azFuture azure.Future 16897 if err := json.Unmarshal(body, &azFuture); err != nil { 16898 return err 16899 } 16900 future.FutureAPI = &azFuture 16901 future.Result = future.result 16902 return nil 16903} 16904 16905// result is the default implementation for WorkspaceSQLAadAdminsCreateOrUpdateFuture.Result. 16906func (future *WorkspaceSQLAadAdminsCreateOrUpdateFuture) result(client WorkspaceSQLAadAdminsClient) (waai WorkspaceAadAdminInfo, err error) { 16907 var done bool 16908 done, err = future.DoneWithContext(context.Background(), client) 16909 if err != nil { 16910 err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16911 return 16912 } 16913 if !done { 16914 waai.Response.Response = future.Response() 16915 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture") 16916 return 16917 } 16918 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16919 if waai.Response.Response, err = future.GetResult(sender); err == nil && waai.Response.Response.StatusCode != http.StatusNoContent { 16920 waai, err = client.CreateOrUpdateResponder(waai.Response.Response) 16921 if err != nil { 16922 err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsCreateOrUpdateFuture", "Result", waai.Response.Response, "Failure responding to request") 16923 } 16924 } 16925 return 16926} 16927 16928// WorkspaceSQLAadAdminsDeleteFuture an abstraction for monitoring and retrieving the results of a 16929// long-running operation. 16930type WorkspaceSQLAadAdminsDeleteFuture struct { 16931 azure.FutureAPI 16932 // Result returns the result of the asynchronous operation. 16933 // If the operation has not completed it will return an error. 16934 Result func(WorkspaceSQLAadAdminsClient) (autorest.Response, error) 16935} 16936 16937// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16938func (future *WorkspaceSQLAadAdminsDeleteFuture) UnmarshalJSON(body []byte) error { 16939 var azFuture azure.Future 16940 if err := json.Unmarshal(body, &azFuture); err != nil { 16941 return err 16942 } 16943 future.FutureAPI = &azFuture 16944 future.Result = future.result 16945 return nil 16946} 16947 16948// result is the default implementation for WorkspaceSQLAadAdminsDeleteFuture.Result. 16949func (future *WorkspaceSQLAadAdminsDeleteFuture) result(client WorkspaceSQLAadAdminsClient) (ar autorest.Response, err error) { 16950 var done bool 16951 done, err = future.DoneWithContext(context.Background(), client) 16952 if err != nil { 16953 err = autorest.NewErrorWithError(err, "synapse.WorkspaceSQLAadAdminsDeleteFuture", "Result", future.Response(), "Polling failure") 16954 return 16955 } 16956 if !done { 16957 ar.Response = future.Response() 16958 err = azure.NewAsyncOpIncompleteError("synapse.WorkspaceSQLAadAdminsDeleteFuture") 16959 return 16960 } 16961 ar.Response = future.Response() 16962 return 16963} 16964 16965// WorkspacesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 16966// operation. 16967type WorkspacesUpdateFuture struct { 16968 azure.FutureAPI 16969 // Result returns the result of the asynchronous operation. 16970 // If the operation has not completed it will return an error. 16971 Result func(WorkspacesClient) (Workspace, error) 16972} 16973 16974// UnmarshalJSON is the custom unmarshaller for CreateFuture. 16975func (future *WorkspacesUpdateFuture) UnmarshalJSON(body []byte) error { 16976 var azFuture azure.Future 16977 if err := json.Unmarshal(body, &azFuture); err != nil { 16978 return err 16979 } 16980 future.FutureAPI = &azFuture 16981 future.Result = future.result 16982 return nil 16983} 16984 16985// result is the default implementation for WorkspacesUpdateFuture.Result. 16986func (future *WorkspacesUpdateFuture) result(client WorkspacesClient) (w Workspace, err error) { 16987 var done bool 16988 done, err = future.DoneWithContext(context.Background(), client) 16989 if err != nil { 16990 err = autorest.NewErrorWithError(err, "synapse.WorkspacesUpdateFuture", "Result", future.Response(), "Polling failure") 16991 return 16992 } 16993 if !done { 16994 w.Response.Response = future.Response() 16995 err = azure.NewAsyncOpIncompleteError("synapse.WorkspacesUpdateFuture") 16996 return 16997 } 16998 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16999 if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent { 17000 w, err = client.UpdateResponder(w.Response.Response) 17001 if err != nil { 17002 err = autorest.NewErrorWithError(err, "synapse.WorkspacesUpdateFuture", "Result", w.Response.Response, "Failure responding to request") 17003 } 17004 } 17005 return 17006} 17007