1package datashare 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 "net/http" 18) 19 20// The package's fully qualified name. 21const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/datashare/mgmt/2018-11-01-preview/datashare" 22 23// Account an account data transfer object. 24type Account struct { 25 autorest.Response `json:"-"` 26 // Identity - Identity Info on the Account 27 Identity *Identity `json:"identity,omitempty"` 28 // AccountProperties - Properties on the account 29 *AccountProperties `json:"properties,omitempty"` 30 // ID - READ-ONLY; The resource id of the azure resource 31 ID *string `json:"id,omitempty"` 32 // Location - Location of the azure resource. 33 Location *string `json:"location,omitempty"` 34 // Name - READ-ONLY; Name of the azure resource 35 Name *string `json:"name,omitempty"` 36 // Tags - Tags on the azure resource. 37 Tags map[string]*string `json:"tags"` 38 // Type - READ-ONLY; Type of the azure resource 39 Type *string `json:"type,omitempty"` 40} 41 42// MarshalJSON is the custom marshaler for Account. 43func (a Account) MarshalJSON() ([]byte, error) { 44 objectMap := make(map[string]interface{}) 45 if a.Identity != nil { 46 objectMap["identity"] = a.Identity 47 } 48 if a.AccountProperties != nil { 49 objectMap["properties"] = a.AccountProperties 50 } 51 if a.Location != nil { 52 objectMap["location"] = a.Location 53 } 54 if a.Tags != nil { 55 objectMap["tags"] = a.Tags 56 } 57 return json.Marshal(objectMap) 58} 59 60// UnmarshalJSON is the custom unmarshaler for Account struct. 61func (a *Account) UnmarshalJSON(body []byte) error { 62 var m map[string]*json.RawMessage 63 err := json.Unmarshal(body, &m) 64 if err != nil { 65 return err 66 } 67 for k, v := range m { 68 switch k { 69 case "identity": 70 if v != nil { 71 var identity Identity 72 err = json.Unmarshal(*v, &identity) 73 if err != nil { 74 return err 75 } 76 a.Identity = &identity 77 } 78 case "properties": 79 if v != nil { 80 var accountProperties AccountProperties 81 err = json.Unmarshal(*v, &accountProperties) 82 if err != nil { 83 return err 84 } 85 a.AccountProperties = &accountProperties 86 } 87 case "id": 88 if v != nil { 89 var ID string 90 err = json.Unmarshal(*v, &ID) 91 if err != nil { 92 return err 93 } 94 a.ID = &ID 95 } 96 case "location": 97 if v != nil { 98 var location string 99 err = json.Unmarshal(*v, &location) 100 if err != nil { 101 return err 102 } 103 a.Location = &location 104 } 105 case "name": 106 if v != nil { 107 var name string 108 err = json.Unmarshal(*v, &name) 109 if err != nil { 110 return err 111 } 112 a.Name = &name 113 } 114 case "tags": 115 if v != nil { 116 var tags map[string]*string 117 err = json.Unmarshal(*v, &tags) 118 if err != nil { 119 return err 120 } 121 a.Tags = tags 122 } 123 case "type": 124 if v != nil { 125 var typeVar string 126 err = json.Unmarshal(*v, &typeVar) 127 if err != nil { 128 return err 129 } 130 a.Type = &typeVar 131 } 132 } 133 } 134 135 return nil 136} 137 138// AccountList list response for get Accounts. 139type AccountList struct { 140 autorest.Response `json:"-"` 141 // NextLink - The Url of next result page. 142 NextLink *string `json:"nextLink,omitempty"` 143 // Value - Collection of items of type DataTransferObjects. 144 Value *[]Account `json:"value,omitempty"` 145} 146 147// AccountListIterator provides access to a complete listing of Account values. 148type AccountListIterator struct { 149 i int 150 page AccountListPage 151} 152 153// NextWithContext advances to the next value. If there was an error making 154// the request the iterator does not advance and the error is returned. 155func (iter *AccountListIterator) NextWithContext(ctx context.Context) (err error) { 156 if tracing.IsEnabled() { 157 ctx = tracing.StartSpan(ctx, fqdn+"/AccountListIterator.NextWithContext") 158 defer func() { 159 sc := -1 160 if iter.Response().Response.Response != nil { 161 sc = iter.Response().Response.Response.StatusCode 162 } 163 tracing.EndSpan(ctx, sc, err) 164 }() 165 } 166 iter.i++ 167 if iter.i < len(iter.page.Values()) { 168 return nil 169 } 170 err = iter.page.NextWithContext(ctx) 171 if err != nil { 172 iter.i-- 173 return err 174 } 175 iter.i = 0 176 return nil 177} 178 179// Next advances to the next value. If there was an error making 180// the request the iterator does not advance and the error is returned. 181// Deprecated: Use NextWithContext() instead. 182func (iter *AccountListIterator) Next() error { 183 return iter.NextWithContext(context.Background()) 184} 185 186// NotDone returns true if the enumeration should be started or is not yet complete. 187func (iter AccountListIterator) NotDone() bool { 188 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 189} 190 191// Response returns the raw server response from the last page request. 192func (iter AccountListIterator) Response() AccountList { 193 return iter.page.Response() 194} 195 196// Value returns the current value or a zero-initialized value if the 197// iterator has advanced beyond the end of the collection. 198func (iter AccountListIterator) Value() Account { 199 if !iter.page.NotDone() { 200 return Account{} 201 } 202 return iter.page.Values()[iter.i] 203} 204 205// Creates a new instance of the AccountListIterator type. 206func NewAccountListIterator(page AccountListPage) AccountListIterator { 207 return AccountListIterator{page: page} 208} 209 210// IsEmpty returns true if the ListResult contains no values. 211func (al AccountList) IsEmpty() bool { 212 return al.Value == nil || len(*al.Value) == 0 213} 214 215// hasNextLink returns true if the NextLink is not empty. 216func (al AccountList) hasNextLink() bool { 217 return al.NextLink != nil && len(*al.NextLink) != 0 218} 219 220// accountListPreparer prepares a request to retrieve the next set of results. 221// It returns nil if no more results exist. 222func (al AccountList) accountListPreparer(ctx context.Context) (*http.Request, error) { 223 if !al.hasNextLink() { 224 return nil, nil 225 } 226 return autorest.Prepare((&http.Request{}).WithContext(ctx), 227 autorest.AsJSON(), 228 autorest.AsGet(), 229 autorest.WithBaseURL(to.String(al.NextLink))) 230} 231 232// AccountListPage contains a page of Account values. 233type AccountListPage struct { 234 fn func(context.Context, AccountList) (AccountList, error) 235 al AccountList 236} 237 238// NextWithContext advances to the next page of values. If there was an error making 239// the request the page does not advance and the error is returned. 240func (page *AccountListPage) NextWithContext(ctx context.Context) (err error) { 241 if tracing.IsEnabled() { 242 ctx = tracing.StartSpan(ctx, fqdn+"/AccountListPage.NextWithContext") 243 defer func() { 244 sc := -1 245 if page.Response().Response.Response != nil { 246 sc = page.Response().Response.Response.StatusCode 247 } 248 tracing.EndSpan(ctx, sc, err) 249 }() 250 } 251 for { 252 next, err := page.fn(ctx, page.al) 253 if err != nil { 254 return err 255 } 256 page.al = next 257 if !next.hasNextLink() || !next.IsEmpty() { 258 break 259 } 260 } 261 return nil 262} 263 264// Next advances to the next page of values. If there was an error making 265// the request the page does not advance and the error is returned. 266// Deprecated: Use NextWithContext() instead. 267func (page *AccountListPage) Next() error { 268 return page.NextWithContext(context.Background()) 269} 270 271// NotDone returns true if the page enumeration should be started or is not yet complete. 272func (page AccountListPage) NotDone() bool { 273 return !page.al.IsEmpty() 274} 275 276// Response returns the raw server response from the last page request. 277func (page AccountListPage) Response() AccountList { 278 return page.al 279} 280 281// Values returns the slice of values for the current page or nil if there are no values. 282func (page AccountListPage) Values() []Account { 283 if page.al.IsEmpty() { 284 return nil 285 } 286 return *page.al.Value 287} 288 289// Creates a new instance of the AccountListPage type. 290func NewAccountListPage(cur AccountList, getNextPage func(context.Context, AccountList) (AccountList, error)) AccountListPage { 291 return AccountListPage{ 292 fn: getNextPage, 293 al: cur, 294 } 295} 296 297// AccountProperties account property bag. 298type AccountProperties struct { 299 // CreatedAt - READ-ONLY; Time at which the account was created. 300 CreatedAt *date.Time `json:"createdAt,omitempty"` 301 // ProvisioningState - READ-ONLY; Provisioning state of the Account. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 302 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 303 // UserEmail - READ-ONLY; Email of the user who created the resource 304 UserEmail *string `json:"userEmail,omitempty"` 305 // UserName - READ-ONLY; Name of the user who created the resource 306 UserName *string `json:"userName,omitempty"` 307} 308 309// MarshalJSON is the custom marshaler for AccountProperties. 310func (ap AccountProperties) MarshalJSON() ([]byte, error) { 311 objectMap := make(map[string]interface{}) 312 return json.Marshal(objectMap) 313} 314 315// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running 316// operation. 317type AccountsCreateFuture struct { 318 azure.FutureAPI 319 // Result returns the result of the asynchronous operation. 320 // If the operation has not completed it will return an error. 321 Result func(AccountsClient) (Account, error) 322} 323 324// UnmarshalJSON is the custom unmarshaller for CreateFuture. 325func (future *AccountsCreateFuture) UnmarshalJSON(body []byte) error { 326 var azFuture azure.Future 327 if err := json.Unmarshal(body, &azFuture); err != nil { 328 return err 329 } 330 future.FutureAPI = &azFuture 331 future.Result = future.result 332 return nil 333} 334 335// result is the default implementation for AccountsCreateFuture.Result. 336func (future *AccountsCreateFuture) result(client AccountsClient) (a Account, err error) { 337 var done bool 338 done, err = future.DoneWithContext(context.Background(), client) 339 if err != nil { 340 err = autorest.NewErrorWithError(err, "datashare.AccountsCreateFuture", "Result", future.Response(), "Polling failure") 341 return 342 } 343 if !done { 344 a.Response.Response = future.Response() 345 err = azure.NewAsyncOpIncompleteError("datashare.AccountsCreateFuture") 346 return 347 } 348 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 349 if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent { 350 a, err = client.CreateResponder(a.Response.Response) 351 if err != nil { 352 err = autorest.NewErrorWithError(err, "datashare.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request") 353 } 354 } 355 return 356} 357 358// AccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 359// operation. 360type AccountsDeleteFuture struct { 361 azure.FutureAPI 362 // Result returns the result of the asynchronous operation. 363 // If the operation has not completed it will return an error. 364 Result func(AccountsClient) (OperationResponse, error) 365} 366 367// UnmarshalJSON is the custom unmarshaller for CreateFuture. 368func (future *AccountsDeleteFuture) UnmarshalJSON(body []byte) error { 369 var azFuture azure.Future 370 if err := json.Unmarshal(body, &azFuture); err != nil { 371 return err 372 } 373 future.FutureAPI = &azFuture 374 future.Result = future.result 375 return nil 376} 377 378// result is the default implementation for AccountsDeleteFuture.Result. 379func (future *AccountsDeleteFuture) result(client AccountsClient) (or OperationResponse, err error) { 380 var done bool 381 done, err = future.DoneWithContext(context.Background(), client) 382 if err != nil { 383 err = autorest.NewErrorWithError(err, "datashare.AccountsDeleteFuture", "Result", future.Response(), "Polling failure") 384 return 385 } 386 if !done { 387 or.Response.Response = future.Response() 388 err = azure.NewAsyncOpIncompleteError("datashare.AccountsDeleteFuture") 389 return 390 } 391 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 392 if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { 393 or, err = client.DeleteResponder(or.Response.Response) 394 if err != nil { 395 err = autorest.NewErrorWithError(err, "datashare.AccountsDeleteFuture", "Result", or.Response.Response, "Failure responding to request") 396 } 397 } 398 return 399} 400 401// AccountUpdateParameters update parameters for accounts 402type AccountUpdateParameters struct { 403 // Tags - Tags on the azure resource. 404 Tags map[string]*string `json:"tags"` 405} 406 407// MarshalJSON is the custom marshaler for AccountUpdateParameters. 408func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) { 409 objectMap := make(map[string]interface{}) 410 if aup.Tags != nil { 411 objectMap["tags"] = aup.Tags 412 } 413 return json.Marshal(objectMap) 414} 415 416// ADLSGen1FileDataSet an ADLS Gen 1 file data set. 417type ADLSGen1FileDataSet struct { 418 // ADLSGen1FileProperties - ADLS Gen 1 file data set properties. 419 *ADLSGen1FileProperties `json:"properties,omitempty"` 420 // ID - READ-ONLY; The resource id of the azure resource 421 ID *string `json:"id,omitempty"` 422 // Name - READ-ONLY; Name of the azure resource 423 Name *string `json:"name,omitempty"` 424 // Type - READ-ONLY; Type of the azure resource 425 Type *string `json:"type,omitempty"` 426 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 427 Kind Kind `json:"kind,omitempty"` 428} 429 430// MarshalJSON is the custom marshaler for ADLSGen1FileDataSet. 431func (ag1fds ADLSGen1FileDataSet) MarshalJSON() ([]byte, error) { 432 ag1fds.Kind = KindAdlsGen1File 433 objectMap := make(map[string]interface{}) 434 if ag1fds.ADLSGen1FileProperties != nil { 435 objectMap["properties"] = ag1fds.ADLSGen1FileProperties 436 } 437 if ag1fds.Kind != "" { 438 objectMap["kind"] = ag1fds.Kind 439 } 440 return json.Marshal(objectMap) 441} 442 443// AsADLSGen1FileDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 444func (ag1fds ADLSGen1FileDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 445 return &ag1fds, true 446} 447 448// AsADLSGen1FolderDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 449func (ag1fds ADLSGen1FileDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 450 return nil, false 451} 452 453// AsADLSGen2FileDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 454func (ag1fds ADLSGen1FileDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 455 return nil, false 456} 457 458// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 459func (ag1fds ADLSGen1FileDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 460 return nil, false 461} 462 463// AsADLSGen2FolderDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 464func (ag1fds ADLSGen1FileDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 465 return nil, false 466} 467 468// AsBlobContainerDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 469func (ag1fds ADLSGen1FileDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 470 return nil, false 471} 472 473// AsBlobDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 474func (ag1fds ADLSGen1FileDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 475 return nil, false 476} 477 478// AsBlobFolderDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 479func (ag1fds ADLSGen1FileDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 480 return nil, false 481} 482 483// AsKustoClusterDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 484func (ag1fds ADLSGen1FileDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 485 return nil, false 486} 487 488// AsKustoDatabaseDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 489func (ag1fds ADLSGen1FileDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 490 return nil, false 491} 492 493// AsSQLDBTableDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 494func (ag1fds ADLSGen1FileDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 495 return nil, false 496} 497 498// AsSQLDWTableDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 499func (ag1fds ADLSGen1FileDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 500 return nil, false 501} 502 503// AsDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 504func (ag1fds ADLSGen1FileDataSet) AsDataSet() (*DataSet, bool) { 505 return nil, false 506} 507 508// AsBasicDataSet is the BasicDataSet implementation for ADLSGen1FileDataSet. 509func (ag1fds ADLSGen1FileDataSet) AsBasicDataSet() (BasicDataSet, bool) { 510 return &ag1fds, true 511} 512 513// UnmarshalJSON is the custom unmarshaler for ADLSGen1FileDataSet struct. 514func (ag1fds *ADLSGen1FileDataSet) UnmarshalJSON(body []byte) error { 515 var m map[string]*json.RawMessage 516 err := json.Unmarshal(body, &m) 517 if err != nil { 518 return err 519 } 520 for k, v := range m { 521 switch k { 522 case "properties": 523 if v != nil { 524 var aDLSGen1FileProperties ADLSGen1FileProperties 525 err = json.Unmarshal(*v, &aDLSGen1FileProperties) 526 if err != nil { 527 return err 528 } 529 ag1fds.ADLSGen1FileProperties = &aDLSGen1FileProperties 530 } 531 case "kind": 532 if v != nil { 533 var kind Kind 534 err = json.Unmarshal(*v, &kind) 535 if err != nil { 536 return err 537 } 538 ag1fds.Kind = kind 539 } 540 case "id": 541 if v != nil { 542 var ID string 543 err = json.Unmarshal(*v, &ID) 544 if err != nil { 545 return err 546 } 547 ag1fds.ID = &ID 548 } 549 case "name": 550 if v != nil { 551 var name string 552 err = json.Unmarshal(*v, &name) 553 if err != nil { 554 return err 555 } 556 ag1fds.Name = &name 557 } 558 case "type": 559 if v != nil { 560 var typeVar string 561 err = json.Unmarshal(*v, &typeVar) 562 if err != nil { 563 return err 564 } 565 ag1fds.Type = &typeVar 566 } 567 } 568 } 569 570 return nil 571} 572 573// ADLSGen1FileProperties properties of the ADLS Gen1 file data set. 574type ADLSGen1FileProperties struct { 575 // AccountName - The ADLS account name. 576 AccountName *string `json:"accountName,omitempty"` 577 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 578 DataSetID *string `json:"dataSetId,omitempty"` 579 // FileName - The file name in the ADLS account. 580 FileName *string `json:"fileName,omitempty"` 581 // FolderPath - The folder path within the ADLS account. 582 FolderPath *string `json:"folderPath,omitempty"` 583 // ResourceGroup - Resource group of ADLS account. 584 ResourceGroup *string `json:"resourceGroup,omitempty"` 585 // SubscriptionID - Subscription id of ADLS account. 586 SubscriptionID *string `json:"subscriptionId,omitempty"` 587} 588 589// MarshalJSON is the custom marshaler for ADLSGen1FileProperties. 590func (ag1fp ADLSGen1FileProperties) MarshalJSON() ([]byte, error) { 591 objectMap := make(map[string]interface{}) 592 if ag1fp.AccountName != nil { 593 objectMap["accountName"] = ag1fp.AccountName 594 } 595 if ag1fp.FileName != nil { 596 objectMap["fileName"] = ag1fp.FileName 597 } 598 if ag1fp.FolderPath != nil { 599 objectMap["folderPath"] = ag1fp.FolderPath 600 } 601 if ag1fp.ResourceGroup != nil { 602 objectMap["resourceGroup"] = ag1fp.ResourceGroup 603 } 604 if ag1fp.SubscriptionID != nil { 605 objectMap["subscriptionId"] = ag1fp.SubscriptionID 606 } 607 return json.Marshal(objectMap) 608} 609 610// ADLSGen1FolderDataSet an ADLS Gen 1 folder data set. 611type ADLSGen1FolderDataSet struct { 612 // ADLSGen1FolderProperties - ADLS Gen 1 folder data set properties. 613 *ADLSGen1FolderProperties `json:"properties,omitempty"` 614 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 615 Kind Kind `json:"kind,omitempty"` 616 // ID - READ-ONLY; The resource id of the azure resource 617 ID *string `json:"id,omitempty"` 618 // Name - READ-ONLY; Name of the azure resource 619 Name *string `json:"name,omitempty"` 620 // Type - READ-ONLY; Type of the azure resource 621 Type *string `json:"type,omitempty"` 622} 623 624// MarshalJSON is the custom marshaler for ADLSGen1FolderDataSet. 625func (ag1fds ADLSGen1FolderDataSet) MarshalJSON() ([]byte, error) { 626 ag1fds.Kind = KindAdlsGen1Folder 627 objectMap := make(map[string]interface{}) 628 if ag1fds.ADLSGen1FolderProperties != nil { 629 objectMap["properties"] = ag1fds.ADLSGen1FolderProperties 630 } 631 if ag1fds.Kind != "" { 632 objectMap["kind"] = ag1fds.Kind 633 } 634 return json.Marshal(objectMap) 635} 636 637// AsADLSGen1FileDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 638func (ag1fds ADLSGen1FolderDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 639 return nil, false 640} 641 642// AsADLSGen1FolderDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 643func (ag1fds ADLSGen1FolderDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 644 return &ag1fds, true 645} 646 647// AsADLSGen2FileDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 648func (ag1fds ADLSGen1FolderDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 649 return nil, false 650} 651 652// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 653func (ag1fds ADLSGen1FolderDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 654 return nil, false 655} 656 657// AsADLSGen2FolderDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 658func (ag1fds ADLSGen1FolderDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 659 return nil, false 660} 661 662// AsBlobContainerDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 663func (ag1fds ADLSGen1FolderDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 664 return nil, false 665} 666 667// AsBlobDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 668func (ag1fds ADLSGen1FolderDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 669 return nil, false 670} 671 672// AsBlobFolderDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 673func (ag1fds ADLSGen1FolderDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 674 return nil, false 675} 676 677// AsKustoClusterDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 678func (ag1fds ADLSGen1FolderDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 679 return nil, false 680} 681 682// AsKustoDatabaseDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 683func (ag1fds ADLSGen1FolderDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 684 return nil, false 685} 686 687// AsSQLDBTableDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 688func (ag1fds ADLSGen1FolderDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 689 return nil, false 690} 691 692// AsSQLDWTableDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 693func (ag1fds ADLSGen1FolderDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 694 return nil, false 695} 696 697// AsDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 698func (ag1fds ADLSGen1FolderDataSet) AsDataSet() (*DataSet, bool) { 699 return nil, false 700} 701 702// AsBasicDataSet is the BasicDataSet implementation for ADLSGen1FolderDataSet. 703func (ag1fds ADLSGen1FolderDataSet) AsBasicDataSet() (BasicDataSet, bool) { 704 return &ag1fds, true 705} 706 707// UnmarshalJSON is the custom unmarshaler for ADLSGen1FolderDataSet struct. 708func (ag1fds *ADLSGen1FolderDataSet) UnmarshalJSON(body []byte) error { 709 var m map[string]*json.RawMessage 710 err := json.Unmarshal(body, &m) 711 if err != nil { 712 return err 713 } 714 for k, v := range m { 715 switch k { 716 case "properties": 717 if v != nil { 718 var aDLSGen1FolderProperties ADLSGen1FolderProperties 719 err = json.Unmarshal(*v, &aDLSGen1FolderProperties) 720 if err != nil { 721 return err 722 } 723 ag1fds.ADLSGen1FolderProperties = &aDLSGen1FolderProperties 724 } 725 case "kind": 726 if v != nil { 727 var kind Kind 728 err = json.Unmarshal(*v, &kind) 729 if err != nil { 730 return err 731 } 732 ag1fds.Kind = kind 733 } 734 case "id": 735 if v != nil { 736 var ID string 737 err = json.Unmarshal(*v, &ID) 738 if err != nil { 739 return err 740 } 741 ag1fds.ID = &ID 742 } 743 case "name": 744 if v != nil { 745 var name string 746 err = json.Unmarshal(*v, &name) 747 if err != nil { 748 return err 749 } 750 ag1fds.Name = &name 751 } 752 case "type": 753 if v != nil { 754 var typeVar string 755 err = json.Unmarshal(*v, &typeVar) 756 if err != nil { 757 return err 758 } 759 ag1fds.Type = &typeVar 760 } 761 } 762 } 763 764 return nil 765} 766 767// ADLSGen1FolderProperties properties of the ADLS Gen1 folder data set. 768type ADLSGen1FolderProperties struct { 769 // AccountName - The ADLS account name. 770 AccountName *string `json:"accountName,omitempty"` 771 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 772 DataSetID *string `json:"dataSetId,omitempty"` 773 // FolderPath - The folder path within the ADLS account. 774 FolderPath *string `json:"folderPath,omitempty"` 775 // ResourceGroup - Resource group of ADLS account. 776 ResourceGroup *string `json:"resourceGroup,omitempty"` 777 // SubscriptionID - Subscription id of ADLS account. 778 SubscriptionID *string `json:"subscriptionId,omitempty"` 779} 780 781// MarshalJSON is the custom marshaler for ADLSGen1FolderProperties. 782func (ag1fp ADLSGen1FolderProperties) MarshalJSON() ([]byte, error) { 783 objectMap := make(map[string]interface{}) 784 if ag1fp.AccountName != nil { 785 objectMap["accountName"] = ag1fp.AccountName 786 } 787 if ag1fp.FolderPath != nil { 788 objectMap["folderPath"] = ag1fp.FolderPath 789 } 790 if ag1fp.ResourceGroup != nil { 791 objectMap["resourceGroup"] = ag1fp.ResourceGroup 792 } 793 if ag1fp.SubscriptionID != nil { 794 objectMap["subscriptionId"] = ag1fp.SubscriptionID 795 } 796 return json.Marshal(objectMap) 797} 798 799// ADLSGen2FileDataSet an ADLS Gen 2 file data set. 800type ADLSGen2FileDataSet struct { 801 // ADLSGen2FileProperties - ADLS Gen 2 file data set properties. 802 *ADLSGen2FileProperties `json:"properties,omitempty"` 803 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 804 Kind Kind `json:"kind,omitempty"` 805 // ID - READ-ONLY; The resource id of the azure resource 806 ID *string `json:"id,omitempty"` 807 // Name - READ-ONLY; Name of the azure resource 808 Name *string `json:"name,omitempty"` 809 // Type - READ-ONLY; Type of the azure resource 810 Type *string `json:"type,omitempty"` 811} 812 813// MarshalJSON is the custom marshaler for ADLSGen2FileDataSet. 814func (ag2fds ADLSGen2FileDataSet) MarshalJSON() ([]byte, error) { 815 ag2fds.Kind = KindAdlsGen2File 816 objectMap := make(map[string]interface{}) 817 if ag2fds.ADLSGen2FileProperties != nil { 818 objectMap["properties"] = ag2fds.ADLSGen2FileProperties 819 } 820 if ag2fds.Kind != "" { 821 objectMap["kind"] = ag2fds.Kind 822 } 823 return json.Marshal(objectMap) 824} 825 826// AsADLSGen1FileDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 827func (ag2fds ADLSGen2FileDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 828 return nil, false 829} 830 831// AsADLSGen1FolderDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 832func (ag2fds ADLSGen2FileDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 833 return nil, false 834} 835 836// AsADLSGen2FileDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 837func (ag2fds ADLSGen2FileDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 838 return &ag2fds, true 839} 840 841// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 842func (ag2fds ADLSGen2FileDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 843 return nil, false 844} 845 846// AsADLSGen2FolderDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 847func (ag2fds ADLSGen2FileDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 848 return nil, false 849} 850 851// AsBlobContainerDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 852func (ag2fds ADLSGen2FileDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 853 return nil, false 854} 855 856// AsBlobDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 857func (ag2fds ADLSGen2FileDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 858 return nil, false 859} 860 861// AsBlobFolderDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 862func (ag2fds ADLSGen2FileDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 863 return nil, false 864} 865 866// AsKustoClusterDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 867func (ag2fds ADLSGen2FileDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 868 return nil, false 869} 870 871// AsKustoDatabaseDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 872func (ag2fds ADLSGen2FileDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 873 return nil, false 874} 875 876// AsSQLDBTableDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 877func (ag2fds ADLSGen2FileDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 878 return nil, false 879} 880 881// AsSQLDWTableDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 882func (ag2fds ADLSGen2FileDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 883 return nil, false 884} 885 886// AsDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 887func (ag2fds ADLSGen2FileDataSet) AsDataSet() (*DataSet, bool) { 888 return nil, false 889} 890 891// AsBasicDataSet is the BasicDataSet implementation for ADLSGen2FileDataSet. 892func (ag2fds ADLSGen2FileDataSet) AsBasicDataSet() (BasicDataSet, bool) { 893 return &ag2fds, true 894} 895 896// UnmarshalJSON is the custom unmarshaler for ADLSGen2FileDataSet struct. 897func (ag2fds *ADLSGen2FileDataSet) UnmarshalJSON(body []byte) error { 898 var m map[string]*json.RawMessage 899 err := json.Unmarshal(body, &m) 900 if err != nil { 901 return err 902 } 903 for k, v := range m { 904 switch k { 905 case "properties": 906 if v != nil { 907 var aDLSGen2FileProperties ADLSGen2FileProperties 908 err = json.Unmarshal(*v, &aDLSGen2FileProperties) 909 if err != nil { 910 return err 911 } 912 ag2fds.ADLSGen2FileProperties = &aDLSGen2FileProperties 913 } 914 case "kind": 915 if v != nil { 916 var kind Kind 917 err = json.Unmarshal(*v, &kind) 918 if err != nil { 919 return err 920 } 921 ag2fds.Kind = kind 922 } 923 case "id": 924 if v != nil { 925 var ID string 926 err = json.Unmarshal(*v, &ID) 927 if err != nil { 928 return err 929 } 930 ag2fds.ID = &ID 931 } 932 case "name": 933 if v != nil { 934 var name string 935 err = json.Unmarshal(*v, &name) 936 if err != nil { 937 return err 938 } 939 ag2fds.Name = &name 940 } 941 case "type": 942 if v != nil { 943 var typeVar string 944 err = json.Unmarshal(*v, &typeVar) 945 if err != nil { 946 return err 947 } 948 ag2fds.Type = &typeVar 949 } 950 } 951 } 952 953 return nil 954} 955 956// ADLSGen2FileDataSetMapping an ADLS Gen2 file data set mapping. 957type ADLSGen2FileDataSetMapping struct { 958 // ADLSGen2FileDataSetMappingProperties - ADLS Gen2 file data set mapping properties. 959 *ADLSGen2FileDataSetMappingProperties `json:"properties,omitempty"` 960 // ID - READ-ONLY; The resource id of the azure resource 961 ID *string `json:"id,omitempty"` 962 // Name - READ-ONLY; Name of the azure resource 963 Name *string `json:"name,omitempty"` 964 // Type - READ-ONLY; Type of the azure resource 965 Type *string `json:"type,omitempty"` 966 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 967 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 968} 969 970// MarshalJSON is the custom marshaler for ADLSGen2FileDataSetMapping. 971func (ag2fdsm ADLSGen2FileDataSetMapping) MarshalJSON() ([]byte, error) { 972 ag2fdsm.Kind = KindBasicDataSetMappingKindAdlsGen2File 973 objectMap := make(map[string]interface{}) 974 if ag2fdsm.ADLSGen2FileDataSetMappingProperties != nil { 975 objectMap["properties"] = ag2fdsm.ADLSGen2FileDataSetMappingProperties 976 } 977 if ag2fdsm.Kind != "" { 978 objectMap["kind"] = ag2fdsm.Kind 979 } 980 return json.Marshal(objectMap) 981} 982 983// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 984func (ag2fdsm ADLSGen2FileDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 985 return &ag2fdsm, true 986} 987 988// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 989func (ag2fdsm ADLSGen2FileDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 990 return nil, false 991} 992 993// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 994func (ag2fdsm ADLSGen2FileDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 995 return nil, false 996} 997 998// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 999func (ag2fdsm ADLSGen2FileDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 1000 return nil, false 1001} 1002 1003// AsBlobDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1004func (ag2fdsm ADLSGen2FileDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 1005 return nil, false 1006} 1007 1008// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1009func (ag2fdsm ADLSGen2FileDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 1010 return nil, false 1011} 1012 1013// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1014func (ag2fdsm ADLSGen2FileDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 1015 return nil, false 1016} 1017 1018// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1019func (ag2fdsm ADLSGen2FileDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 1020 return nil, false 1021} 1022 1023// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1024func (ag2fdsm ADLSGen2FileDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 1025 return nil, false 1026} 1027 1028// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1029func (ag2fdsm ADLSGen2FileDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 1030 return nil, false 1031} 1032 1033// AsDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1034func (ag2fdsm ADLSGen2FileDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 1035 return nil, false 1036} 1037 1038// AsBasicDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileDataSetMapping. 1039func (ag2fdsm ADLSGen2FileDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 1040 return &ag2fdsm, true 1041} 1042 1043// UnmarshalJSON is the custom unmarshaler for ADLSGen2FileDataSetMapping struct. 1044func (ag2fdsm *ADLSGen2FileDataSetMapping) UnmarshalJSON(body []byte) error { 1045 var m map[string]*json.RawMessage 1046 err := json.Unmarshal(body, &m) 1047 if err != nil { 1048 return err 1049 } 1050 for k, v := range m { 1051 switch k { 1052 case "properties": 1053 if v != nil { 1054 var aDLSGen2FileDataSetMappingProperties ADLSGen2FileDataSetMappingProperties 1055 err = json.Unmarshal(*v, &aDLSGen2FileDataSetMappingProperties) 1056 if err != nil { 1057 return err 1058 } 1059 ag2fdsm.ADLSGen2FileDataSetMappingProperties = &aDLSGen2FileDataSetMappingProperties 1060 } 1061 case "kind": 1062 if v != nil { 1063 var kind KindBasicDataSetMapping 1064 err = json.Unmarshal(*v, &kind) 1065 if err != nil { 1066 return err 1067 } 1068 ag2fdsm.Kind = kind 1069 } 1070 case "id": 1071 if v != nil { 1072 var ID string 1073 err = json.Unmarshal(*v, &ID) 1074 if err != nil { 1075 return err 1076 } 1077 ag2fdsm.ID = &ID 1078 } 1079 case "name": 1080 if v != nil { 1081 var name string 1082 err = json.Unmarshal(*v, &name) 1083 if err != nil { 1084 return err 1085 } 1086 ag2fdsm.Name = &name 1087 } 1088 case "type": 1089 if v != nil { 1090 var typeVar string 1091 err = json.Unmarshal(*v, &typeVar) 1092 if err != nil { 1093 return err 1094 } 1095 ag2fdsm.Type = &typeVar 1096 } 1097 } 1098 } 1099 1100 return nil 1101} 1102 1103// ADLSGen2FileDataSetMappingProperties ADLS Gen 2 file data set mapping property bag. 1104type ADLSGen2FileDataSetMappingProperties struct { 1105 // DataSetID - The id of the source data set. 1106 DataSetID *string `json:"dataSetId,omitempty"` 1107 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 1108 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 1109 // FilePath - File path within the file system. 1110 FilePath *string `json:"filePath,omitempty"` 1111 // FileSystem - File system to which the file belongs. 1112 FileSystem *string `json:"fileSystem,omitempty"` 1113 // OutputType - Type of output file. Possible values include: 'Csv', 'Parquet' 1114 OutputType OutputType `json:"outputType,omitempty"` 1115 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 1116 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 1117 // ResourceGroup - Resource group of storage account. 1118 ResourceGroup *string `json:"resourceGroup,omitempty"` 1119 // StorageAccountName - Storage account name of the source data set. 1120 StorageAccountName *string `json:"storageAccountName,omitempty"` 1121 // SubscriptionID - Subscription id of storage account. 1122 SubscriptionID *string `json:"subscriptionId,omitempty"` 1123} 1124 1125// MarshalJSON is the custom marshaler for ADLSGen2FileDataSetMappingProperties. 1126func (ag2fdsmp ADLSGen2FileDataSetMappingProperties) MarshalJSON() ([]byte, error) { 1127 objectMap := make(map[string]interface{}) 1128 if ag2fdsmp.DataSetID != nil { 1129 objectMap["dataSetId"] = ag2fdsmp.DataSetID 1130 } 1131 if ag2fdsmp.FilePath != nil { 1132 objectMap["filePath"] = ag2fdsmp.FilePath 1133 } 1134 if ag2fdsmp.FileSystem != nil { 1135 objectMap["fileSystem"] = ag2fdsmp.FileSystem 1136 } 1137 if ag2fdsmp.OutputType != "" { 1138 objectMap["outputType"] = ag2fdsmp.OutputType 1139 } 1140 if ag2fdsmp.ResourceGroup != nil { 1141 objectMap["resourceGroup"] = ag2fdsmp.ResourceGroup 1142 } 1143 if ag2fdsmp.StorageAccountName != nil { 1144 objectMap["storageAccountName"] = ag2fdsmp.StorageAccountName 1145 } 1146 if ag2fdsmp.SubscriptionID != nil { 1147 objectMap["subscriptionId"] = ag2fdsmp.SubscriptionID 1148 } 1149 return json.Marshal(objectMap) 1150} 1151 1152// ADLSGen2FileProperties properties of the ADLS Gen2 file data set. 1153type ADLSGen2FileProperties struct { 1154 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 1155 DataSetID *string `json:"dataSetId,omitempty"` 1156 // FilePath - File path within the file system. 1157 FilePath *string `json:"filePath,omitempty"` 1158 // FileSystem - File system to which the file belongs. 1159 FileSystem *string `json:"fileSystem,omitempty"` 1160 // ResourceGroup - Resource group of storage account 1161 ResourceGroup *string `json:"resourceGroup,omitempty"` 1162 // StorageAccountName - Storage account name of the source data set 1163 StorageAccountName *string `json:"storageAccountName,omitempty"` 1164 // SubscriptionID - Subscription id of storage account 1165 SubscriptionID *string `json:"subscriptionId,omitempty"` 1166} 1167 1168// MarshalJSON is the custom marshaler for ADLSGen2FileProperties. 1169func (ag2fp ADLSGen2FileProperties) MarshalJSON() ([]byte, error) { 1170 objectMap := make(map[string]interface{}) 1171 if ag2fp.FilePath != nil { 1172 objectMap["filePath"] = ag2fp.FilePath 1173 } 1174 if ag2fp.FileSystem != nil { 1175 objectMap["fileSystem"] = ag2fp.FileSystem 1176 } 1177 if ag2fp.ResourceGroup != nil { 1178 objectMap["resourceGroup"] = ag2fp.ResourceGroup 1179 } 1180 if ag2fp.StorageAccountName != nil { 1181 objectMap["storageAccountName"] = ag2fp.StorageAccountName 1182 } 1183 if ag2fp.SubscriptionID != nil { 1184 objectMap["subscriptionId"] = ag2fp.SubscriptionID 1185 } 1186 return json.Marshal(objectMap) 1187} 1188 1189// ADLSGen2FileSystemDataSet an ADLS Gen 2 file system data set. 1190type ADLSGen2FileSystemDataSet struct { 1191 // ADLSGen2FileSystemProperties - ADLS Gen 2 file system data set properties. 1192 *ADLSGen2FileSystemProperties `json:"properties,omitempty"` 1193 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 1194 Kind Kind `json:"kind,omitempty"` 1195 // ID - READ-ONLY; The resource id of the azure resource 1196 ID *string `json:"id,omitempty"` 1197 // Name - READ-ONLY; Name of the azure resource 1198 Name *string `json:"name,omitempty"` 1199 // Type - READ-ONLY; Type of the azure resource 1200 Type *string `json:"type,omitempty"` 1201} 1202 1203// MarshalJSON is the custom marshaler for ADLSGen2FileSystemDataSet. 1204func (ag2fsds ADLSGen2FileSystemDataSet) MarshalJSON() ([]byte, error) { 1205 ag2fsds.Kind = KindAdlsGen2FileSystem 1206 objectMap := make(map[string]interface{}) 1207 if ag2fsds.ADLSGen2FileSystemProperties != nil { 1208 objectMap["properties"] = ag2fsds.ADLSGen2FileSystemProperties 1209 } 1210 if ag2fsds.Kind != "" { 1211 objectMap["kind"] = ag2fsds.Kind 1212 } 1213 return json.Marshal(objectMap) 1214} 1215 1216// AsADLSGen1FileDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1217func (ag2fsds ADLSGen2FileSystemDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 1218 return nil, false 1219} 1220 1221// AsADLSGen1FolderDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1222func (ag2fsds ADLSGen2FileSystemDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 1223 return nil, false 1224} 1225 1226// AsADLSGen2FileDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1227func (ag2fsds ADLSGen2FileSystemDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 1228 return nil, false 1229} 1230 1231// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1232func (ag2fsds ADLSGen2FileSystemDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 1233 return &ag2fsds, true 1234} 1235 1236// AsADLSGen2FolderDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1237func (ag2fsds ADLSGen2FileSystemDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 1238 return nil, false 1239} 1240 1241// AsBlobContainerDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1242func (ag2fsds ADLSGen2FileSystemDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 1243 return nil, false 1244} 1245 1246// AsBlobDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1247func (ag2fsds ADLSGen2FileSystemDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 1248 return nil, false 1249} 1250 1251// AsBlobFolderDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1252func (ag2fsds ADLSGen2FileSystemDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 1253 return nil, false 1254} 1255 1256// AsKustoClusterDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1257func (ag2fsds ADLSGen2FileSystemDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 1258 return nil, false 1259} 1260 1261// AsKustoDatabaseDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1262func (ag2fsds ADLSGen2FileSystemDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 1263 return nil, false 1264} 1265 1266// AsSQLDBTableDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1267func (ag2fsds ADLSGen2FileSystemDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 1268 return nil, false 1269} 1270 1271// AsSQLDWTableDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1272func (ag2fsds ADLSGen2FileSystemDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 1273 return nil, false 1274} 1275 1276// AsDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1277func (ag2fsds ADLSGen2FileSystemDataSet) AsDataSet() (*DataSet, bool) { 1278 return nil, false 1279} 1280 1281// AsBasicDataSet is the BasicDataSet implementation for ADLSGen2FileSystemDataSet. 1282func (ag2fsds ADLSGen2FileSystemDataSet) AsBasicDataSet() (BasicDataSet, bool) { 1283 return &ag2fsds, true 1284} 1285 1286// UnmarshalJSON is the custom unmarshaler for ADLSGen2FileSystemDataSet struct. 1287func (ag2fsds *ADLSGen2FileSystemDataSet) UnmarshalJSON(body []byte) error { 1288 var m map[string]*json.RawMessage 1289 err := json.Unmarshal(body, &m) 1290 if err != nil { 1291 return err 1292 } 1293 for k, v := range m { 1294 switch k { 1295 case "properties": 1296 if v != nil { 1297 var aDLSGen2FileSystemProperties ADLSGen2FileSystemProperties 1298 err = json.Unmarshal(*v, &aDLSGen2FileSystemProperties) 1299 if err != nil { 1300 return err 1301 } 1302 ag2fsds.ADLSGen2FileSystemProperties = &aDLSGen2FileSystemProperties 1303 } 1304 case "kind": 1305 if v != nil { 1306 var kind Kind 1307 err = json.Unmarshal(*v, &kind) 1308 if err != nil { 1309 return err 1310 } 1311 ag2fsds.Kind = kind 1312 } 1313 case "id": 1314 if v != nil { 1315 var ID string 1316 err = json.Unmarshal(*v, &ID) 1317 if err != nil { 1318 return err 1319 } 1320 ag2fsds.ID = &ID 1321 } 1322 case "name": 1323 if v != nil { 1324 var name string 1325 err = json.Unmarshal(*v, &name) 1326 if err != nil { 1327 return err 1328 } 1329 ag2fsds.Name = &name 1330 } 1331 case "type": 1332 if v != nil { 1333 var typeVar string 1334 err = json.Unmarshal(*v, &typeVar) 1335 if err != nil { 1336 return err 1337 } 1338 ag2fsds.Type = &typeVar 1339 } 1340 } 1341 } 1342 1343 return nil 1344} 1345 1346// ADLSGen2FileSystemDataSetMapping an ADLS Gen2 file system data set mapping. 1347type ADLSGen2FileSystemDataSetMapping struct { 1348 // ADLSGen2FileSystemDataSetMappingProperties - ADLS Gen2 file system data set mapping properties. 1349 *ADLSGen2FileSystemDataSetMappingProperties `json:"properties,omitempty"` 1350 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 1351 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 1352 // ID - READ-ONLY; The resource id of the azure resource 1353 ID *string `json:"id,omitempty"` 1354 // Name - READ-ONLY; Name of the azure resource 1355 Name *string `json:"name,omitempty"` 1356 // Type - READ-ONLY; Type of the azure resource 1357 Type *string `json:"type,omitempty"` 1358} 1359 1360// MarshalJSON is the custom marshaler for ADLSGen2FileSystemDataSetMapping. 1361func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) MarshalJSON() ([]byte, error) { 1362 ag2fsdsm.Kind = KindBasicDataSetMappingKindAdlsGen2FileSystem 1363 objectMap := make(map[string]interface{}) 1364 if ag2fsdsm.ADLSGen2FileSystemDataSetMappingProperties != nil { 1365 objectMap["properties"] = ag2fsdsm.ADLSGen2FileSystemDataSetMappingProperties 1366 } 1367 if ag2fsdsm.Kind != "" { 1368 objectMap["kind"] = ag2fsdsm.Kind 1369 } 1370 return json.Marshal(objectMap) 1371} 1372 1373// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1374func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 1375 return nil, false 1376} 1377 1378// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1379func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 1380 return &ag2fsdsm, true 1381} 1382 1383// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1384func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 1385 return nil, false 1386} 1387 1388// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1389func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 1390 return nil, false 1391} 1392 1393// AsBlobDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1394func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 1395 return nil, false 1396} 1397 1398// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1399func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 1400 return nil, false 1401} 1402 1403// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1404func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 1405 return nil, false 1406} 1407 1408// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1409func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 1410 return nil, false 1411} 1412 1413// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1414func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 1415 return nil, false 1416} 1417 1418// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1419func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 1420 return nil, false 1421} 1422 1423// AsDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1424func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 1425 return nil, false 1426} 1427 1428// AsBasicDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FileSystemDataSetMapping. 1429func (ag2fsdsm ADLSGen2FileSystemDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 1430 return &ag2fsdsm, true 1431} 1432 1433// UnmarshalJSON is the custom unmarshaler for ADLSGen2FileSystemDataSetMapping struct. 1434func (ag2fsdsm *ADLSGen2FileSystemDataSetMapping) UnmarshalJSON(body []byte) error { 1435 var m map[string]*json.RawMessage 1436 err := json.Unmarshal(body, &m) 1437 if err != nil { 1438 return err 1439 } 1440 for k, v := range m { 1441 switch k { 1442 case "properties": 1443 if v != nil { 1444 var aDLSGen2FileSystemDataSetMappingProperties ADLSGen2FileSystemDataSetMappingProperties 1445 err = json.Unmarshal(*v, &aDLSGen2FileSystemDataSetMappingProperties) 1446 if err != nil { 1447 return err 1448 } 1449 ag2fsdsm.ADLSGen2FileSystemDataSetMappingProperties = &aDLSGen2FileSystemDataSetMappingProperties 1450 } 1451 case "kind": 1452 if v != nil { 1453 var kind KindBasicDataSetMapping 1454 err = json.Unmarshal(*v, &kind) 1455 if err != nil { 1456 return err 1457 } 1458 ag2fsdsm.Kind = kind 1459 } 1460 case "id": 1461 if v != nil { 1462 var ID string 1463 err = json.Unmarshal(*v, &ID) 1464 if err != nil { 1465 return err 1466 } 1467 ag2fsdsm.ID = &ID 1468 } 1469 case "name": 1470 if v != nil { 1471 var name string 1472 err = json.Unmarshal(*v, &name) 1473 if err != nil { 1474 return err 1475 } 1476 ag2fsdsm.Name = &name 1477 } 1478 case "type": 1479 if v != nil { 1480 var typeVar string 1481 err = json.Unmarshal(*v, &typeVar) 1482 if err != nil { 1483 return err 1484 } 1485 ag2fsdsm.Type = &typeVar 1486 } 1487 } 1488 } 1489 1490 return nil 1491} 1492 1493// ADLSGen2FileSystemDataSetMappingProperties ADLS Gen 2 file system data set mapping property bag. 1494type ADLSGen2FileSystemDataSetMappingProperties struct { 1495 // DataSetID - The id of the source data set. 1496 DataSetID *string `json:"dataSetId,omitempty"` 1497 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 1498 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 1499 // FileSystem - The file system name. 1500 FileSystem *string `json:"fileSystem,omitempty"` 1501 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 1502 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 1503 // ResourceGroup - Resource group of storage account. 1504 ResourceGroup *string `json:"resourceGroup,omitempty"` 1505 // StorageAccountName - Storage account name of the source data set. 1506 StorageAccountName *string `json:"storageAccountName,omitempty"` 1507 // SubscriptionID - Subscription id of storage account. 1508 SubscriptionID *string `json:"subscriptionId,omitempty"` 1509} 1510 1511// MarshalJSON is the custom marshaler for ADLSGen2FileSystemDataSetMappingProperties. 1512func (ag2fsdsmp ADLSGen2FileSystemDataSetMappingProperties) MarshalJSON() ([]byte, error) { 1513 objectMap := make(map[string]interface{}) 1514 if ag2fsdsmp.DataSetID != nil { 1515 objectMap["dataSetId"] = ag2fsdsmp.DataSetID 1516 } 1517 if ag2fsdsmp.FileSystem != nil { 1518 objectMap["fileSystem"] = ag2fsdsmp.FileSystem 1519 } 1520 if ag2fsdsmp.ResourceGroup != nil { 1521 objectMap["resourceGroup"] = ag2fsdsmp.ResourceGroup 1522 } 1523 if ag2fsdsmp.StorageAccountName != nil { 1524 objectMap["storageAccountName"] = ag2fsdsmp.StorageAccountName 1525 } 1526 if ag2fsdsmp.SubscriptionID != nil { 1527 objectMap["subscriptionId"] = ag2fsdsmp.SubscriptionID 1528 } 1529 return json.Marshal(objectMap) 1530} 1531 1532// ADLSGen2FileSystemProperties properties of the ADLS Gen2 file system data set. 1533type ADLSGen2FileSystemProperties struct { 1534 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 1535 DataSetID *string `json:"dataSetId,omitempty"` 1536 // FileSystem - The file system name. 1537 FileSystem *string `json:"fileSystem,omitempty"` 1538 // ResourceGroup - Resource group of storage account 1539 ResourceGroup *string `json:"resourceGroup,omitempty"` 1540 // StorageAccountName - Storage account name of the source data set 1541 StorageAccountName *string `json:"storageAccountName,omitempty"` 1542 // SubscriptionID - Subscription id of storage account 1543 SubscriptionID *string `json:"subscriptionId,omitempty"` 1544} 1545 1546// MarshalJSON is the custom marshaler for ADLSGen2FileSystemProperties. 1547func (ag2fsp ADLSGen2FileSystemProperties) MarshalJSON() ([]byte, error) { 1548 objectMap := make(map[string]interface{}) 1549 if ag2fsp.FileSystem != nil { 1550 objectMap["fileSystem"] = ag2fsp.FileSystem 1551 } 1552 if ag2fsp.ResourceGroup != nil { 1553 objectMap["resourceGroup"] = ag2fsp.ResourceGroup 1554 } 1555 if ag2fsp.StorageAccountName != nil { 1556 objectMap["storageAccountName"] = ag2fsp.StorageAccountName 1557 } 1558 if ag2fsp.SubscriptionID != nil { 1559 objectMap["subscriptionId"] = ag2fsp.SubscriptionID 1560 } 1561 return json.Marshal(objectMap) 1562} 1563 1564// ADLSGen2FolderDataSet an ADLS Gen 2 folder data set. 1565type ADLSGen2FolderDataSet struct { 1566 // ADLSGen2FolderProperties - ADLS Gen 2 folder data set properties. 1567 *ADLSGen2FolderProperties `json:"properties,omitempty"` 1568 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 1569 Kind Kind `json:"kind,omitempty"` 1570 // ID - READ-ONLY; The resource id of the azure resource 1571 ID *string `json:"id,omitempty"` 1572 // Name - READ-ONLY; Name of the azure resource 1573 Name *string `json:"name,omitempty"` 1574 // Type - READ-ONLY; Type of the azure resource 1575 Type *string `json:"type,omitempty"` 1576} 1577 1578// MarshalJSON is the custom marshaler for ADLSGen2FolderDataSet. 1579func (ag2fds ADLSGen2FolderDataSet) MarshalJSON() ([]byte, error) { 1580 ag2fds.Kind = KindAdlsGen2Folder 1581 objectMap := make(map[string]interface{}) 1582 if ag2fds.ADLSGen2FolderProperties != nil { 1583 objectMap["properties"] = ag2fds.ADLSGen2FolderProperties 1584 } 1585 if ag2fds.Kind != "" { 1586 objectMap["kind"] = ag2fds.Kind 1587 } 1588 return json.Marshal(objectMap) 1589} 1590 1591// AsADLSGen1FileDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1592func (ag2fds ADLSGen2FolderDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 1593 return nil, false 1594} 1595 1596// AsADLSGen1FolderDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1597func (ag2fds ADLSGen2FolderDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 1598 return nil, false 1599} 1600 1601// AsADLSGen2FileDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1602func (ag2fds ADLSGen2FolderDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 1603 return nil, false 1604} 1605 1606// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1607func (ag2fds ADLSGen2FolderDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 1608 return nil, false 1609} 1610 1611// AsADLSGen2FolderDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1612func (ag2fds ADLSGen2FolderDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 1613 return &ag2fds, true 1614} 1615 1616// AsBlobContainerDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1617func (ag2fds ADLSGen2FolderDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 1618 return nil, false 1619} 1620 1621// AsBlobDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1622func (ag2fds ADLSGen2FolderDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 1623 return nil, false 1624} 1625 1626// AsBlobFolderDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1627func (ag2fds ADLSGen2FolderDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 1628 return nil, false 1629} 1630 1631// AsKustoClusterDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1632func (ag2fds ADLSGen2FolderDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 1633 return nil, false 1634} 1635 1636// AsKustoDatabaseDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1637func (ag2fds ADLSGen2FolderDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 1638 return nil, false 1639} 1640 1641// AsSQLDBTableDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1642func (ag2fds ADLSGen2FolderDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 1643 return nil, false 1644} 1645 1646// AsSQLDWTableDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1647func (ag2fds ADLSGen2FolderDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 1648 return nil, false 1649} 1650 1651// AsDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1652func (ag2fds ADLSGen2FolderDataSet) AsDataSet() (*DataSet, bool) { 1653 return nil, false 1654} 1655 1656// AsBasicDataSet is the BasicDataSet implementation for ADLSGen2FolderDataSet. 1657func (ag2fds ADLSGen2FolderDataSet) AsBasicDataSet() (BasicDataSet, bool) { 1658 return &ag2fds, true 1659} 1660 1661// UnmarshalJSON is the custom unmarshaler for ADLSGen2FolderDataSet struct. 1662func (ag2fds *ADLSGen2FolderDataSet) UnmarshalJSON(body []byte) error { 1663 var m map[string]*json.RawMessage 1664 err := json.Unmarshal(body, &m) 1665 if err != nil { 1666 return err 1667 } 1668 for k, v := range m { 1669 switch k { 1670 case "properties": 1671 if v != nil { 1672 var aDLSGen2FolderProperties ADLSGen2FolderProperties 1673 err = json.Unmarshal(*v, &aDLSGen2FolderProperties) 1674 if err != nil { 1675 return err 1676 } 1677 ag2fds.ADLSGen2FolderProperties = &aDLSGen2FolderProperties 1678 } 1679 case "kind": 1680 if v != nil { 1681 var kind Kind 1682 err = json.Unmarshal(*v, &kind) 1683 if err != nil { 1684 return err 1685 } 1686 ag2fds.Kind = kind 1687 } 1688 case "id": 1689 if v != nil { 1690 var ID string 1691 err = json.Unmarshal(*v, &ID) 1692 if err != nil { 1693 return err 1694 } 1695 ag2fds.ID = &ID 1696 } 1697 case "name": 1698 if v != nil { 1699 var name string 1700 err = json.Unmarshal(*v, &name) 1701 if err != nil { 1702 return err 1703 } 1704 ag2fds.Name = &name 1705 } 1706 case "type": 1707 if v != nil { 1708 var typeVar string 1709 err = json.Unmarshal(*v, &typeVar) 1710 if err != nil { 1711 return err 1712 } 1713 ag2fds.Type = &typeVar 1714 } 1715 } 1716 } 1717 1718 return nil 1719} 1720 1721// ADLSGen2FolderDataSetMapping an ADLS Gen2 folder data set mapping. 1722type ADLSGen2FolderDataSetMapping struct { 1723 // ADLSGen2FolderDataSetMappingProperties - ADLS Gen2 folder data set mapping properties. 1724 *ADLSGen2FolderDataSetMappingProperties `json:"properties,omitempty"` 1725 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 1726 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 1727 // ID - READ-ONLY; The resource id of the azure resource 1728 ID *string `json:"id,omitempty"` 1729 // Name - READ-ONLY; Name of the azure resource 1730 Name *string `json:"name,omitempty"` 1731 // Type - READ-ONLY; Type of the azure resource 1732 Type *string `json:"type,omitempty"` 1733} 1734 1735// MarshalJSON is the custom marshaler for ADLSGen2FolderDataSetMapping. 1736func (ag2fdsm ADLSGen2FolderDataSetMapping) MarshalJSON() ([]byte, error) { 1737 ag2fdsm.Kind = KindBasicDataSetMappingKindAdlsGen2Folder 1738 objectMap := make(map[string]interface{}) 1739 if ag2fdsm.ADLSGen2FolderDataSetMappingProperties != nil { 1740 objectMap["properties"] = ag2fdsm.ADLSGen2FolderDataSetMappingProperties 1741 } 1742 if ag2fdsm.Kind != "" { 1743 objectMap["kind"] = ag2fdsm.Kind 1744 } 1745 return json.Marshal(objectMap) 1746} 1747 1748// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1749func (ag2fdsm ADLSGen2FolderDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 1750 return nil, false 1751} 1752 1753// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1754func (ag2fdsm ADLSGen2FolderDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 1755 return nil, false 1756} 1757 1758// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1759func (ag2fdsm ADLSGen2FolderDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 1760 return &ag2fdsm, true 1761} 1762 1763// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1764func (ag2fdsm ADLSGen2FolderDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 1765 return nil, false 1766} 1767 1768// AsBlobDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1769func (ag2fdsm ADLSGen2FolderDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 1770 return nil, false 1771} 1772 1773// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1774func (ag2fdsm ADLSGen2FolderDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 1775 return nil, false 1776} 1777 1778// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1779func (ag2fdsm ADLSGen2FolderDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 1780 return nil, false 1781} 1782 1783// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1784func (ag2fdsm ADLSGen2FolderDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 1785 return nil, false 1786} 1787 1788// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1789func (ag2fdsm ADLSGen2FolderDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 1790 return nil, false 1791} 1792 1793// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1794func (ag2fdsm ADLSGen2FolderDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 1795 return nil, false 1796} 1797 1798// AsDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1799func (ag2fdsm ADLSGen2FolderDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 1800 return nil, false 1801} 1802 1803// AsBasicDataSetMapping is the BasicDataSetMapping implementation for ADLSGen2FolderDataSetMapping. 1804func (ag2fdsm ADLSGen2FolderDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 1805 return &ag2fdsm, true 1806} 1807 1808// UnmarshalJSON is the custom unmarshaler for ADLSGen2FolderDataSetMapping struct. 1809func (ag2fdsm *ADLSGen2FolderDataSetMapping) UnmarshalJSON(body []byte) error { 1810 var m map[string]*json.RawMessage 1811 err := json.Unmarshal(body, &m) 1812 if err != nil { 1813 return err 1814 } 1815 for k, v := range m { 1816 switch k { 1817 case "properties": 1818 if v != nil { 1819 var aDLSGen2FolderDataSetMappingProperties ADLSGen2FolderDataSetMappingProperties 1820 err = json.Unmarshal(*v, &aDLSGen2FolderDataSetMappingProperties) 1821 if err != nil { 1822 return err 1823 } 1824 ag2fdsm.ADLSGen2FolderDataSetMappingProperties = &aDLSGen2FolderDataSetMappingProperties 1825 } 1826 case "kind": 1827 if v != nil { 1828 var kind KindBasicDataSetMapping 1829 err = json.Unmarshal(*v, &kind) 1830 if err != nil { 1831 return err 1832 } 1833 ag2fdsm.Kind = kind 1834 } 1835 case "id": 1836 if v != nil { 1837 var ID string 1838 err = json.Unmarshal(*v, &ID) 1839 if err != nil { 1840 return err 1841 } 1842 ag2fdsm.ID = &ID 1843 } 1844 case "name": 1845 if v != nil { 1846 var name string 1847 err = json.Unmarshal(*v, &name) 1848 if err != nil { 1849 return err 1850 } 1851 ag2fdsm.Name = &name 1852 } 1853 case "type": 1854 if v != nil { 1855 var typeVar string 1856 err = json.Unmarshal(*v, &typeVar) 1857 if err != nil { 1858 return err 1859 } 1860 ag2fdsm.Type = &typeVar 1861 } 1862 } 1863 } 1864 1865 return nil 1866} 1867 1868// ADLSGen2FolderDataSetMappingProperties ADLS Gen 2 folder data set mapping property bag. 1869type ADLSGen2FolderDataSetMappingProperties struct { 1870 // DataSetID - The id of the source data set. 1871 DataSetID *string `json:"dataSetId,omitempty"` 1872 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 1873 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 1874 // FileSystem - File system to which the folder belongs. 1875 FileSystem *string `json:"fileSystem,omitempty"` 1876 // FolderPath - Folder path within the file system. 1877 FolderPath *string `json:"folderPath,omitempty"` 1878 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 1879 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 1880 // ResourceGroup - Resource group of storage account. 1881 ResourceGroup *string `json:"resourceGroup,omitempty"` 1882 // StorageAccountName - Storage account name of the source data set. 1883 StorageAccountName *string `json:"storageAccountName,omitempty"` 1884 // SubscriptionID - Subscription id of storage account. 1885 SubscriptionID *string `json:"subscriptionId,omitempty"` 1886} 1887 1888// MarshalJSON is the custom marshaler for ADLSGen2FolderDataSetMappingProperties. 1889func (ag2fdsmp ADLSGen2FolderDataSetMappingProperties) MarshalJSON() ([]byte, error) { 1890 objectMap := make(map[string]interface{}) 1891 if ag2fdsmp.DataSetID != nil { 1892 objectMap["dataSetId"] = ag2fdsmp.DataSetID 1893 } 1894 if ag2fdsmp.FileSystem != nil { 1895 objectMap["fileSystem"] = ag2fdsmp.FileSystem 1896 } 1897 if ag2fdsmp.FolderPath != nil { 1898 objectMap["folderPath"] = ag2fdsmp.FolderPath 1899 } 1900 if ag2fdsmp.ResourceGroup != nil { 1901 objectMap["resourceGroup"] = ag2fdsmp.ResourceGroup 1902 } 1903 if ag2fdsmp.StorageAccountName != nil { 1904 objectMap["storageAccountName"] = ag2fdsmp.StorageAccountName 1905 } 1906 if ag2fdsmp.SubscriptionID != nil { 1907 objectMap["subscriptionId"] = ag2fdsmp.SubscriptionID 1908 } 1909 return json.Marshal(objectMap) 1910} 1911 1912// ADLSGen2FolderProperties properties of the ADLS Gen2 folder data set. 1913type ADLSGen2FolderProperties struct { 1914 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 1915 DataSetID *string `json:"dataSetId,omitempty"` 1916 // FileSystem - File system to which the folder belongs. 1917 FileSystem *string `json:"fileSystem,omitempty"` 1918 // FolderPath - Folder path within the file system. 1919 FolderPath *string `json:"folderPath,omitempty"` 1920 // ResourceGroup - Resource group of storage account 1921 ResourceGroup *string `json:"resourceGroup,omitempty"` 1922 // StorageAccountName - Storage account name of the source data set 1923 StorageAccountName *string `json:"storageAccountName,omitempty"` 1924 // SubscriptionID - Subscription id of storage account 1925 SubscriptionID *string `json:"subscriptionId,omitempty"` 1926} 1927 1928// MarshalJSON is the custom marshaler for ADLSGen2FolderProperties. 1929func (ag2fp ADLSGen2FolderProperties) MarshalJSON() ([]byte, error) { 1930 objectMap := make(map[string]interface{}) 1931 if ag2fp.FileSystem != nil { 1932 objectMap["fileSystem"] = ag2fp.FileSystem 1933 } 1934 if ag2fp.FolderPath != nil { 1935 objectMap["folderPath"] = ag2fp.FolderPath 1936 } 1937 if ag2fp.ResourceGroup != nil { 1938 objectMap["resourceGroup"] = ag2fp.ResourceGroup 1939 } 1940 if ag2fp.StorageAccountName != nil { 1941 objectMap["storageAccountName"] = ag2fp.StorageAccountName 1942 } 1943 if ag2fp.SubscriptionID != nil { 1944 objectMap["subscriptionId"] = ag2fp.SubscriptionID 1945 } 1946 return json.Marshal(objectMap) 1947} 1948 1949// BlobContainerDataSet an Azure storage blob container data set. 1950type BlobContainerDataSet struct { 1951 // BlobContainerProperties - Blob container data set properties. 1952 *BlobContainerProperties `json:"properties,omitempty"` 1953 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 1954 Kind Kind `json:"kind,omitempty"` 1955 // ID - READ-ONLY; The resource id of the azure resource 1956 ID *string `json:"id,omitempty"` 1957 // Name - READ-ONLY; Name of the azure resource 1958 Name *string `json:"name,omitempty"` 1959 // Type - READ-ONLY; Type of the azure resource 1960 Type *string `json:"type,omitempty"` 1961} 1962 1963// MarshalJSON is the custom marshaler for BlobContainerDataSet. 1964func (bcds BlobContainerDataSet) MarshalJSON() ([]byte, error) { 1965 bcds.Kind = KindContainer 1966 objectMap := make(map[string]interface{}) 1967 if bcds.BlobContainerProperties != nil { 1968 objectMap["properties"] = bcds.BlobContainerProperties 1969 } 1970 if bcds.Kind != "" { 1971 objectMap["kind"] = bcds.Kind 1972 } 1973 return json.Marshal(objectMap) 1974} 1975 1976// AsADLSGen1FileDataSet is the BasicDataSet implementation for BlobContainerDataSet. 1977func (bcds BlobContainerDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 1978 return nil, false 1979} 1980 1981// AsADLSGen1FolderDataSet is the BasicDataSet implementation for BlobContainerDataSet. 1982func (bcds BlobContainerDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 1983 return nil, false 1984} 1985 1986// AsADLSGen2FileDataSet is the BasicDataSet implementation for BlobContainerDataSet. 1987func (bcds BlobContainerDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 1988 return nil, false 1989} 1990 1991// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for BlobContainerDataSet. 1992func (bcds BlobContainerDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 1993 return nil, false 1994} 1995 1996// AsADLSGen2FolderDataSet is the BasicDataSet implementation for BlobContainerDataSet. 1997func (bcds BlobContainerDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 1998 return nil, false 1999} 2000 2001// AsBlobContainerDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2002func (bcds BlobContainerDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 2003 return &bcds, true 2004} 2005 2006// AsBlobDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2007func (bcds BlobContainerDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 2008 return nil, false 2009} 2010 2011// AsBlobFolderDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2012func (bcds BlobContainerDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 2013 return nil, false 2014} 2015 2016// AsKustoClusterDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2017func (bcds BlobContainerDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 2018 return nil, false 2019} 2020 2021// AsKustoDatabaseDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2022func (bcds BlobContainerDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 2023 return nil, false 2024} 2025 2026// AsSQLDBTableDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2027func (bcds BlobContainerDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 2028 return nil, false 2029} 2030 2031// AsSQLDWTableDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2032func (bcds BlobContainerDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 2033 return nil, false 2034} 2035 2036// AsDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2037func (bcds BlobContainerDataSet) AsDataSet() (*DataSet, bool) { 2038 return nil, false 2039} 2040 2041// AsBasicDataSet is the BasicDataSet implementation for BlobContainerDataSet. 2042func (bcds BlobContainerDataSet) AsBasicDataSet() (BasicDataSet, bool) { 2043 return &bcds, true 2044} 2045 2046// UnmarshalJSON is the custom unmarshaler for BlobContainerDataSet struct. 2047func (bcds *BlobContainerDataSet) UnmarshalJSON(body []byte) error { 2048 var m map[string]*json.RawMessage 2049 err := json.Unmarshal(body, &m) 2050 if err != nil { 2051 return err 2052 } 2053 for k, v := range m { 2054 switch k { 2055 case "properties": 2056 if v != nil { 2057 var blobContainerProperties BlobContainerProperties 2058 err = json.Unmarshal(*v, &blobContainerProperties) 2059 if err != nil { 2060 return err 2061 } 2062 bcds.BlobContainerProperties = &blobContainerProperties 2063 } 2064 case "kind": 2065 if v != nil { 2066 var kind Kind 2067 err = json.Unmarshal(*v, &kind) 2068 if err != nil { 2069 return err 2070 } 2071 bcds.Kind = kind 2072 } 2073 case "id": 2074 if v != nil { 2075 var ID string 2076 err = json.Unmarshal(*v, &ID) 2077 if err != nil { 2078 return err 2079 } 2080 bcds.ID = &ID 2081 } 2082 case "name": 2083 if v != nil { 2084 var name string 2085 err = json.Unmarshal(*v, &name) 2086 if err != nil { 2087 return err 2088 } 2089 bcds.Name = &name 2090 } 2091 case "type": 2092 if v != nil { 2093 var typeVar string 2094 err = json.Unmarshal(*v, &typeVar) 2095 if err != nil { 2096 return err 2097 } 2098 bcds.Type = &typeVar 2099 } 2100 } 2101 } 2102 2103 return nil 2104} 2105 2106// BlobContainerDataSetMapping a Blob container data set mapping. 2107type BlobContainerDataSetMapping struct { 2108 // BlobContainerMappingProperties - Blob container data set mapping properties. 2109 *BlobContainerMappingProperties `json:"properties,omitempty"` 2110 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 2111 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 2112 // ID - READ-ONLY; The resource id of the azure resource 2113 ID *string `json:"id,omitempty"` 2114 // Name - READ-ONLY; Name of the azure resource 2115 Name *string `json:"name,omitempty"` 2116 // Type - READ-ONLY; Type of the azure resource 2117 Type *string `json:"type,omitempty"` 2118} 2119 2120// MarshalJSON is the custom marshaler for BlobContainerDataSetMapping. 2121func (bcdsm BlobContainerDataSetMapping) MarshalJSON() ([]byte, error) { 2122 bcdsm.Kind = KindBasicDataSetMappingKindContainer 2123 objectMap := make(map[string]interface{}) 2124 if bcdsm.BlobContainerMappingProperties != nil { 2125 objectMap["properties"] = bcdsm.BlobContainerMappingProperties 2126 } 2127 if bcdsm.Kind != "" { 2128 objectMap["kind"] = bcdsm.Kind 2129 } 2130 return json.Marshal(objectMap) 2131} 2132 2133// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2134func (bcdsm BlobContainerDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 2135 return nil, false 2136} 2137 2138// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2139func (bcdsm BlobContainerDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 2140 return nil, false 2141} 2142 2143// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2144func (bcdsm BlobContainerDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 2145 return nil, false 2146} 2147 2148// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2149func (bcdsm BlobContainerDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 2150 return &bcdsm, true 2151} 2152 2153// AsBlobDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2154func (bcdsm BlobContainerDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 2155 return nil, false 2156} 2157 2158// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2159func (bcdsm BlobContainerDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 2160 return nil, false 2161} 2162 2163// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2164func (bcdsm BlobContainerDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 2165 return nil, false 2166} 2167 2168// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2169func (bcdsm BlobContainerDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 2170 return nil, false 2171} 2172 2173// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2174func (bcdsm BlobContainerDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 2175 return nil, false 2176} 2177 2178// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2179func (bcdsm BlobContainerDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 2180 return nil, false 2181} 2182 2183// AsDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2184func (bcdsm BlobContainerDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 2185 return nil, false 2186} 2187 2188// AsBasicDataSetMapping is the BasicDataSetMapping implementation for BlobContainerDataSetMapping. 2189func (bcdsm BlobContainerDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 2190 return &bcdsm, true 2191} 2192 2193// UnmarshalJSON is the custom unmarshaler for BlobContainerDataSetMapping struct. 2194func (bcdsm *BlobContainerDataSetMapping) UnmarshalJSON(body []byte) error { 2195 var m map[string]*json.RawMessage 2196 err := json.Unmarshal(body, &m) 2197 if err != nil { 2198 return err 2199 } 2200 for k, v := range m { 2201 switch k { 2202 case "properties": 2203 if v != nil { 2204 var blobContainerMappingProperties BlobContainerMappingProperties 2205 err = json.Unmarshal(*v, &blobContainerMappingProperties) 2206 if err != nil { 2207 return err 2208 } 2209 bcdsm.BlobContainerMappingProperties = &blobContainerMappingProperties 2210 } 2211 case "kind": 2212 if v != nil { 2213 var kind KindBasicDataSetMapping 2214 err = json.Unmarshal(*v, &kind) 2215 if err != nil { 2216 return err 2217 } 2218 bcdsm.Kind = kind 2219 } 2220 case "id": 2221 if v != nil { 2222 var ID string 2223 err = json.Unmarshal(*v, &ID) 2224 if err != nil { 2225 return err 2226 } 2227 bcdsm.ID = &ID 2228 } 2229 case "name": 2230 if v != nil { 2231 var name string 2232 err = json.Unmarshal(*v, &name) 2233 if err != nil { 2234 return err 2235 } 2236 bcdsm.Name = &name 2237 } 2238 case "type": 2239 if v != nil { 2240 var typeVar string 2241 err = json.Unmarshal(*v, &typeVar) 2242 if err != nil { 2243 return err 2244 } 2245 bcdsm.Type = &typeVar 2246 } 2247 } 2248 } 2249 2250 return nil 2251} 2252 2253// BlobContainerMappingProperties azure storage Blob container data set mapping property bag. 2254type BlobContainerMappingProperties struct { 2255 // ContainerName - BLOB Container name. 2256 ContainerName *string `json:"containerName,omitempty"` 2257 // DataSetID - The id of the source data set. 2258 DataSetID *string `json:"dataSetId,omitempty"` 2259 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 2260 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 2261 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 2262 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 2263 // ResourceGroup - Resource group of storage account. 2264 ResourceGroup *string `json:"resourceGroup,omitempty"` 2265 // StorageAccountName - Storage account name of the source data set. 2266 StorageAccountName *string `json:"storageAccountName,omitempty"` 2267 // SubscriptionID - Subscription id of storage account. 2268 SubscriptionID *string `json:"subscriptionId,omitempty"` 2269} 2270 2271// MarshalJSON is the custom marshaler for BlobContainerMappingProperties. 2272func (bcmp BlobContainerMappingProperties) MarshalJSON() ([]byte, error) { 2273 objectMap := make(map[string]interface{}) 2274 if bcmp.ContainerName != nil { 2275 objectMap["containerName"] = bcmp.ContainerName 2276 } 2277 if bcmp.DataSetID != nil { 2278 objectMap["dataSetId"] = bcmp.DataSetID 2279 } 2280 if bcmp.ResourceGroup != nil { 2281 objectMap["resourceGroup"] = bcmp.ResourceGroup 2282 } 2283 if bcmp.StorageAccountName != nil { 2284 objectMap["storageAccountName"] = bcmp.StorageAccountName 2285 } 2286 if bcmp.SubscriptionID != nil { 2287 objectMap["subscriptionId"] = bcmp.SubscriptionID 2288 } 2289 return json.Marshal(objectMap) 2290} 2291 2292// BlobContainerProperties properties of the BLOB container data set. 2293type BlobContainerProperties struct { 2294 // ContainerName - BLOB Container name. 2295 ContainerName *string `json:"containerName,omitempty"` 2296 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 2297 DataSetID *string `json:"dataSetId,omitempty"` 2298 // ResourceGroup - Resource group of storage account 2299 ResourceGroup *string `json:"resourceGroup,omitempty"` 2300 // StorageAccountName - Storage account name of the source data set 2301 StorageAccountName *string `json:"storageAccountName,omitempty"` 2302 // SubscriptionID - Subscription id of storage account 2303 SubscriptionID *string `json:"subscriptionId,omitempty"` 2304} 2305 2306// MarshalJSON is the custom marshaler for BlobContainerProperties. 2307func (bcp BlobContainerProperties) MarshalJSON() ([]byte, error) { 2308 objectMap := make(map[string]interface{}) 2309 if bcp.ContainerName != nil { 2310 objectMap["containerName"] = bcp.ContainerName 2311 } 2312 if bcp.ResourceGroup != nil { 2313 objectMap["resourceGroup"] = bcp.ResourceGroup 2314 } 2315 if bcp.StorageAccountName != nil { 2316 objectMap["storageAccountName"] = bcp.StorageAccountName 2317 } 2318 if bcp.SubscriptionID != nil { 2319 objectMap["subscriptionId"] = bcp.SubscriptionID 2320 } 2321 return json.Marshal(objectMap) 2322} 2323 2324// BlobDataSet an Azure storage blob data set. 2325type BlobDataSet struct { 2326 // BlobProperties - Blob data set properties. 2327 *BlobProperties `json:"properties,omitempty"` 2328 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 2329 Kind Kind `json:"kind,omitempty"` 2330 // ID - READ-ONLY; The resource id of the azure resource 2331 ID *string `json:"id,omitempty"` 2332 // Name - READ-ONLY; Name of the azure resource 2333 Name *string `json:"name,omitempty"` 2334 // Type - READ-ONLY; Type of the azure resource 2335 Type *string `json:"type,omitempty"` 2336} 2337 2338// MarshalJSON is the custom marshaler for BlobDataSet. 2339func (bds BlobDataSet) MarshalJSON() ([]byte, error) { 2340 bds.Kind = KindBlob 2341 objectMap := make(map[string]interface{}) 2342 if bds.BlobProperties != nil { 2343 objectMap["properties"] = bds.BlobProperties 2344 } 2345 if bds.Kind != "" { 2346 objectMap["kind"] = bds.Kind 2347 } 2348 return json.Marshal(objectMap) 2349} 2350 2351// AsADLSGen1FileDataSet is the BasicDataSet implementation for BlobDataSet. 2352func (bds BlobDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 2353 return nil, false 2354} 2355 2356// AsADLSGen1FolderDataSet is the BasicDataSet implementation for BlobDataSet. 2357func (bds BlobDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 2358 return nil, false 2359} 2360 2361// AsADLSGen2FileDataSet is the BasicDataSet implementation for BlobDataSet. 2362func (bds BlobDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 2363 return nil, false 2364} 2365 2366// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for BlobDataSet. 2367func (bds BlobDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 2368 return nil, false 2369} 2370 2371// AsADLSGen2FolderDataSet is the BasicDataSet implementation for BlobDataSet. 2372func (bds BlobDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 2373 return nil, false 2374} 2375 2376// AsBlobContainerDataSet is the BasicDataSet implementation for BlobDataSet. 2377func (bds BlobDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 2378 return nil, false 2379} 2380 2381// AsBlobDataSet is the BasicDataSet implementation for BlobDataSet. 2382func (bds BlobDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 2383 return &bds, true 2384} 2385 2386// AsBlobFolderDataSet is the BasicDataSet implementation for BlobDataSet. 2387func (bds BlobDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 2388 return nil, false 2389} 2390 2391// AsKustoClusterDataSet is the BasicDataSet implementation for BlobDataSet. 2392func (bds BlobDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 2393 return nil, false 2394} 2395 2396// AsKustoDatabaseDataSet is the BasicDataSet implementation for BlobDataSet. 2397func (bds BlobDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 2398 return nil, false 2399} 2400 2401// AsSQLDBTableDataSet is the BasicDataSet implementation for BlobDataSet. 2402func (bds BlobDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 2403 return nil, false 2404} 2405 2406// AsSQLDWTableDataSet is the BasicDataSet implementation for BlobDataSet. 2407func (bds BlobDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 2408 return nil, false 2409} 2410 2411// AsDataSet is the BasicDataSet implementation for BlobDataSet. 2412func (bds BlobDataSet) AsDataSet() (*DataSet, bool) { 2413 return nil, false 2414} 2415 2416// AsBasicDataSet is the BasicDataSet implementation for BlobDataSet. 2417func (bds BlobDataSet) AsBasicDataSet() (BasicDataSet, bool) { 2418 return &bds, true 2419} 2420 2421// UnmarshalJSON is the custom unmarshaler for BlobDataSet struct. 2422func (bds *BlobDataSet) UnmarshalJSON(body []byte) error { 2423 var m map[string]*json.RawMessage 2424 err := json.Unmarshal(body, &m) 2425 if err != nil { 2426 return err 2427 } 2428 for k, v := range m { 2429 switch k { 2430 case "properties": 2431 if v != nil { 2432 var blobProperties BlobProperties 2433 err = json.Unmarshal(*v, &blobProperties) 2434 if err != nil { 2435 return err 2436 } 2437 bds.BlobProperties = &blobProperties 2438 } 2439 case "kind": 2440 if v != nil { 2441 var kind Kind 2442 err = json.Unmarshal(*v, &kind) 2443 if err != nil { 2444 return err 2445 } 2446 bds.Kind = kind 2447 } 2448 case "id": 2449 if v != nil { 2450 var ID string 2451 err = json.Unmarshal(*v, &ID) 2452 if err != nil { 2453 return err 2454 } 2455 bds.ID = &ID 2456 } 2457 case "name": 2458 if v != nil { 2459 var name string 2460 err = json.Unmarshal(*v, &name) 2461 if err != nil { 2462 return err 2463 } 2464 bds.Name = &name 2465 } 2466 case "type": 2467 if v != nil { 2468 var typeVar string 2469 err = json.Unmarshal(*v, &typeVar) 2470 if err != nil { 2471 return err 2472 } 2473 bds.Type = &typeVar 2474 } 2475 } 2476 } 2477 2478 return nil 2479} 2480 2481// BlobDataSetMapping a Blob data set mapping. 2482type BlobDataSetMapping struct { 2483 // BlobMappingProperties - Blob data set mapping properties. 2484 *BlobMappingProperties `json:"properties,omitempty"` 2485 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 2486 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 2487 // ID - READ-ONLY; The resource id of the azure resource 2488 ID *string `json:"id,omitempty"` 2489 // Name - READ-ONLY; Name of the azure resource 2490 Name *string `json:"name,omitempty"` 2491 // Type - READ-ONLY; Type of the azure resource 2492 Type *string `json:"type,omitempty"` 2493} 2494 2495// MarshalJSON is the custom marshaler for BlobDataSetMapping. 2496func (bdsm BlobDataSetMapping) MarshalJSON() ([]byte, error) { 2497 bdsm.Kind = KindBasicDataSetMappingKindBlob 2498 objectMap := make(map[string]interface{}) 2499 if bdsm.BlobMappingProperties != nil { 2500 objectMap["properties"] = bdsm.BlobMappingProperties 2501 } 2502 if bdsm.Kind != "" { 2503 objectMap["kind"] = bdsm.Kind 2504 } 2505 return json.Marshal(objectMap) 2506} 2507 2508// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2509func (bdsm BlobDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 2510 return nil, false 2511} 2512 2513// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2514func (bdsm BlobDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 2515 return nil, false 2516} 2517 2518// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2519func (bdsm BlobDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 2520 return nil, false 2521} 2522 2523// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2524func (bdsm BlobDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 2525 return nil, false 2526} 2527 2528// AsBlobDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2529func (bdsm BlobDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 2530 return &bdsm, true 2531} 2532 2533// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2534func (bdsm BlobDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 2535 return nil, false 2536} 2537 2538// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2539func (bdsm BlobDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 2540 return nil, false 2541} 2542 2543// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2544func (bdsm BlobDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 2545 return nil, false 2546} 2547 2548// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2549func (bdsm BlobDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 2550 return nil, false 2551} 2552 2553// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2554func (bdsm BlobDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 2555 return nil, false 2556} 2557 2558// AsDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2559func (bdsm BlobDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 2560 return nil, false 2561} 2562 2563// AsBasicDataSetMapping is the BasicDataSetMapping implementation for BlobDataSetMapping. 2564func (bdsm BlobDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 2565 return &bdsm, true 2566} 2567 2568// UnmarshalJSON is the custom unmarshaler for BlobDataSetMapping struct. 2569func (bdsm *BlobDataSetMapping) UnmarshalJSON(body []byte) error { 2570 var m map[string]*json.RawMessage 2571 err := json.Unmarshal(body, &m) 2572 if err != nil { 2573 return err 2574 } 2575 for k, v := range m { 2576 switch k { 2577 case "properties": 2578 if v != nil { 2579 var blobMappingProperties BlobMappingProperties 2580 err = json.Unmarshal(*v, &blobMappingProperties) 2581 if err != nil { 2582 return err 2583 } 2584 bdsm.BlobMappingProperties = &blobMappingProperties 2585 } 2586 case "kind": 2587 if v != nil { 2588 var kind KindBasicDataSetMapping 2589 err = json.Unmarshal(*v, &kind) 2590 if err != nil { 2591 return err 2592 } 2593 bdsm.Kind = kind 2594 } 2595 case "id": 2596 if v != nil { 2597 var ID string 2598 err = json.Unmarshal(*v, &ID) 2599 if err != nil { 2600 return err 2601 } 2602 bdsm.ID = &ID 2603 } 2604 case "name": 2605 if v != nil { 2606 var name string 2607 err = json.Unmarshal(*v, &name) 2608 if err != nil { 2609 return err 2610 } 2611 bdsm.Name = &name 2612 } 2613 case "type": 2614 if v != nil { 2615 var typeVar string 2616 err = json.Unmarshal(*v, &typeVar) 2617 if err != nil { 2618 return err 2619 } 2620 bdsm.Type = &typeVar 2621 } 2622 } 2623 } 2624 2625 return nil 2626} 2627 2628// BlobFolderDataSet an Azure storage blob folder data set. 2629type BlobFolderDataSet struct { 2630 // BlobFolderProperties - Blob folder data set properties. 2631 *BlobFolderProperties `json:"properties,omitempty"` 2632 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 2633 Kind Kind `json:"kind,omitempty"` 2634 // ID - READ-ONLY; The resource id of the azure resource 2635 ID *string `json:"id,omitempty"` 2636 // Name - READ-ONLY; Name of the azure resource 2637 Name *string `json:"name,omitempty"` 2638 // Type - READ-ONLY; Type of the azure resource 2639 Type *string `json:"type,omitempty"` 2640} 2641 2642// MarshalJSON is the custom marshaler for BlobFolderDataSet. 2643func (bfds BlobFolderDataSet) MarshalJSON() ([]byte, error) { 2644 bfds.Kind = KindBlobFolder 2645 objectMap := make(map[string]interface{}) 2646 if bfds.BlobFolderProperties != nil { 2647 objectMap["properties"] = bfds.BlobFolderProperties 2648 } 2649 if bfds.Kind != "" { 2650 objectMap["kind"] = bfds.Kind 2651 } 2652 return json.Marshal(objectMap) 2653} 2654 2655// AsADLSGen1FileDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2656func (bfds BlobFolderDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 2657 return nil, false 2658} 2659 2660// AsADLSGen1FolderDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2661func (bfds BlobFolderDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 2662 return nil, false 2663} 2664 2665// AsADLSGen2FileDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2666func (bfds BlobFolderDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 2667 return nil, false 2668} 2669 2670// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2671func (bfds BlobFolderDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 2672 return nil, false 2673} 2674 2675// AsADLSGen2FolderDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2676func (bfds BlobFolderDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 2677 return nil, false 2678} 2679 2680// AsBlobContainerDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2681func (bfds BlobFolderDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 2682 return nil, false 2683} 2684 2685// AsBlobDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2686func (bfds BlobFolderDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 2687 return nil, false 2688} 2689 2690// AsBlobFolderDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2691func (bfds BlobFolderDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 2692 return &bfds, true 2693} 2694 2695// AsKustoClusterDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2696func (bfds BlobFolderDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 2697 return nil, false 2698} 2699 2700// AsKustoDatabaseDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2701func (bfds BlobFolderDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 2702 return nil, false 2703} 2704 2705// AsSQLDBTableDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2706func (bfds BlobFolderDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 2707 return nil, false 2708} 2709 2710// AsSQLDWTableDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2711func (bfds BlobFolderDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 2712 return nil, false 2713} 2714 2715// AsDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2716func (bfds BlobFolderDataSet) AsDataSet() (*DataSet, bool) { 2717 return nil, false 2718} 2719 2720// AsBasicDataSet is the BasicDataSet implementation for BlobFolderDataSet. 2721func (bfds BlobFolderDataSet) AsBasicDataSet() (BasicDataSet, bool) { 2722 return &bfds, true 2723} 2724 2725// UnmarshalJSON is the custom unmarshaler for BlobFolderDataSet struct. 2726func (bfds *BlobFolderDataSet) UnmarshalJSON(body []byte) error { 2727 var m map[string]*json.RawMessage 2728 err := json.Unmarshal(body, &m) 2729 if err != nil { 2730 return err 2731 } 2732 for k, v := range m { 2733 switch k { 2734 case "properties": 2735 if v != nil { 2736 var blobFolderProperties BlobFolderProperties 2737 err = json.Unmarshal(*v, &blobFolderProperties) 2738 if err != nil { 2739 return err 2740 } 2741 bfds.BlobFolderProperties = &blobFolderProperties 2742 } 2743 case "kind": 2744 if v != nil { 2745 var kind Kind 2746 err = json.Unmarshal(*v, &kind) 2747 if err != nil { 2748 return err 2749 } 2750 bfds.Kind = kind 2751 } 2752 case "id": 2753 if v != nil { 2754 var ID string 2755 err = json.Unmarshal(*v, &ID) 2756 if err != nil { 2757 return err 2758 } 2759 bfds.ID = &ID 2760 } 2761 case "name": 2762 if v != nil { 2763 var name string 2764 err = json.Unmarshal(*v, &name) 2765 if err != nil { 2766 return err 2767 } 2768 bfds.Name = &name 2769 } 2770 case "type": 2771 if v != nil { 2772 var typeVar string 2773 err = json.Unmarshal(*v, &typeVar) 2774 if err != nil { 2775 return err 2776 } 2777 bfds.Type = &typeVar 2778 } 2779 } 2780 } 2781 2782 return nil 2783} 2784 2785// BlobFolderDataSetMapping a Blob folder data set mapping. 2786type BlobFolderDataSetMapping struct { 2787 // BlobFolderMappingProperties - Blob folder data set mapping properties. 2788 *BlobFolderMappingProperties `json:"properties,omitempty"` 2789 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 2790 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 2791 // ID - READ-ONLY; The resource id of the azure resource 2792 ID *string `json:"id,omitempty"` 2793 // Name - READ-ONLY; Name of the azure resource 2794 Name *string `json:"name,omitempty"` 2795 // Type - READ-ONLY; Type of the azure resource 2796 Type *string `json:"type,omitempty"` 2797} 2798 2799// MarshalJSON is the custom marshaler for BlobFolderDataSetMapping. 2800func (bfdsm BlobFolderDataSetMapping) MarshalJSON() ([]byte, error) { 2801 bfdsm.Kind = KindBasicDataSetMappingKindBlobFolder 2802 objectMap := make(map[string]interface{}) 2803 if bfdsm.BlobFolderMappingProperties != nil { 2804 objectMap["properties"] = bfdsm.BlobFolderMappingProperties 2805 } 2806 if bfdsm.Kind != "" { 2807 objectMap["kind"] = bfdsm.Kind 2808 } 2809 return json.Marshal(objectMap) 2810} 2811 2812// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2813func (bfdsm BlobFolderDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 2814 return nil, false 2815} 2816 2817// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2818func (bfdsm BlobFolderDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 2819 return nil, false 2820} 2821 2822// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2823func (bfdsm BlobFolderDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 2824 return nil, false 2825} 2826 2827// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2828func (bfdsm BlobFolderDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 2829 return nil, false 2830} 2831 2832// AsBlobDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2833func (bfdsm BlobFolderDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 2834 return nil, false 2835} 2836 2837// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2838func (bfdsm BlobFolderDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 2839 return &bfdsm, true 2840} 2841 2842// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2843func (bfdsm BlobFolderDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 2844 return nil, false 2845} 2846 2847// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2848func (bfdsm BlobFolderDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 2849 return nil, false 2850} 2851 2852// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2853func (bfdsm BlobFolderDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 2854 return nil, false 2855} 2856 2857// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2858func (bfdsm BlobFolderDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 2859 return nil, false 2860} 2861 2862// AsDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2863func (bfdsm BlobFolderDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 2864 return nil, false 2865} 2866 2867// AsBasicDataSetMapping is the BasicDataSetMapping implementation for BlobFolderDataSetMapping. 2868func (bfdsm BlobFolderDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 2869 return &bfdsm, true 2870} 2871 2872// UnmarshalJSON is the custom unmarshaler for BlobFolderDataSetMapping struct. 2873func (bfdsm *BlobFolderDataSetMapping) UnmarshalJSON(body []byte) error { 2874 var m map[string]*json.RawMessage 2875 err := json.Unmarshal(body, &m) 2876 if err != nil { 2877 return err 2878 } 2879 for k, v := range m { 2880 switch k { 2881 case "properties": 2882 if v != nil { 2883 var blobFolderMappingProperties BlobFolderMappingProperties 2884 err = json.Unmarshal(*v, &blobFolderMappingProperties) 2885 if err != nil { 2886 return err 2887 } 2888 bfdsm.BlobFolderMappingProperties = &blobFolderMappingProperties 2889 } 2890 case "kind": 2891 if v != nil { 2892 var kind KindBasicDataSetMapping 2893 err = json.Unmarshal(*v, &kind) 2894 if err != nil { 2895 return err 2896 } 2897 bfdsm.Kind = kind 2898 } 2899 case "id": 2900 if v != nil { 2901 var ID string 2902 err = json.Unmarshal(*v, &ID) 2903 if err != nil { 2904 return err 2905 } 2906 bfdsm.ID = &ID 2907 } 2908 case "name": 2909 if v != nil { 2910 var name string 2911 err = json.Unmarshal(*v, &name) 2912 if err != nil { 2913 return err 2914 } 2915 bfdsm.Name = &name 2916 } 2917 case "type": 2918 if v != nil { 2919 var typeVar string 2920 err = json.Unmarshal(*v, &typeVar) 2921 if err != nil { 2922 return err 2923 } 2924 bfdsm.Type = &typeVar 2925 } 2926 } 2927 } 2928 2929 return nil 2930} 2931 2932// BlobFolderMappingProperties azure storage Blob folder data set mapping property bag. 2933type BlobFolderMappingProperties struct { 2934 // ContainerName - Container that has the file path. 2935 ContainerName *string `json:"containerName,omitempty"` 2936 // DataSetID - The id of the source data set. 2937 DataSetID *string `json:"dataSetId,omitempty"` 2938 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 2939 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 2940 // Prefix - Prefix for blob folder 2941 Prefix *string `json:"prefix,omitempty"` 2942 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 2943 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 2944 // ResourceGroup - Resource group of storage account. 2945 ResourceGroup *string `json:"resourceGroup,omitempty"` 2946 // StorageAccountName - Storage account name of the source data set. 2947 StorageAccountName *string `json:"storageAccountName,omitempty"` 2948 // SubscriptionID - Subscription id of storage account. 2949 SubscriptionID *string `json:"subscriptionId,omitempty"` 2950} 2951 2952// MarshalJSON is the custom marshaler for BlobFolderMappingProperties. 2953func (bfmp BlobFolderMappingProperties) MarshalJSON() ([]byte, error) { 2954 objectMap := make(map[string]interface{}) 2955 if bfmp.ContainerName != nil { 2956 objectMap["containerName"] = bfmp.ContainerName 2957 } 2958 if bfmp.DataSetID != nil { 2959 objectMap["dataSetId"] = bfmp.DataSetID 2960 } 2961 if bfmp.Prefix != nil { 2962 objectMap["prefix"] = bfmp.Prefix 2963 } 2964 if bfmp.ResourceGroup != nil { 2965 objectMap["resourceGroup"] = bfmp.ResourceGroup 2966 } 2967 if bfmp.StorageAccountName != nil { 2968 objectMap["storageAccountName"] = bfmp.StorageAccountName 2969 } 2970 if bfmp.SubscriptionID != nil { 2971 objectMap["subscriptionId"] = bfmp.SubscriptionID 2972 } 2973 return json.Marshal(objectMap) 2974} 2975 2976// BlobFolderProperties properties of the blob folder data set. 2977type BlobFolderProperties struct { 2978 // ContainerName - Container that has the file path. 2979 ContainerName *string `json:"containerName,omitempty"` 2980 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 2981 DataSetID *string `json:"dataSetId,omitempty"` 2982 // Prefix - Prefix for blob folder 2983 Prefix *string `json:"prefix,omitempty"` 2984 // ResourceGroup - Resource group of storage account 2985 ResourceGroup *string `json:"resourceGroup,omitempty"` 2986 // StorageAccountName - Storage account name of the source data set 2987 StorageAccountName *string `json:"storageAccountName,omitempty"` 2988 // SubscriptionID - Subscription id of storage account 2989 SubscriptionID *string `json:"subscriptionId,omitempty"` 2990} 2991 2992// MarshalJSON is the custom marshaler for BlobFolderProperties. 2993func (bfp BlobFolderProperties) MarshalJSON() ([]byte, error) { 2994 objectMap := make(map[string]interface{}) 2995 if bfp.ContainerName != nil { 2996 objectMap["containerName"] = bfp.ContainerName 2997 } 2998 if bfp.Prefix != nil { 2999 objectMap["prefix"] = bfp.Prefix 3000 } 3001 if bfp.ResourceGroup != nil { 3002 objectMap["resourceGroup"] = bfp.ResourceGroup 3003 } 3004 if bfp.StorageAccountName != nil { 3005 objectMap["storageAccountName"] = bfp.StorageAccountName 3006 } 3007 if bfp.SubscriptionID != nil { 3008 objectMap["subscriptionId"] = bfp.SubscriptionID 3009 } 3010 return json.Marshal(objectMap) 3011} 3012 3013// BlobMappingProperties azure storage Blob data set mapping property bag. 3014type BlobMappingProperties struct { 3015 // ContainerName - Container that has the file path. 3016 ContainerName *string `json:"containerName,omitempty"` 3017 // DataSetID - The id of the source data set. 3018 DataSetID *string `json:"dataSetId,omitempty"` 3019 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 3020 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 3021 // FilePath - File path within the source data set 3022 FilePath *string `json:"filePath,omitempty"` 3023 // OutputType - File output type. Possible values include: 'Csv', 'Parquet' 3024 OutputType OutputType `json:"outputType,omitempty"` 3025 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 3026 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 3027 // ResourceGroup - Resource group of storage account. 3028 ResourceGroup *string `json:"resourceGroup,omitempty"` 3029 // StorageAccountName - Storage account name of the source data set. 3030 StorageAccountName *string `json:"storageAccountName,omitempty"` 3031 // SubscriptionID - Subscription id of storage account. 3032 SubscriptionID *string `json:"subscriptionId,omitempty"` 3033} 3034 3035// MarshalJSON is the custom marshaler for BlobMappingProperties. 3036func (bmp BlobMappingProperties) MarshalJSON() ([]byte, error) { 3037 objectMap := make(map[string]interface{}) 3038 if bmp.ContainerName != nil { 3039 objectMap["containerName"] = bmp.ContainerName 3040 } 3041 if bmp.DataSetID != nil { 3042 objectMap["dataSetId"] = bmp.DataSetID 3043 } 3044 if bmp.FilePath != nil { 3045 objectMap["filePath"] = bmp.FilePath 3046 } 3047 if bmp.OutputType != "" { 3048 objectMap["outputType"] = bmp.OutputType 3049 } 3050 if bmp.ResourceGroup != nil { 3051 objectMap["resourceGroup"] = bmp.ResourceGroup 3052 } 3053 if bmp.StorageAccountName != nil { 3054 objectMap["storageAccountName"] = bmp.StorageAccountName 3055 } 3056 if bmp.SubscriptionID != nil { 3057 objectMap["subscriptionId"] = bmp.SubscriptionID 3058 } 3059 return json.Marshal(objectMap) 3060} 3061 3062// BlobProperties properties of the blob data set. 3063type BlobProperties struct { 3064 // ContainerName - Container that has the file path. 3065 ContainerName *string `json:"containerName,omitempty"` 3066 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 3067 DataSetID *string `json:"dataSetId,omitempty"` 3068 // FilePath - File path within the source data set 3069 FilePath *string `json:"filePath,omitempty"` 3070 // ResourceGroup - Resource group of storage account 3071 ResourceGroup *string `json:"resourceGroup,omitempty"` 3072 // StorageAccountName - Storage account name of the source data set 3073 StorageAccountName *string `json:"storageAccountName,omitempty"` 3074 // SubscriptionID - Subscription id of storage account 3075 SubscriptionID *string `json:"subscriptionId,omitempty"` 3076} 3077 3078// MarshalJSON is the custom marshaler for BlobProperties. 3079func (bp BlobProperties) MarshalJSON() ([]byte, error) { 3080 objectMap := make(map[string]interface{}) 3081 if bp.ContainerName != nil { 3082 objectMap["containerName"] = bp.ContainerName 3083 } 3084 if bp.FilePath != nil { 3085 objectMap["filePath"] = bp.FilePath 3086 } 3087 if bp.ResourceGroup != nil { 3088 objectMap["resourceGroup"] = bp.ResourceGroup 3089 } 3090 if bp.StorageAccountName != nil { 3091 objectMap["storageAccountName"] = bp.StorageAccountName 3092 } 3093 if bp.SubscriptionID != nil { 3094 objectMap["subscriptionId"] = bp.SubscriptionID 3095 } 3096 return json.Marshal(objectMap) 3097} 3098 3099// ConsumerInvitation a consumer Invitation data transfer object. 3100type ConsumerInvitation struct { 3101 autorest.Response `json:"-"` 3102 // ConsumerInvitationProperties - Properties on the account 3103 *ConsumerInvitationProperties `json:"properties,omitempty"` 3104 // ID - READ-ONLY; The resource id of the azure resource 3105 ID *string `json:"id,omitempty"` 3106 // Name - READ-ONLY; Name of the azure resource 3107 Name *string `json:"name,omitempty"` 3108 // Type - READ-ONLY; Type of the azure resource 3109 Type *string `json:"type,omitempty"` 3110} 3111 3112// MarshalJSON is the custom marshaler for ConsumerInvitation. 3113func (ci ConsumerInvitation) MarshalJSON() ([]byte, error) { 3114 objectMap := make(map[string]interface{}) 3115 if ci.ConsumerInvitationProperties != nil { 3116 objectMap["properties"] = ci.ConsumerInvitationProperties 3117 } 3118 return json.Marshal(objectMap) 3119} 3120 3121// UnmarshalJSON is the custom unmarshaler for ConsumerInvitation struct. 3122func (ci *ConsumerInvitation) UnmarshalJSON(body []byte) error { 3123 var m map[string]*json.RawMessage 3124 err := json.Unmarshal(body, &m) 3125 if err != nil { 3126 return err 3127 } 3128 for k, v := range m { 3129 switch k { 3130 case "properties": 3131 if v != nil { 3132 var consumerInvitationProperties ConsumerInvitationProperties 3133 err = json.Unmarshal(*v, &consumerInvitationProperties) 3134 if err != nil { 3135 return err 3136 } 3137 ci.ConsumerInvitationProperties = &consumerInvitationProperties 3138 } 3139 case "id": 3140 if v != nil { 3141 var ID string 3142 err = json.Unmarshal(*v, &ID) 3143 if err != nil { 3144 return err 3145 } 3146 ci.ID = &ID 3147 } 3148 case "name": 3149 if v != nil { 3150 var name string 3151 err = json.Unmarshal(*v, &name) 3152 if err != nil { 3153 return err 3154 } 3155 ci.Name = &name 3156 } 3157 case "type": 3158 if v != nil { 3159 var typeVar string 3160 err = json.Unmarshal(*v, &typeVar) 3161 if err != nil { 3162 return err 3163 } 3164 ci.Type = &typeVar 3165 } 3166 } 3167 } 3168 3169 return nil 3170} 3171 3172// ConsumerInvitationList list response for get InvitationList 3173type ConsumerInvitationList struct { 3174 autorest.Response `json:"-"` 3175 // NextLink - The Url of next result page. 3176 NextLink *string `json:"nextLink,omitempty"` 3177 // Value - Collection of items of type DataTransferObjects. 3178 Value *[]ConsumerInvitation `json:"value,omitempty"` 3179} 3180 3181// ConsumerInvitationListIterator provides access to a complete listing of ConsumerInvitation values. 3182type ConsumerInvitationListIterator struct { 3183 i int 3184 page ConsumerInvitationListPage 3185} 3186 3187// NextWithContext advances to the next value. If there was an error making 3188// the request the iterator does not advance and the error is returned. 3189func (iter *ConsumerInvitationListIterator) NextWithContext(ctx context.Context) (err error) { 3190 if tracing.IsEnabled() { 3191 ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerInvitationListIterator.NextWithContext") 3192 defer func() { 3193 sc := -1 3194 if iter.Response().Response.Response != nil { 3195 sc = iter.Response().Response.Response.StatusCode 3196 } 3197 tracing.EndSpan(ctx, sc, err) 3198 }() 3199 } 3200 iter.i++ 3201 if iter.i < len(iter.page.Values()) { 3202 return nil 3203 } 3204 err = iter.page.NextWithContext(ctx) 3205 if err != nil { 3206 iter.i-- 3207 return err 3208 } 3209 iter.i = 0 3210 return nil 3211} 3212 3213// Next advances to the next value. If there was an error making 3214// the request the iterator does not advance and the error is returned. 3215// Deprecated: Use NextWithContext() instead. 3216func (iter *ConsumerInvitationListIterator) Next() error { 3217 return iter.NextWithContext(context.Background()) 3218} 3219 3220// NotDone returns true if the enumeration should be started or is not yet complete. 3221func (iter ConsumerInvitationListIterator) NotDone() bool { 3222 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3223} 3224 3225// Response returns the raw server response from the last page request. 3226func (iter ConsumerInvitationListIterator) Response() ConsumerInvitationList { 3227 return iter.page.Response() 3228} 3229 3230// Value returns the current value or a zero-initialized value if the 3231// iterator has advanced beyond the end of the collection. 3232func (iter ConsumerInvitationListIterator) Value() ConsumerInvitation { 3233 if !iter.page.NotDone() { 3234 return ConsumerInvitation{} 3235 } 3236 return iter.page.Values()[iter.i] 3237} 3238 3239// Creates a new instance of the ConsumerInvitationListIterator type. 3240func NewConsumerInvitationListIterator(page ConsumerInvitationListPage) ConsumerInvitationListIterator { 3241 return ConsumerInvitationListIterator{page: page} 3242} 3243 3244// IsEmpty returns true if the ListResult contains no values. 3245func (cil ConsumerInvitationList) IsEmpty() bool { 3246 return cil.Value == nil || len(*cil.Value) == 0 3247} 3248 3249// hasNextLink returns true if the NextLink is not empty. 3250func (cil ConsumerInvitationList) hasNextLink() bool { 3251 return cil.NextLink != nil && len(*cil.NextLink) != 0 3252} 3253 3254// consumerInvitationListPreparer prepares a request to retrieve the next set of results. 3255// It returns nil if no more results exist. 3256func (cil ConsumerInvitationList) consumerInvitationListPreparer(ctx context.Context) (*http.Request, error) { 3257 if !cil.hasNextLink() { 3258 return nil, nil 3259 } 3260 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3261 autorest.AsJSON(), 3262 autorest.AsGet(), 3263 autorest.WithBaseURL(to.String(cil.NextLink))) 3264} 3265 3266// ConsumerInvitationListPage contains a page of ConsumerInvitation values. 3267type ConsumerInvitationListPage struct { 3268 fn func(context.Context, ConsumerInvitationList) (ConsumerInvitationList, error) 3269 cil ConsumerInvitationList 3270} 3271 3272// NextWithContext advances to the next page of values. If there was an error making 3273// the request the page does not advance and the error is returned. 3274func (page *ConsumerInvitationListPage) NextWithContext(ctx context.Context) (err error) { 3275 if tracing.IsEnabled() { 3276 ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerInvitationListPage.NextWithContext") 3277 defer func() { 3278 sc := -1 3279 if page.Response().Response.Response != nil { 3280 sc = page.Response().Response.Response.StatusCode 3281 } 3282 tracing.EndSpan(ctx, sc, err) 3283 }() 3284 } 3285 for { 3286 next, err := page.fn(ctx, page.cil) 3287 if err != nil { 3288 return err 3289 } 3290 page.cil = next 3291 if !next.hasNextLink() || !next.IsEmpty() { 3292 break 3293 } 3294 } 3295 return nil 3296} 3297 3298// Next advances to the next page of values. If there was an error making 3299// the request the page does not advance and the error is returned. 3300// Deprecated: Use NextWithContext() instead. 3301func (page *ConsumerInvitationListPage) Next() error { 3302 return page.NextWithContext(context.Background()) 3303} 3304 3305// NotDone returns true if the page enumeration should be started or is not yet complete. 3306func (page ConsumerInvitationListPage) NotDone() bool { 3307 return !page.cil.IsEmpty() 3308} 3309 3310// Response returns the raw server response from the last page request. 3311func (page ConsumerInvitationListPage) Response() ConsumerInvitationList { 3312 return page.cil 3313} 3314 3315// Values returns the slice of values for the current page or nil if there are no values. 3316func (page ConsumerInvitationListPage) Values() []ConsumerInvitation { 3317 if page.cil.IsEmpty() { 3318 return nil 3319 } 3320 return *page.cil.Value 3321} 3322 3323// Creates a new instance of the ConsumerInvitationListPage type. 3324func NewConsumerInvitationListPage(cur ConsumerInvitationList, getNextPage func(context.Context, ConsumerInvitationList) (ConsumerInvitationList, error)) ConsumerInvitationListPage { 3325 return ConsumerInvitationListPage{ 3326 fn: getNextPage, 3327 cil: cur, 3328 } 3329} 3330 3331// ConsumerInvitationProperties properties of consumer invitation 3332type ConsumerInvitationProperties struct { 3333 // DataSetCount - READ-ONLY; Number of data sets in a share 3334 DataSetCount *int32 `json:"dataSetCount,omitempty"` 3335 // Description - READ-ONLY; Description shared when the invitation was created 3336 Description *string `json:"description,omitempty"` 3337 // InvitationID - Unique id of the invitation. 3338 InvitationID *string `json:"invitationId,omitempty"` 3339 // InvitationStatus - READ-ONLY; The status of the invitation. Possible values include: 'Pending', 'Accepted', 'Rejected', 'Withdrawn' 3340 InvitationStatus InvitationStatus `json:"invitationStatus,omitempty"` 3341 // Location - READ-ONLY; invitation location 3342 Location *string `json:"location,omitempty"` 3343 // ProviderEmail - READ-ONLY; Email of the provider who created the resource 3344 ProviderEmail *string `json:"providerEmail,omitempty"` 3345 // ProviderName - READ-ONLY; Name of the provider who created the resource 3346 ProviderName *string `json:"providerName,omitempty"` 3347 // ProviderTenantName - READ-ONLY; Tenant name of the provider who created the resource 3348 ProviderTenantName *string `json:"providerTenantName,omitempty"` 3349 // RespondedAt - READ-ONLY; The time the recipient responded to the invitation. 3350 RespondedAt *date.Time `json:"respondedAt,omitempty"` 3351 // SentAt - READ-ONLY; Gets the time at which the invitation was sent. 3352 SentAt *date.Time `json:"sentAt,omitempty"` 3353 // ShareName - READ-ONLY; Gets the source share Name. 3354 ShareName *string `json:"shareName,omitempty"` 3355 // TermsOfUse - READ-ONLY; Terms of use shared when the invitation was created 3356 TermsOfUse *string `json:"termsOfUse,omitempty"` 3357 // UserEmail - READ-ONLY; Email of the user who created the resource 3358 UserEmail *string `json:"userEmail,omitempty"` 3359 // UserName - READ-ONLY; Name of the user who created the resource 3360 UserName *string `json:"userName,omitempty"` 3361} 3362 3363// MarshalJSON is the custom marshaler for ConsumerInvitationProperties. 3364func (cip ConsumerInvitationProperties) MarshalJSON() ([]byte, error) { 3365 objectMap := make(map[string]interface{}) 3366 if cip.InvitationID != nil { 3367 objectMap["invitationId"] = cip.InvitationID 3368 } 3369 return json.Marshal(objectMap) 3370} 3371 3372// ConsumerSourceDataSet a consumer side dataSet data transfer object. 3373type ConsumerSourceDataSet struct { 3374 // ConsumerSourceDataSetProperties - source dataSet properties 3375 *ConsumerSourceDataSetProperties `json:"properties,omitempty"` 3376 // ID - READ-ONLY; The resource id of the azure resource 3377 ID *string `json:"id,omitempty"` 3378 // Name - READ-ONLY; Name of the azure resource 3379 Name *string `json:"name,omitempty"` 3380 // Type - READ-ONLY; Type of the azure resource 3381 Type *string `json:"type,omitempty"` 3382} 3383 3384// MarshalJSON is the custom marshaler for ConsumerSourceDataSet. 3385func (csds ConsumerSourceDataSet) MarshalJSON() ([]byte, error) { 3386 objectMap := make(map[string]interface{}) 3387 if csds.ConsumerSourceDataSetProperties != nil { 3388 objectMap["properties"] = csds.ConsumerSourceDataSetProperties 3389 } 3390 return json.Marshal(objectMap) 3391} 3392 3393// UnmarshalJSON is the custom unmarshaler for ConsumerSourceDataSet struct. 3394func (csds *ConsumerSourceDataSet) UnmarshalJSON(body []byte) error { 3395 var m map[string]*json.RawMessage 3396 err := json.Unmarshal(body, &m) 3397 if err != nil { 3398 return err 3399 } 3400 for k, v := range m { 3401 switch k { 3402 case "properties": 3403 if v != nil { 3404 var consumerSourceDataSetProperties ConsumerSourceDataSetProperties 3405 err = json.Unmarshal(*v, &consumerSourceDataSetProperties) 3406 if err != nil { 3407 return err 3408 } 3409 csds.ConsumerSourceDataSetProperties = &consumerSourceDataSetProperties 3410 } 3411 case "id": 3412 if v != nil { 3413 var ID string 3414 err = json.Unmarshal(*v, &ID) 3415 if err != nil { 3416 return err 3417 } 3418 csds.ID = &ID 3419 } 3420 case "name": 3421 if v != nil { 3422 var name string 3423 err = json.Unmarshal(*v, &name) 3424 if err != nil { 3425 return err 3426 } 3427 csds.Name = &name 3428 } 3429 case "type": 3430 if v != nil { 3431 var typeVar string 3432 err = json.Unmarshal(*v, &typeVar) 3433 if err != nil { 3434 return err 3435 } 3436 csds.Type = &typeVar 3437 } 3438 } 3439 } 3440 3441 return nil 3442} 3443 3444// ConsumerSourceDataSetList a consumer side list of source dataSets 3445type ConsumerSourceDataSetList struct { 3446 autorest.Response `json:"-"` 3447 // NextLink - The Url of next result page. 3448 NextLink *string `json:"nextLink,omitempty"` 3449 // Value - Collection of items of type DataTransferObjects. 3450 Value *[]ConsumerSourceDataSet `json:"value,omitempty"` 3451} 3452 3453// ConsumerSourceDataSetListIterator provides access to a complete listing of ConsumerSourceDataSet values. 3454type ConsumerSourceDataSetListIterator struct { 3455 i int 3456 page ConsumerSourceDataSetListPage 3457} 3458 3459// NextWithContext advances to the next value. If there was an error making 3460// the request the iterator does not advance and the error is returned. 3461func (iter *ConsumerSourceDataSetListIterator) NextWithContext(ctx context.Context) (err error) { 3462 if tracing.IsEnabled() { 3463 ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerSourceDataSetListIterator.NextWithContext") 3464 defer func() { 3465 sc := -1 3466 if iter.Response().Response.Response != nil { 3467 sc = iter.Response().Response.Response.StatusCode 3468 } 3469 tracing.EndSpan(ctx, sc, err) 3470 }() 3471 } 3472 iter.i++ 3473 if iter.i < len(iter.page.Values()) { 3474 return nil 3475 } 3476 err = iter.page.NextWithContext(ctx) 3477 if err != nil { 3478 iter.i-- 3479 return err 3480 } 3481 iter.i = 0 3482 return nil 3483} 3484 3485// Next advances to the next value. If there was an error making 3486// the request the iterator does not advance and the error is returned. 3487// Deprecated: Use NextWithContext() instead. 3488func (iter *ConsumerSourceDataSetListIterator) Next() error { 3489 return iter.NextWithContext(context.Background()) 3490} 3491 3492// NotDone returns true if the enumeration should be started or is not yet complete. 3493func (iter ConsumerSourceDataSetListIterator) NotDone() bool { 3494 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3495} 3496 3497// Response returns the raw server response from the last page request. 3498func (iter ConsumerSourceDataSetListIterator) Response() ConsumerSourceDataSetList { 3499 return iter.page.Response() 3500} 3501 3502// Value returns the current value or a zero-initialized value if the 3503// iterator has advanced beyond the end of the collection. 3504func (iter ConsumerSourceDataSetListIterator) Value() ConsumerSourceDataSet { 3505 if !iter.page.NotDone() { 3506 return ConsumerSourceDataSet{} 3507 } 3508 return iter.page.Values()[iter.i] 3509} 3510 3511// Creates a new instance of the ConsumerSourceDataSetListIterator type. 3512func NewConsumerSourceDataSetListIterator(page ConsumerSourceDataSetListPage) ConsumerSourceDataSetListIterator { 3513 return ConsumerSourceDataSetListIterator{page: page} 3514} 3515 3516// IsEmpty returns true if the ListResult contains no values. 3517func (csdsl ConsumerSourceDataSetList) IsEmpty() bool { 3518 return csdsl.Value == nil || len(*csdsl.Value) == 0 3519} 3520 3521// hasNextLink returns true if the NextLink is not empty. 3522func (csdsl ConsumerSourceDataSetList) hasNextLink() bool { 3523 return csdsl.NextLink != nil && len(*csdsl.NextLink) != 0 3524} 3525 3526// consumerSourceDataSetListPreparer prepares a request to retrieve the next set of results. 3527// It returns nil if no more results exist. 3528func (csdsl ConsumerSourceDataSetList) consumerSourceDataSetListPreparer(ctx context.Context) (*http.Request, error) { 3529 if !csdsl.hasNextLink() { 3530 return nil, nil 3531 } 3532 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3533 autorest.AsJSON(), 3534 autorest.AsGet(), 3535 autorest.WithBaseURL(to.String(csdsl.NextLink))) 3536} 3537 3538// ConsumerSourceDataSetListPage contains a page of ConsumerSourceDataSet values. 3539type ConsumerSourceDataSetListPage struct { 3540 fn func(context.Context, ConsumerSourceDataSetList) (ConsumerSourceDataSetList, error) 3541 csdsl ConsumerSourceDataSetList 3542} 3543 3544// NextWithContext advances to the next page of values. If there was an error making 3545// the request the page does not advance and the error is returned. 3546func (page *ConsumerSourceDataSetListPage) NextWithContext(ctx context.Context) (err error) { 3547 if tracing.IsEnabled() { 3548 ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerSourceDataSetListPage.NextWithContext") 3549 defer func() { 3550 sc := -1 3551 if page.Response().Response.Response != nil { 3552 sc = page.Response().Response.Response.StatusCode 3553 } 3554 tracing.EndSpan(ctx, sc, err) 3555 }() 3556 } 3557 for { 3558 next, err := page.fn(ctx, page.csdsl) 3559 if err != nil { 3560 return err 3561 } 3562 page.csdsl = next 3563 if !next.hasNextLink() || !next.IsEmpty() { 3564 break 3565 } 3566 } 3567 return nil 3568} 3569 3570// Next advances to the next page of values. If there was an error making 3571// the request the page does not advance and the error is returned. 3572// Deprecated: Use NextWithContext() instead. 3573func (page *ConsumerSourceDataSetListPage) Next() error { 3574 return page.NextWithContext(context.Background()) 3575} 3576 3577// NotDone returns true if the page enumeration should be started or is not yet complete. 3578func (page ConsumerSourceDataSetListPage) NotDone() bool { 3579 return !page.csdsl.IsEmpty() 3580} 3581 3582// Response returns the raw server response from the last page request. 3583func (page ConsumerSourceDataSetListPage) Response() ConsumerSourceDataSetList { 3584 return page.csdsl 3585} 3586 3587// Values returns the slice of values for the current page or nil if there are no values. 3588func (page ConsumerSourceDataSetListPage) Values() []ConsumerSourceDataSet { 3589 if page.csdsl.IsEmpty() { 3590 return nil 3591 } 3592 return *page.csdsl.Value 3593} 3594 3595// Creates a new instance of the ConsumerSourceDataSetListPage type. 3596func NewConsumerSourceDataSetListPage(cur ConsumerSourceDataSetList, getNextPage func(context.Context, ConsumerSourceDataSetList) (ConsumerSourceDataSetList, error)) ConsumerSourceDataSetListPage { 3597 return ConsumerSourceDataSetListPage{ 3598 fn: getNextPage, 3599 csdsl: cur, 3600 } 3601} 3602 3603// ConsumerSourceDataSetProperties properties of consumer source dataSet 3604type ConsumerSourceDataSetProperties struct { 3605 // DataSetID - READ-ONLY; DataSet Id 3606 DataSetID *string `json:"dataSetId,omitempty"` 3607 // DataSetLocation - READ-ONLY; Location of the data set. 3608 DataSetLocation *string `json:"dataSetLocation,omitempty"` 3609 // DataSetName - READ-ONLY; DataSet name 3610 DataSetName *string `json:"dataSetName,omitempty"` 3611 // DataSetPath - READ-ONLY; DataSet path 3612 DataSetPath *string `json:"dataSetPath,omitempty"` 3613 // DataSetType - READ-ONLY; Type of data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SQLDBTable', 'SQLDWTable' 3614 DataSetType DataSetType `json:"dataSetType,omitempty"` 3615} 3616 3617// MarshalJSON is the custom marshaler for ConsumerSourceDataSetProperties. 3618func (csdsp ConsumerSourceDataSetProperties) MarshalJSON() ([]byte, error) { 3619 objectMap := make(map[string]interface{}) 3620 return json.Marshal(objectMap) 3621} 3622 3623// BasicDataSet a DataSet data transfer object. 3624type BasicDataSet interface { 3625 AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) 3626 AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) 3627 AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) 3628 AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) 3629 AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) 3630 AsBlobContainerDataSet() (*BlobContainerDataSet, bool) 3631 AsBlobDataSet() (*BlobDataSet, bool) 3632 AsBlobFolderDataSet() (*BlobFolderDataSet, bool) 3633 AsKustoClusterDataSet() (*KustoClusterDataSet, bool) 3634 AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) 3635 AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) 3636 AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) 3637 AsDataSet() (*DataSet, bool) 3638} 3639 3640// DataSet a DataSet data transfer object. 3641type DataSet struct { 3642 autorest.Response `json:"-"` 3643 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 3644 Kind Kind `json:"kind,omitempty"` 3645 // ID - READ-ONLY; The resource id of the azure resource 3646 ID *string `json:"id,omitempty"` 3647 // Name - READ-ONLY; Name of the azure resource 3648 Name *string `json:"name,omitempty"` 3649 // Type - READ-ONLY; Type of the azure resource 3650 Type *string `json:"type,omitempty"` 3651} 3652 3653func unmarshalBasicDataSet(body []byte) (BasicDataSet, error) { 3654 var m map[string]interface{} 3655 err := json.Unmarshal(body, &m) 3656 if err != nil { 3657 return nil, err 3658 } 3659 3660 switch m["kind"] { 3661 case string(KindAdlsGen1File): 3662 var ag1fds ADLSGen1FileDataSet 3663 err := json.Unmarshal(body, &ag1fds) 3664 return ag1fds, err 3665 case string(KindAdlsGen1Folder): 3666 var ag1fds ADLSGen1FolderDataSet 3667 err := json.Unmarshal(body, &ag1fds) 3668 return ag1fds, err 3669 case string(KindAdlsGen2File): 3670 var ag2fds ADLSGen2FileDataSet 3671 err := json.Unmarshal(body, &ag2fds) 3672 return ag2fds, err 3673 case string(KindAdlsGen2FileSystem): 3674 var ag2fsds ADLSGen2FileSystemDataSet 3675 err := json.Unmarshal(body, &ag2fsds) 3676 return ag2fsds, err 3677 case string(KindAdlsGen2Folder): 3678 var ag2fds ADLSGen2FolderDataSet 3679 err := json.Unmarshal(body, &ag2fds) 3680 return ag2fds, err 3681 case string(KindContainer): 3682 var bcds BlobContainerDataSet 3683 err := json.Unmarshal(body, &bcds) 3684 return bcds, err 3685 case string(KindBlob): 3686 var bds BlobDataSet 3687 err := json.Unmarshal(body, &bds) 3688 return bds, err 3689 case string(KindBlobFolder): 3690 var bfds BlobFolderDataSet 3691 err := json.Unmarshal(body, &bfds) 3692 return bfds, err 3693 case string(KindKustoCluster): 3694 var kcds KustoClusterDataSet 3695 err := json.Unmarshal(body, &kcds) 3696 return kcds, err 3697 case string(KindKustoDatabase): 3698 var kdds KustoDatabaseDataSet 3699 err := json.Unmarshal(body, &kdds) 3700 return kdds, err 3701 case string(KindSQLDBTable): 3702 var sdtds SQLDBTableDataSet 3703 err := json.Unmarshal(body, &sdtds) 3704 return sdtds, err 3705 case string(KindSQLDWTable): 3706 var sdtds SQLDWTableDataSet 3707 err := json.Unmarshal(body, &sdtds) 3708 return sdtds, err 3709 default: 3710 var ds DataSet 3711 err := json.Unmarshal(body, &ds) 3712 return ds, err 3713 } 3714} 3715func unmarshalBasicDataSetArray(body []byte) ([]BasicDataSet, error) { 3716 var rawMessages []*json.RawMessage 3717 err := json.Unmarshal(body, &rawMessages) 3718 if err != nil { 3719 return nil, err 3720 } 3721 3722 dsArray := make([]BasicDataSet, len(rawMessages)) 3723 3724 for index, rawMessage := range rawMessages { 3725 ds, err := unmarshalBasicDataSet(*rawMessage) 3726 if err != nil { 3727 return nil, err 3728 } 3729 dsArray[index] = ds 3730 } 3731 return dsArray, nil 3732} 3733 3734// MarshalJSON is the custom marshaler for DataSet. 3735func (ds DataSet) MarshalJSON() ([]byte, error) { 3736 ds.Kind = KindDataSet 3737 objectMap := make(map[string]interface{}) 3738 if ds.Kind != "" { 3739 objectMap["kind"] = ds.Kind 3740 } 3741 return json.Marshal(objectMap) 3742} 3743 3744// AsADLSGen1FileDataSet is the BasicDataSet implementation for DataSet. 3745func (ds DataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 3746 return nil, false 3747} 3748 3749// AsADLSGen1FolderDataSet is the BasicDataSet implementation for DataSet. 3750func (ds DataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 3751 return nil, false 3752} 3753 3754// AsADLSGen2FileDataSet is the BasicDataSet implementation for DataSet. 3755func (ds DataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 3756 return nil, false 3757} 3758 3759// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for DataSet. 3760func (ds DataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 3761 return nil, false 3762} 3763 3764// AsADLSGen2FolderDataSet is the BasicDataSet implementation for DataSet. 3765func (ds DataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 3766 return nil, false 3767} 3768 3769// AsBlobContainerDataSet is the BasicDataSet implementation for DataSet. 3770func (ds DataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 3771 return nil, false 3772} 3773 3774// AsBlobDataSet is the BasicDataSet implementation for DataSet. 3775func (ds DataSet) AsBlobDataSet() (*BlobDataSet, bool) { 3776 return nil, false 3777} 3778 3779// AsBlobFolderDataSet is the BasicDataSet implementation for DataSet. 3780func (ds DataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 3781 return nil, false 3782} 3783 3784// AsKustoClusterDataSet is the BasicDataSet implementation for DataSet. 3785func (ds DataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 3786 return nil, false 3787} 3788 3789// AsKustoDatabaseDataSet is the BasicDataSet implementation for DataSet. 3790func (ds DataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 3791 return nil, false 3792} 3793 3794// AsSQLDBTableDataSet is the BasicDataSet implementation for DataSet. 3795func (ds DataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 3796 return nil, false 3797} 3798 3799// AsSQLDWTableDataSet is the BasicDataSet implementation for DataSet. 3800func (ds DataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 3801 return nil, false 3802} 3803 3804// AsDataSet is the BasicDataSet implementation for DataSet. 3805func (ds DataSet) AsDataSet() (*DataSet, bool) { 3806 return &ds, true 3807} 3808 3809// AsBasicDataSet is the BasicDataSet implementation for DataSet. 3810func (ds DataSet) AsBasicDataSet() (BasicDataSet, bool) { 3811 return &ds, true 3812} 3813 3814// DataSetList list response for get DataSets 3815type DataSetList struct { 3816 autorest.Response `json:"-"` 3817 // NextLink - The Url of next result page. 3818 NextLink *string `json:"nextLink,omitempty"` 3819 // Value - Collection of items of type DataTransferObjects. 3820 Value *[]BasicDataSet `json:"value,omitempty"` 3821} 3822 3823// UnmarshalJSON is the custom unmarshaler for DataSetList struct. 3824func (dsl *DataSetList) UnmarshalJSON(body []byte) error { 3825 var m map[string]*json.RawMessage 3826 err := json.Unmarshal(body, &m) 3827 if err != nil { 3828 return err 3829 } 3830 for k, v := range m { 3831 switch k { 3832 case "nextLink": 3833 if v != nil { 3834 var nextLink string 3835 err = json.Unmarshal(*v, &nextLink) 3836 if err != nil { 3837 return err 3838 } 3839 dsl.NextLink = &nextLink 3840 } 3841 case "value": 3842 if v != nil { 3843 value, err := unmarshalBasicDataSetArray(*v) 3844 if err != nil { 3845 return err 3846 } 3847 dsl.Value = &value 3848 } 3849 } 3850 } 3851 3852 return nil 3853} 3854 3855// DataSetListIterator provides access to a complete listing of DataSet values. 3856type DataSetListIterator struct { 3857 i int 3858 page DataSetListPage 3859} 3860 3861// NextWithContext advances to the next value. If there was an error making 3862// the request the iterator does not advance and the error is returned. 3863func (iter *DataSetListIterator) NextWithContext(ctx context.Context) (err error) { 3864 if tracing.IsEnabled() { 3865 ctx = tracing.StartSpan(ctx, fqdn+"/DataSetListIterator.NextWithContext") 3866 defer func() { 3867 sc := -1 3868 if iter.Response().Response.Response != nil { 3869 sc = iter.Response().Response.Response.StatusCode 3870 } 3871 tracing.EndSpan(ctx, sc, err) 3872 }() 3873 } 3874 iter.i++ 3875 if iter.i < len(iter.page.Values()) { 3876 return nil 3877 } 3878 err = iter.page.NextWithContext(ctx) 3879 if err != nil { 3880 iter.i-- 3881 return err 3882 } 3883 iter.i = 0 3884 return nil 3885} 3886 3887// Next advances to the next value. If there was an error making 3888// the request the iterator does not advance and the error is returned. 3889// Deprecated: Use NextWithContext() instead. 3890func (iter *DataSetListIterator) Next() error { 3891 return iter.NextWithContext(context.Background()) 3892} 3893 3894// NotDone returns true if the enumeration should be started or is not yet complete. 3895func (iter DataSetListIterator) NotDone() bool { 3896 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3897} 3898 3899// Response returns the raw server response from the last page request. 3900func (iter DataSetListIterator) Response() DataSetList { 3901 return iter.page.Response() 3902} 3903 3904// Value returns the current value or a zero-initialized value if the 3905// iterator has advanced beyond the end of the collection. 3906func (iter DataSetListIterator) Value() BasicDataSet { 3907 if !iter.page.NotDone() { 3908 return DataSet{} 3909 } 3910 return iter.page.Values()[iter.i] 3911} 3912 3913// Creates a new instance of the DataSetListIterator type. 3914func NewDataSetListIterator(page DataSetListPage) DataSetListIterator { 3915 return DataSetListIterator{page: page} 3916} 3917 3918// IsEmpty returns true if the ListResult contains no values. 3919func (dsl DataSetList) IsEmpty() bool { 3920 return dsl.Value == nil || len(*dsl.Value) == 0 3921} 3922 3923// hasNextLink returns true if the NextLink is not empty. 3924func (dsl DataSetList) hasNextLink() bool { 3925 return dsl.NextLink != nil && len(*dsl.NextLink) != 0 3926} 3927 3928// dataSetListPreparer prepares a request to retrieve the next set of results. 3929// It returns nil if no more results exist. 3930func (dsl DataSetList) dataSetListPreparer(ctx context.Context) (*http.Request, error) { 3931 if !dsl.hasNextLink() { 3932 return nil, nil 3933 } 3934 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3935 autorest.AsJSON(), 3936 autorest.AsGet(), 3937 autorest.WithBaseURL(to.String(dsl.NextLink))) 3938} 3939 3940// DataSetListPage contains a page of BasicDataSet values. 3941type DataSetListPage struct { 3942 fn func(context.Context, DataSetList) (DataSetList, error) 3943 dsl DataSetList 3944} 3945 3946// NextWithContext advances to the next page of values. If there was an error making 3947// the request the page does not advance and the error is returned. 3948func (page *DataSetListPage) NextWithContext(ctx context.Context) (err error) { 3949 if tracing.IsEnabled() { 3950 ctx = tracing.StartSpan(ctx, fqdn+"/DataSetListPage.NextWithContext") 3951 defer func() { 3952 sc := -1 3953 if page.Response().Response.Response != nil { 3954 sc = page.Response().Response.Response.StatusCode 3955 } 3956 tracing.EndSpan(ctx, sc, err) 3957 }() 3958 } 3959 for { 3960 next, err := page.fn(ctx, page.dsl) 3961 if err != nil { 3962 return err 3963 } 3964 page.dsl = next 3965 if !next.hasNextLink() || !next.IsEmpty() { 3966 break 3967 } 3968 } 3969 return nil 3970} 3971 3972// Next advances to the next page of values. If there was an error making 3973// the request the page does not advance and the error is returned. 3974// Deprecated: Use NextWithContext() instead. 3975func (page *DataSetListPage) Next() error { 3976 return page.NextWithContext(context.Background()) 3977} 3978 3979// NotDone returns true if the page enumeration should be started or is not yet complete. 3980func (page DataSetListPage) NotDone() bool { 3981 return !page.dsl.IsEmpty() 3982} 3983 3984// Response returns the raw server response from the last page request. 3985func (page DataSetListPage) Response() DataSetList { 3986 return page.dsl 3987} 3988 3989// Values returns the slice of values for the current page or nil if there are no values. 3990func (page DataSetListPage) Values() []BasicDataSet { 3991 if page.dsl.IsEmpty() { 3992 return nil 3993 } 3994 return *page.dsl.Value 3995} 3996 3997// Creates a new instance of the DataSetListPage type. 3998func NewDataSetListPage(cur DataSetList, getNextPage func(context.Context, DataSetList) (DataSetList, error)) DataSetListPage { 3999 return DataSetListPage{ 4000 fn: getNextPage, 4001 dsl: cur, 4002 } 4003} 4004 4005// BasicDataSetMapping a data set mapping data transfer object. 4006type BasicDataSetMapping interface { 4007 AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) 4008 AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) 4009 AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) 4010 AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) 4011 AsBlobDataSetMapping() (*BlobDataSetMapping, bool) 4012 AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) 4013 AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) 4014 AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) 4015 AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) 4016 AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) 4017 AsDataSetMapping() (*DataSetMapping, bool) 4018} 4019 4020// DataSetMapping a data set mapping data transfer object. 4021type DataSetMapping struct { 4022 autorest.Response `json:"-"` 4023 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 4024 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 4025 // ID - READ-ONLY; The resource id of the azure resource 4026 ID *string `json:"id,omitempty"` 4027 // Name - READ-ONLY; Name of the azure resource 4028 Name *string `json:"name,omitempty"` 4029 // Type - READ-ONLY; Type of the azure resource 4030 Type *string `json:"type,omitempty"` 4031} 4032 4033func unmarshalBasicDataSetMapping(body []byte) (BasicDataSetMapping, error) { 4034 var m map[string]interface{} 4035 err := json.Unmarshal(body, &m) 4036 if err != nil { 4037 return nil, err 4038 } 4039 4040 switch m["kind"] { 4041 case string(KindBasicDataSetMappingKindAdlsGen2File): 4042 var ag2fdsm ADLSGen2FileDataSetMapping 4043 err := json.Unmarshal(body, &ag2fdsm) 4044 return ag2fdsm, err 4045 case string(KindBasicDataSetMappingKindAdlsGen2FileSystem): 4046 var ag2fsdsm ADLSGen2FileSystemDataSetMapping 4047 err := json.Unmarshal(body, &ag2fsdsm) 4048 return ag2fsdsm, err 4049 case string(KindBasicDataSetMappingKindAdlsGen2Folder): 4050 var ag2fdsm ADLSGen2FolderDataSetMapping 4051 err := json.Unmarshal(body, &ag2fdsm) 4052 return ag2fdsm, err 4053 case string(KindBasicDataSetMappingKindContainer): 4054 var bcdsm BlobContainerDataSetMapping 4055 err := json.Unmarshal(body, &bcdsm) 4056 return bcdsm, err 4057 case string(KindBasicDataSetMappingKindBlob): 4058 var bdsm BlobDataSetMapping 4059 err := json.Unmarshal(body, &bdsm) 4060 return bdsm, err 4061 case string(KindBasicDataSetMappingKindBlobFolder): 4062 var bfdsm BlobFolderDataSetMapping 4063 err := json.Unmarshal(body, &bfdsm) 4064 return bfdsm, err 4065 case string(KindBasicDataSetMappingKindKustoCluster): 4066 var kcdsm KustoClusterDataSetMapping 4067 err := json.Unmarshal(body, &kcdsm) 4068 return kcdsm, err 4069 case string(KindBasicDataSetMappingKindKustoDatabase): 4070 var kddsm KustoDatabaseDataSetMapping 4071 err := json.Unmarshal(body, &kddsm) 4072 return kddsm, err 4073 case string(KindBasicDataSetMappingKindSQLDBTable): 4074 var sdtdsm SQLDBTableDataSetMapping 4075 err := json.Unmarshal(body, &sdtdsm) 4076 return sdtdsm, err 4077 case string(KindBasicDataSetMappingKindSQLDWTable): 4078 var sdtdsm SQLDWTableDataSetMapping 4079 err := json.Unmarshal(body, &sdtdsm) 4080 return sdtdsm, err 4081 default: 4082 var dsm DataSetMapping 4083 err := json.Unmarshal(body, &dsm) 4084 return dsm, err 4085 } 4086} 4087func unmarshalBasicDataSetMappingArray(body []byte) ([]BasicDataSetMapping, error) { 4088 var rawMessages []*json.RawMessage 4089 err := json.Unmarshal(body, &rawMessages) 4090 if err != nil { 4091 return nil, err 4092 } 4093 4094 dsmArray := make([]BasicDataSetMapping, len(rawMessages)) 4095 4096 for index, rawMessage := range rawMessages { 4097 dsm, err := unmarshalBasicDataSetMapping(*rawMessage) 4098 if err != nil { 4099 return nil, err 4100 } 4101 dsmArray[index] = dsm 4102 } 4103 return dsmArray, nil 4104} 4105 4106// MarshalJSON is the custom marshaler for DataSetMapping. 4107func (dsm DataSetMapping) MarshalJSON() ([]byte, error) { 4108 dsm.Kind = KindBasicDataSetMappingKindDataSetMapping 4109 objectMap := make(map[string]interface{}) 4110 if dsm.Kind != "" { 4111 objectMap["kind"] = dsm.Kind 4112 } 4113 return json.Marshal(objectMap) 4114} 4115 4116// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4117func (dsm DataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 4118 return nil, false 4119} 4120 4121// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4122func (dsm DataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 4123 return nil, false 4124} 4125 4126// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4127func (dsm DataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 4128 return nil, false 4129} 4130 4131// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4132func (dsm DataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 4133 return nil, false 4134} 4135 4136// AsBlobDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4137func (dsm DataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 4138 return nil, false 4139} 4140 4141// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4142func (dsm DataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 4143 return nil, false 4144} 4145 4146// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4147func (dsm DataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 4148 return nil, false 4149} 4150 4151// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4152func (dsm DataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 4153 return nil, false 4154} 4155 4156// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4157func (dsm DataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 4158 return nil, false 4159} 4160 4161// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4162func (dsm DataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 4163 return nil, false 4164} 4165 4166// AsDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4167func (dsm DataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 4168 return &dsm, true 4169} 4170 4171// AsBasicDataSetMapping is the BasicDataSetMapping implementation for DataSetMapping. 4172func (dsm DataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 4173 return &dsm, true 4174} 4175 4176// DataSetMappingList list response for get DataSetMappings 4177type DataSetMappingList struct { 4178 autorest.Response `json:"-"` 4179 // NextLink - The Url of next result page. 4180 NextLink *string `json:"nextLink,omitempty"` 4181 // Value - Collection of items of type DataTransferObjects. 4182 Value *[]BasicDataSetMapping `json:"value,omitempty"` 4183} 4184 4185// UnmarshalJSON is the custom unmarshaler for DataSetMappingList struct. 4186func (dsml *DataSetMappingList) UnmarshalJSON(body []byte) error { 4187 var m map[string]*json.RawMessage 4188 err := json.Unmarshal(body, &m) 4189 if err != nil { 4190 return err 4191 } 4192 for k, v := range m { 4193 switch k { 4194 case "nextLink": 4195 if v != nil { 4196 var nextLink string 4197 err = json.Unmarshal(*v, &nextLink) 4198 if err != nil { 4199 return err 4200 } 4201 dsml.NextLink = &nextLink 4202 } 4203 case "value": 4204 if v != nil { 4205 value, err := unmarshalBasicDataSetMappingArray(*v) 4206 if err != nil { 4207 return err 4208 } 4209 dsml.Value = &value 4210 } 4211 } 4212 } 4213 4214 return nil 4215} 4216 4217// DataSetMappingListIterator provides access to a complete listing of DataSetMapping values. 4218type DataSetMappingListIterator struct { 4219 i int 4220 page DataSetMappingListPage 4221} 4222 4223// NextWithContext advances to the next value. If there was an error making 4224// the request the iterator does not advance and the error is returned. 4225func (iter *DataSetMappingListIterator) NextWithContext(ctx context.Context) (err error) { 4226 if tracing.IsEnabled() { 4227 ctx = tracing.StartSpan(ctx, fqdn+"/DataSetMappingListIterator.NextWithContext") 4228 defer func() { 4229 sc := -1 4230 if iter.Response().Response.Response != nil { 4231 sc = iter.Response().Response.Response.StatusCode 4232 } 4233 tracing.EndSpan(ctx, sc, err) 4234 }() 4235 } 4236 iter.i++ 4237 if iter.i < len(iter.page.Values()) { 4238 return nil 4239 } 4240 err = iter.page.NextWithContext(ctx) 4241 if err != nil { 4242 iter.i-- 4243 return err 4244 } 4245 iter.i = 0 4246 return nil 4247} 4248 4249// Next advances to the next value. If there was an error making 4250// the request the iterator does not advance and the error is returned. 4251// Deprecated: Use NextWithContext() instead. 4252func (iter *DataSetMappingListIterator) Next() error { 4253 return iter.NextWithContext(context.Background()) 4254} 4255 4256// NotDone returns true if the enumeration should be started or is not yet complete. 4257func (iter DataSetMappingListIterator) NotDone() bool { 4258 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4259} 4260 4261// Response returns the raw server response from the last page request. 4262func (iter DataSetMappingListIterator) Response() DataSetMappingList { 4263 return iter.page.Response() 4264} 4265 4266// Value returns the current value or a zero-initialized value if the 4267// iterator has advanced beyond the end of the collection. 4268func (iter DataSetMappingListIterator) Value() BasicDataSetMapping { 4269 if !iter.page.NotDone() { 4270 return DataSetMapping{} 4271 } 4272 return iter.page.Values()[iter.i] 4273} 4274 4275// Creates a new instance of the DataSetMappingListIterator type. 4276func NewDataSetMappingListIterator(page DataSetMappingListPage) DataSetMappingListIterator { 4277 return DataSetMappingListIterator{page: page} 4278} 4279 4280// IsEmpty returns true if the ListResult contains no values. 4281func (dsml DataSetMappingList) IsEmpty() bool { 4282 return dsml.Value == nil || len(*dsml.Value) == 0 4283} 4284 4285// hasNextLink returns true if the NextLink is not empty. 4286func (dsml DataSetMappingList) hasNextLink() bool { 4287 return dsml.NextLink != nil && len(*dsml.NextLink) != 0 4288} 4289 4290// dataSetMappingListPreparer prepares a request to retrieve the next set of results. 4291// It returns nil if no more results exist. 4292func (dsml DataSetMappingList) dataSetMappingListPreparer(ctx context.Context) (*http.Request, error) { 4293 if !dsml.hasNextLink() { 4294 return nil, nil 4295 } 4296 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4297 autorest.AsJSON(), 4298 autorest.AsGet(), 4299 autorest.WithBaseURL(to.String(dsml.NextLink))) 4300} 4301 4302// DataSetMappingListPage contains a page of BasicDataSetMapping values. 4303type DataSetMappingListPage struct { 4304 fn func(context.Context, DataSetMappingList) (DataSetMappingList, error) 4305 dsml DataSetMappingList 4306} 4307 4308// NextWithContext advances to the next page of values. If there was an error making 4309// the request the page does not advance and the error is returned. 4310func (page *DataSetMappingListPage) NextWithContext(ctx context.Context) (err error) { 4311 if tracing.IsEnabled() { 4312 ctx = tracing.StartSpan(ctx, fqdn+"/DataSetMappingListPage.NextWithContext") 4313 defer func() { 4314 sc := -1 4315 if page.Response().Response.Response != nil { 4316 sc = page.Response().Response.Response.StatusCode 4317 } 4318 tracing.EndSpan(ctx, sc, err) 4319 }() 4320 } 4321 for { 4322 next, err := page.fn(ctx, page.dsml) 4323 if err != nil { 4324 return err 4325 } 4326 page.dsml = next 4327 if !next.hasNextLink() || !next.IsEmpty() { 4328 break 4329 } 4330 } 4331 return nil 4332} 4333 4334// Next advances to the next page of values. If there was an error making 4335// the request the page does not advance and the error is returned. 4336// Deprecated: Use NextWithContext() instead. 4337func (page *DataSetMappingListPage) Next() error { 4338 return page.NextWithContext(context.Background()) 4339} 4340 4341// NotDone returns true if the page enumeration should be started or is not yet complete. 4342func (page DataSetMappingListPage) NotDone() bool { 4343 return !page.dsml.IsEmpty() 4344} 4345 4346// Response returns the raw server response from the last page request. 4347func (page DataSetMappingListPage) Response() DataSetMappingList { 4348 return page.dsml 4349} 4350 4351// Values returns the slice of values for the current page or nil if there are no values. 4352func (page DataSetMappingListPage) Values() []BasicDataSetMapping { 4353 if page.dsml.IsEmpty() { 4354 return nil 4355 } 4356 return *page.dsml.Value 4357} 4358 4359// Creates a new instance of the DataSetMappingListPage type. 4360func NewDataSetMappingListPage(cur DataSetMappingList, getNextPage func(context.Context, DataSetMappingList) (DataSetMappingList, error)) DataSetMappingListPage { 4361 return DataSetMappingListPage{ 4362 fn: getNextPage, 4363 dsml: cur, 4364 } 4365} 4366 4367// DataSetMappingModel ... 4368type DataSetMappingModel struct { 4369 autorest.Response `json:"-"` 4370 Value BasicDataSetMapping `json:"value,omitempty"` 4371} 4372 4373// UnmarshalJSON is the custom unmarshaler for DataSetMappingModel struct. 4374func (dsmm *DataSetMappingModel) UnmarshalJSON(body []byte) error { 4375 dsm, err := unmarshalBasicDataSetMapping(body) 4376 if err != nil { 4377 return err 4378 } 4379 dsmm.Value = dsm 4380 4381 return nil 4382} 4383 4384// DataSetModel ... 4385type DataSetModel struct { 4386 autorest.Response `json:"-"` 4387 Value BasicDataSet `json:"value,omitempty"` 4388} 4389 4390// UnmarshalJSON is the custom unmarshaler for DataSetModel struct. 4391func (dsm *DataSetModel) UnmarshalJSON(body []byte) error { 4392 ds, err := unmarshalBasicDataSet(body) 4393 if err != nil { 4394 return err 4395 } 4396 dsm.Value = ds 4397 4398 return nil 4399} 4400 4401// DataSetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 4402// operation. 4403type DataSetsDeleteFuture struct { 4404 azure.FutureAPI 4405 // Result returns the result of the asynchronous operation. 4406 // If the operation has not completed it will return an error. 4407 Result func(DataSetsClient) (autorest.Response, error) 4408} 4409 4410// UnmarshalJSON is the custom unmarshaller for CreateFuture. 4411func (future *DataSetsDeleteFuture) UnmarshalJSON(body []byte) error { 4412 var azFuture azure.Future 4413 if err := json.Unmarshal(body, &azFuture); err != nil { 4414 return err 4415 } 4416 future.FutureAPI = &azFuture 4417 future.Result = future.result 4418 return nil 4419} 4420 4421// result is the default implementation for DataSetsDeleteFuture.Result. 4422func (future *DataSetsDeleteFuture) result(client DataSetsClient) (ar autorest.Response, err error) { 4423 var done bool 4424 done, err = future.DoneWithContext(context.Background(), client) 4425 if err != nil { 4426 err = autorest.NewErrorWithError(err, "datashare.DataSetsDeleteFuture", "Result", future.Response(), "Polling failure") 4427 return 4428 } 4429 if !done { 4430 ar.Response = future.Response() 4431 err = azure.NewAsyncOpIncompleteError("datashare.DataSetsDeleteFuture") 4432 return 4433 } 4434 ar.Response = future.Response() 4435 return 4436} 4437 4438// DefaultDto base data transfer object implementation for default resources. 4439type DefaultDto struct { 4440 // ID - READ-ONLY; The resource id of the azure resource 4441 ID *string `json:"id,omitempty"` 4442 // Location - Location of the azure resource. 4443 Location *string `json:"location,omitempty"` 4444 // Name - READ-ONLY; Name of the azure resource 4445 Name *string `json:"name,omitempty"` 4446 // Tags - Tags on the azure resource. 4447 Tags map[string]*string `json:"tags"` 4448 // Type - READ-ONLY; Type of the azure resource 4449 Type *string `json:"type,omitempty"` 4450} 4451 4452// MarshalJSON is the custom marshaler for DefaultDto. 4453func (dd DefaultDto) MarshalJSON() ([]byte, error) { 4454 objectMap := make(map[string]interface{}) 4455 if dd.Location != nil { 4456 objectMap["location"] = dd.Location 4457 } 4458 if dd.Tags != nil { 4459 objectMap["tags"] = dd.Tags 4460 } 4461 return json.Marshal(objectMap) 4462} 4463 4464// DimensionProperties properties for dimension 4465type DimensionProperties struct { 4466 // DisplayName - localized display name of the dimension to customer 4467 DisplayName *string `json:"displayName,omitempty"` 4468 // Name - dimension name 4469 Name *string `json:"name,omitempty"` 4470} 4471 4472// Error the data share error model. 4473type Error struct { 4474 // Error - The data share error body 4475 Error *ErrorInfo `json:"error,omitempty"` 4476} 4477 4478// ErrorInfo the data share error body model. 4479type ErrorInfo struct { 4480 // Code - Code of the error 4481 Code *string `json:"code,omitempty"` 4482 // Details - Nested details of the error model 4483 Details *[]ErrorInfo `json:"details,omitempty"` 4484 // Message - Message of the error 4485 Message *string `json:"message,omitempty"` 4486 // Target - Target of the error 4487 Target *string `json:"target,omitempty"` 4488} 4489 4490// Identity identity of resource 4491type Identity struct { 4492 // PrincipalID - READ-ONLY; service principal Id 4493 PrincipalID *string `json:"principalId,omitempty"` 4494 // TenantID - READ-ONLY; Tenant Id 4495 TenantID *string `json:"tenantId,omitempty"` 4496 // Type - Identity Type. Possible values include: 'SystemAssigned' 4497 Type Type `json:"type,omitempty"` 4498} 4499 4500// MarshalJSON is the custom marshaler for Identity. 4501func (i Identity) MarshalJSON() ([]byte, error) { 4502 objectMap := make(map[string]interface{}) 4503 if i.Type != "" { 4504 objectMap["type"] = i.Type 4505 } 4506 return json.Marshal(objectMap) 4507} 4508 4509// Invitation a Invitation data transfer object. 4510type Invitation struct { 4511 autorest.Response `json:"-"` 4512 // InvitationProperties - Properties on the Invitation 4513 *InvitationProperties `json:"properties,omitempty"` 4514 // ID - READ-ONLY; The resource id of the azure resource 4515 ID *string `json:"id,omitempty"` 4516 // Name - READ-ONLY; Name of the azure resource 4517 Name *string `json:"name,omitempty"` 4518 // Type - READ-ONLY; Type of the azure resource 4519 Type *string `json:"type,omitempty"` 4520} 4521 4522// MarshalJSON is the custom marshaler for Invitation. 4523func (i Invitation) MarshalJSON() ([]byte, error) { 4524 objectMap := make(map[string]interface{}) 4525 if i.InvitationProperties != nil { 4526 objectMap["properties"] = i.InvitationProperties 4527 } 4528 return json.Marshal(objectMap) 4529} 4530 4531// UnmarshalJSON is the custom unmarshaler for Invitation struct. 4532func (i *Invitation) UnmarshalJSON(body []byte) error { 4533 var m map[string]*json.RawMessage 4534 err := json.Unmarshal(body, &m) 4535 if err != nil { 4536 return err 4537 } 4538 for k, v := range m { 4539 switch k { 4540 case "properties": 4541 if v != nil { 4542 var invitationProperties InvitationProperties 4543 err = json.Unmarshal(*v, &invitationProperties) 4544 if err != nil { 4545 return err 4546 } 4547 i.InvitationProperties = &invitationProperties 4548 } 4549 case "id": 4550 if v != nil { 4551 var ID string 4552 err = json.Unmarshal(*v, &ID) 4553 if err != nil { 4554 return err 4555 } 4556 i.ID = &ID 4557 } 4558 case "name": 4559 if v != nil { 4560 var name string 4561 err = json.Unmarshal(*v, &name) 4562 if err != nil { 4563 return err 4564 } 4565 i.Name = &name 4566 } 4567 case "type": 4568 if v != nil { 4569 var typeVar string 4570 err = json.Unmarshal(*v, &typeVar) 4571 if err != nil { 4572 return err 4573 } 4574 i.Type = &typeVar 4575 } 4576 } 4577 } 4578 4579 return nil 4580} 4581 4582// InvitationList list response for get InvitationList 4583type InvitationList struct { 4584 autorest.Response `json:"-"` 4585 // NextLink - The Url of next result page. 4586 NextLink *string `json:"nextLink,omitempty"` 4587 // Value - Collection of items of type DataTransferObjects. 4588 Value *[]Invitation `json:"value,omitempty"` 4589} 4590 4591// InvitationListIterator provides access to a complete listing of Invitation values. 4592type InvitationListIterator struct { 4593 i int 4594 page InvitationListPage 4595} 4596 4597// NextWithContext advances to the next value. If there was an error making 4598// the request the iterator does not advance and the error is returned. 4599func (iter *InvitationListIterator) NextWithContext(ctx context.Context) (err error) { 4600 if tracing.IsEnabled() { 4601 ctx = tracing.StartSpan(ctx, fqdn+"/InvitationListIterator.NextWithContext") 4602 defer func() { 4603 sc := -1 4604 if iter.Response().Response.Response != nil { 4605 sc = iter.Response().Response.Response.StatusCode 4606 } 4607 tracing.EndSpan(ctx, sc, err) 4608 }() 4609 } 4610 iter.i++ 4611 if iter.i < len(iter.page.Values()) { 4612 return nil 4613 } 4614 err = iter.page.NextWithContext(ctx) 4615 if err != nil { 4616 iter.i-- 4617 return err 4618 } 4619 iter.i = 0 4620 return nil 4621} 4622 4623// Next advances to the next value. If there was an error making 4624// the request the iterator does not advance and the error is returned. 4625// Deprecated: Use NextWithContext() instead. 4626func (iter *InvitationListIterator) Next() error { 4627 return iter.NextWithContext(context.Background()) 4628} 4629 4630// NotDone returns true if the enumeration should be started or is not yet complete. 4631func (iter InvitationListIterator) NotDone() bool { 4632 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4633} 4634 4635// Response returns the raw server response from the last page request. 4636func (iter InvitationListIterator) Response() InvitationList { 4637 return iter.page.Response() 4638} 4639 4640// Value returns the current value or a zero-initialized value if the 4641// iterator has advanced beyond the end of the collection. 4642func (iter InvitationListIterator) Value() Invitation { 4643 if !iter.page.NotDone() { 4644 return Invitation{} 4645 } 4646 return iter.page.Values()[iter.i] 4647} 4648 4649// Creates a new instance of the InvitationListIterator type. 4650func NewInvitationListIterator(page InvitationListPage) InvitationListIterator { 4651 return InvitationListIterator{page: page} 4652} 4653 4654// IsEmpty returns true if the ListResult contains no values. 4655func (il InvitationList) IsEmpty() bool { 4656 return il.Value == nil || len(*il.Value) == 0 4657} 4658 4659// hasNextLink returns true if the NextLink is not empty. 4660func (il InvitationList) hasNextLink() bool { 4661 return il.NextLink != nil && len(*il.NextLink) != 0 4662} 4663 4664// invitationListPreparer prepares a request to retrieve the next set of results. 4665// It returns nil if no more results exist. 4666func (il InvitationList) invitationListPreparer(ctx context.Context) (*http.Request, error) { 4667 if !il.hasNextLink() { 4668 return nil, nil 4669 } 4670 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4671 autorest.AsJSON(), 4672 autorest.AsGet(), 4673 autorest.WithBaseURL(to.String(il.NextLink))) 4674} 4675 4676// InvitationListPage contains a page of Invitation values. 4677type InvitationListPage struct { 4678 fn func(context.Context, InvitationList) (InvitationList, error) 4679 il InvitationList 4680} 4681 4682// NextWithContext advances to the next page of values. If there was an error making 4683// the request the page does not advance and the error is returned. 4684func (page *InvitationListPage) NextWithContext(ctx context.Context) (err error) { 4685 if tracing.IsEnabled() { 4686 ctx = tracing.StartSpan(ctx, fqdn+"/InvitationListPage.NextWithContext") 4687 defer func() { 4688 sc := -1 4689 if page.Response().Response.Response != nil { 4690 sc = page.Response().Response.Response.StatusCode 4691 } 4692 tracing.EndSpan(ctx, sc, err) 4693 }() 4694 } 4695 for { 4696 next, err := page.fn(ctx, page.il) 4697 if err != nil { 4698 return err 4699 } 4700 page.il = next 4701 if !next.hasNextLink() || !next.IsEmpty() { 4702 break 4703 } 4704 } 4705 return nil 4706} 4707 4708// Next advances to the next page of values. If there was an error making 4709// the request the page does not advance and the error is returned. 4710// Deprecated: Use NextWithContext() instead. 4711func (page *InvitationListPage) Next() error { 4712 return page.NextWithContext(context.Background()) 4713} 4714 4715// NotDone returns true if the page enumeration should be started or is not yet complete. 4716func (page InvitationListPage) NotDone() bool { 4717 return !page.il.IsEmpty() 4718} 4719 4720// Response returns the raw server response from the last page request. 4721func (page InvitationListPage) Response() InvitationList { 4722 return page.il 4723} 4724 4725// Values returns the slice of values for the current page or nil if there are no values. 4726func (page InvitationListPage) Values() []Invitation { 4727 if page.il.IsEmpty() { 4728 return nil 4729 } 4730 return *page.il.Value 4731} 4732 4733// Creates a new instance of the InvitationListPage type. 4734func NewInvitationListPage(cur InvitationList, getNextPage func(context.Context, InvitationList) (InvitationList, error)) InvitationListPage { 4735 return InvitationListPage{ 4736 fn: getNextPage, 4737 il: cur, 4738 } 4739} 4740 4741// InvitationProperties invitation property bag. 4742type InvitationProperties struct { 4743 // InvitationID - READ-ONLY; unique invitation id 4744 InvitationID *string `json:"invitationId,omitempty"` 4745 // InvitationStatus - READ-ONLY; The status of the invitation. Possible values include: 'Pending', 'Accepted', 'Rejected', 'Withdrawn' 4746 InvitationStatus InvitationStatus `json:"invitationStatus,omitempty"` 4747 // RespondedAt - READ-ONLY; The time the recipient responded to the invitation. 4748 RespondedAt *date.Time `json:"respondedAt,omitempty"` 4749 // SentAt - READ-ONLY; Gets the time at which the invitation was sent. 4750 SentAt *date.Time `json:"sentAt,omitempty"` 4751 // TargetActiveDirectoryID - The target Azure AD Id. Can't be combined with email. 4752 TargetActiveDirectoryID *string `json:"targetActiveDirectoryId,omitempty"` 4753 // TargetEmail - The email the invitation is directed to. 4754 TargetEmail *string `json:"targetEmail,omitempty"` 4755 // TargetObjectID - The target user or application Id that invitation is being sent to. 4756 // Must be specified along TargetActiveDirectoryId. This enables sending 4757 // invitations to specific users or applications in an AD tenant. 4758 TargetObjectID *string `json:"targetObjectId,omitempty"` 4759 // UserEmail - READ-ONLY; Email of the user who created the resource 4760 UserEmail *string `json:"userEmail,omitempty"` 4761 // UserName - READ-ONLY; Name of the user who created the resource 4762 UserName *string `json:"userName,omitempty"` 4763} 4764 4765// MarshalJSON is the custom marshaler for InvitationProperties. 4766func (IP InvitationProperties) MarshalJSON() ([]byte, error) { 4767 objectMap := make(map[string]interface{}) 4768 if IP.TargetActiveDirectoryID != nil { 4769 objectMap["targetActiveDirectoryId"] = IP.TargetActiveDirectoryID 4770 } 4771 if IP.TargetEmail != nil { 4772 objectMap["targetEmail"] = IP.TargetEmail 4773 } 4774 if IP.TargetObjectID != nil { 4775 objectMap["targetObjectId"] = IP.TargetObjectID 4776 } 4777 return json.Marshal(objectMap) 4778} 4779 4780// KustoClusterDataSet a kusto cluster data set. 4781type KustoClusterDataSet struct { 4782 // KustoClusterDataSetProperties - Kusto cluster data set properties. 4783 *KustoClusterDataSetProperties `json:"properties,omitempty"` 4784 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 4785 Kind Kind `json:"kind,omitempty"` 4786 // ID - READ-ONLY; The resource id of the azure resource 4787 ID *string `json:"id,omitempty"` 4788 // Name - READ-ONLY; Name of the azure resource 4789 Name *string `json:"name,omitempty"` 4790 // Type - READ-ONLY; Type of the azure resource 4791 Type *string `json:"type,omitempty"` 4792} 4793 4794// MarshalJSON is the custom marshaler for KustoClusterDataSet. 4795func (kcds KustoClusterDataSet) MarshalJSON() ([]byte, error) { 4796 kcds.Kind = KindKustoCluster 4797 objectMap := make(map[string]interface{}) 4798 if kcds.KustoClusterDataSetProperties != nil { 4799 objectMap["properties"] = kcds.KustoClusterDataSetProperties 4800 } 4801 if kcds.Kind != "" { 4802 objectMap["kind"] = kcds.Kind 4803 } 4804 return json.Marshal(objectMap) 4805} 4806 4807// AsADLSGen1FileDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4808func (kcds KustoClusterDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 4809 return nil, false 4810} 4811 4812// AsADLSGen1FolderDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4813func (kcds KustoClusterDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 4814 return nil, false 4815} 4816 4817// AsADLSGen2FileDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4818func (kcds KustoClusterDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 4819 return nil, false 4820} 4821 4822// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4823func (kcds KustoClusterDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 4824 return nil, false 4825} 4826 4827// AsADLSGen2FolderDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4828func (kcds KustoClusterDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 4829 return nil, false 4830} 4831 4832// AsBlobContainerDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4833func (kcds KustoClusterDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 4834 return nil, false 4835} 4836 4837// AsBlobDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4838func (kcds KustoClusterDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 4839 return nil, false 4840} 4841 4842// AsBlobFolderDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4843func (kcds KustoClusterDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 4844 return nil, false 4845} 4846 4847// AsKustoClusterDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4848func (kcds KustoClusterDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 4849 return &kcds, true 4850} 4851 4852// AsKustoDatabaseDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4853func (kcds KustoClusterDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 4854 return nil, false 4855} 4856 4857// AsSQLDBTableDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4858func (kcds KustoClusterDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 4859 return nil, false 4860} 4861 4862// AsSQLDWTableDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4863func (kcds KustoClusterDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 4864 return nil, false 4865} 4866 4867// AsDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4868func (kcds KustoClusterDataSet) AsDataSet() (*DataSet, bool) { 4869 return nil, false 4870} 4871 4872// AsBasicDataSet is the BasicDataSet implementation for KustoClusterDataSet. 4873func (kcds KustoClusterDataSet) AsBasicDataSet() (BasicDataSet, bool) { 4874 return &kcds, true 4875} 4876 4877// UnmarshalJSON is the custom unmarshaler for KustoClusterDataSet struct. 4878func (kcds *KustoClusterDataSet) UnmarshalJSON(body []byte) error { 4879 var m map[string]*json.RawMessage 4880 err := json.Unmarshal(body, &m) 4881 if err != nil { 4882 return err 4883 } 4884 for k, v := range m { 4885 switch k { 4886 case "properties": 4887 if v != nil { 4888 var kustoClusterDataSetProperties KustoClusterDataSetProperties 4889 err = json.Unmarshal(*v, &kustoClusterDataSetProperties) 4890 if err != nil { 4891 return err 4892 } 4893 kcds.KustoClusterDataSetProperties = &kustoClusterDataSetProperties 4894 } 4895 case "kind": 4896 if v != nil { 4897 var kind Kind 4898 err = json.Unmarshal(*v, &kind) 4899 if err != nil { 4900 return err 4901 } 4902 kcds.Kind = kind 4903 } 4904 case "id": 4905 if v != nil { 4906 var ID string 4907 err = json.Unmarshal(*v, &ID) 4908 if err != nil { 4909 return err 4910 } 4911 kcds.ID = &ID 4912 } 4913 case "name": 4914 if v != nil { 4915 var name string 4916 err = json.Unmarshal(*v, &name) 4917 if err != nil { 4918 return err 4919 } 4920 kcds.Name = &name 4921 } 4922 case "type": 4923 if v != nil { 4924 var typeVar string 4925 err = json.Unmarshal(*v, &typeVar) 4926 if err != nil { 4927 return err 4928 } 4929 kcds.Type = &typeVar 4930 } 4931 } 4932 } 4933 4934 return nil 4935} 4936 4937// KustoClusterDataSetMapping a Kusto cluster data set mapping 4938type KustoClusterDataSetMapping struct { 4939 // KustoClusterDataSetMappingProperties - Kusto cluster data set mapping properties. 4940 *KustoClusterDataSetMappingProperties `json:"properties,omitempty"` 4941 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 4942 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 4943 // ID - READ-ONLY; The resource id of the azure resource 4944 ID *string `json:"id,omitempty"` 4945 // Name - READ-ONLY; Name of the azure resource 4946 Name *string `json:"name,omitempty"` 4947 // Type - READ-ONLY; Type of the azure resource 4948 Type *string `json:"type,omitempty"` 4949} 4950 4951// MarshalJSON is the custom marshaler for KustoClusterDataSetMapping. 4952func (kcdsm KustoClusterDataSetMapping) MarshalJSON() ([]byte, error) { 4953 kcdsm.Kind = KindBasicDataSetMappingKindKustoCluster 4954 objectMap := make(map[string]interface{}) 4955 if kcdsm.KustoClusterDataSetMappingProperties != nil { 4956 objectMap["properties"] = kcdsm.KustoClusterDataSetMappingProperties 4957 } 4958 if kcdsm.Kind != "" { 4959 objectMap["kind"] = kcdsm.Kind 4960 } 4961 return json.Marshal(objectMap) 4962} 4963 4964// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4965func (kcdsm KustoClusterDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 4966 return nil, false 4967} 4968 4969// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4970func (kcdsm KustoClusterDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 4971 return nil, false 4972} 4973 4974// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4975func (kcdsm KustoClusterDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 4976 return nil, false 4977} 4978 4979// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4980func (kcdsm KustoClusterDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 4981 return nil, false 4982} 4983 4984// AsBlobDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4985func (kcdsm KustoClusterDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 4986 return nil, false 4987} 4988 4989// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4990func (kcdsm KustoClusterDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 4991 return nil, false 4992} 4993 4994// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 4995func (kcdsm KustoClusterDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 4996 return &kcdsm, true 4997} 4998 4999// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 5000func (kcdsm KustoClusterDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 5001 return nil, false 5002} 5003 5004// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 5005func (kcdsm KustoClusterDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 5006 return nil, false 5007} 5008 5009// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 5010func (kcdsm KustoClusterDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 5011 return nil, false 5012} 5013 5014// AsDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 5015func (kcdsm KustoClusterDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 5016 return nil, false 5017} 5018 5019// AsBasicDataSetMapping is the BasicDataSetMapping implementation for KustoClusterDataSetMapping. 5020func (kcdsm KustoClusterDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 5021 return &kcdsm, true 5022} 5023 5024// UnmarshalJSON is the custom unmarshaler for KustoClusterDataSetMapping struct. 5025func (kcdsm *KustoClusterDataSetMapping) UnmarshalJSON(body []byte) error { 5026 var m map[string]*json.RawMessage 5027 err := json.Unmarshal(body, &m) 5028 if err != nil { 5029 return err 5030 } 5031 for k, v := range m { 5032 switch k { 5033 case "properties": 5034 if v != nil { 5035 var kustoClusterDataSetMappingProperties KustoClusterDataSetMappingProperties 5036 err = json.Unmarshal(*v, &kustoClusterDataSetMappingProperties) 5037 if err != nil { 5038 return err 5039 } 5040 kcdsm.KustoClusterDataSetMappingProperties = &kustoClusterDataSetMappingProperties 5041 } 5042 case "kind": 5043 if v != nil { 5044 var kind KindBasicDataSetMapping 5045 err = json.Unmarshal(*v, &kind) 5046 if err != nil { 5047 return err 5048 } 5049 kcdsm.Kind = kind 5050 } 5051 case "id": 5052 if v != nil { 5053 var ID string 5054 err = json.Unmarshal(*v, &ID) 5055 if err != nil { 5056 return err 5057 } 5058 kcdsm.ID = &ID 5059 } 5060 case "name": 5061 if v != nil { 5062 var name string 5063 err = json.Unmarshal(*v, &name) 5064 if err != nil { 5065 return err 5066 } 5067 kcdsm.Name = &name 5068 } 5069 case "type": 5070 if v != nil { 5071 var typeVar string 5072 err = json.Unmarshal(*v, &typeVar) 5073 if err != nil { 5074 return err 5075 } 5076 kcdsm.Type = &typeVar 5077 } 5078 } 5079 } 5080 5081 return nil 5082} 5083 5084// KustoClusterDataSetMappingProperties properties of the Kusto cluster data set mapping 5085type KustoClusterDataSetMappingProperties struct { 5086 // DataSetID - The id of the source data set. 5087 DataSetID *string `json:"dataSetId,omitempty"` 5088 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 5089 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 5090 // KustoClusterResourceID - Resource id of the sink kusto cluster. 5091 KustoClusterResourceID *string `json:"kustoClusterResourceId,omitempty"` 5092 // Location - READ-ONLY; Location of the sink kusto cluster. 5093 Location *string `json:"location,omitempty"` 5094 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 5095 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5096} 5097 5098// MarshalJSON is the custom marshaler for KustoClusterDataSetMappingProperties. 5099func (kcdsmp KustoClusterDataSetMappingProperties) MarshalJSON() ([]byte, error) { 5100 objectMap := make(map[string]interface{}) 5101 if kcdsmp.DataSetID != nil { 5102 objectMap["dataSetId"] = kcdsmp.DataSetID 5103 } 5104 if kcdsmp.KustoClusterResourceID != nil { 5105 objectMap["kustoClusterResourceId"] = kcdsmp.KustoClusterResourceID 5106 } 5107 return json.Marshal(objectMap) 5108} 5109 5110// KustoClusterDataSetProperties properties of the kusto cluster data set. 5111type KustoClusterDataSetProperties struct { 5112 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 5113 DataSetID *string `json:"dataSetId,omitempty"` 5114 // KustoClusterResourceID - Resource id of the kusto cluster. 5115 KustoClusterResourceID *string `json:"kustoClusterResourceId,omitempty"` 5116 // Location - READ-ONLY; Location of the kusto cluster. 5117 Location *string `json:"location,omitempty"` 5118 // ProvisioningState - READ-ONLY; Provisioning state of the kusto cluster data set. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 5119 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5120} 5121 5122// MarshalJSON is the custom marshaler for KustoClusterDataSetProperties. 5123func (kcdsp KustoClusterDataSetProperties) MarshalJSON() ([]byte, error) { 5124 objectMap := make(map[string]interface{}) 5125 if kcdsp.KustoClusterResourceID != nil { 5126 objectMap["kustoClusterResourceId"] = kcdsp.KustoClusterResourceID 5127 } 5128 return json.Marshal(objectMap) 5129} 5130 5131// KustoDatabaseDataSet a kusto database data set. 5132type KustoDatabaseDataSet struct { 5133 // KustoDatabaseDataSetProperties - Kusto database data set properties. 5134 *KustoDatabaseDataSetProperties `json:"properties,omitempty"` 5135 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 5136 Kind Kind `json:"kind,omitempty"` 5137 // ID - READ-ONLY; The resource id of the azure resource 5138 ID *string `json:"id,omitempty"` 5139 // Name - READ-ONLY; Name of the azure resource 5140 Name *string `json:"name,omitempty"` 5141 // Type - READ-ONLY; Type of the azure resource 5142 Type *string `json:"type,omitempty"` 5143} 5144 5145// MarshalJSON is the custom marshaler for KustoDatabaseDataSet. 5146func (kdds KustoDatabaseDataSet) MarshalJSON() ([]byte, error) { 5147 kdds.Kind = KindKustoDatabase 5148 objectMap := make(map[string]interface{}) 5149 if kdds.KustoDatabaseDataSetProperties != nil { 5150 objectMap["properties"] = kdds.KustoDatabaseDataSetProperties 5151 } 5152 if kdds.Kind != "" { 5153 objectMap["kind"] = kdds.Kind 5154 } 5155 return json.Marshal(objectMap) 5156} 5157 5158// AsADLSGen1FileDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5159func (kdds KustoDatabaseDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 5160 return nil, false 5161} 5162 5163// AsADLSGen1FolderDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5164func (kdds KustoDatabaseDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 5165 return nil, false 5166} 5167 5168// AsADLSGen2FileDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5169func (kdds KustoDatabaseDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 5170 return nil, false 5171} 5172 5173// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5174func (kdds KustoDatabaseDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 5175 return nil, false 5176} 5177 5178// AsADLSGen2FolderDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5179func (kdds KustoDatabaseDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 5180 return nil, false 5181} 5182 5183// AsBlobContainerDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5184func (kdds KustoDatabaseDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 5185 return nil, false 5186} 5187 5188// AsBlobDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5189func (kdds KustoDatabaseDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 5190 return nil, false 5191} 5192 5193// AsBlobFolderDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5194func (kdds KustoDatabaseDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 5195 return nil, false 5196} 5197 5198// AsKustoClusterDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5199func (kdds KustoDatabaseDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 5200 return nil, false 5201} 5202 5203// AsKustoDatabaseDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5204func (kdds KustoDatabaseDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 5205 return &kdds, true 5206} 5207 5208// AsSQLDBTableDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5209func (kdds KustoDatabaseDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 5210 return nil, false 5211} 5212 5213// AsSQLDWTableDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5214func (kdds KustoDatabaseDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 5215 return nil, false 5216} 5217 5218// AsDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5219func (kdds KustoDatabaseDataSet) AsDataSet() (*DataSet, bool) { 5220 return nil, false 5221} 5222 5223// AsBasicDataSet is the BasicDataSet implementation for KustoDatabaseDataSet. 5224func (kdds KustoDatabaseDataSet) AsBasicDataSet() (BasicDataSet, bool) { 5225 return &kdds, true 5226} 5227 5228// UnmarshalJSON is the custom unmarshaler for KustoDatabaseDataSet struct. 5229func (kdds *KustoDatabaseDataSet) UnmarshalJSON(body []byte) error { 5230 var m map[string]*json.RawMessage 5231 err := json.Unmarshal(body, &m) 5232 if err != nil { 5233 return err 5234 } 5235 for k, v := range m { 5236 switch k { 5237 case "properties": 5238 if v != nil { 5239 var kustoDatabaseDataSetProperties KustoDatabaseDataSetProperties 5240 err = json.Unmarshal(*v, &kustoDatabaseDataSetProperties) 5241 if err != nil { 5242 return err 5243 } 5244 kdds.KustoDatabaseDataSetProperties = &kustoDatabaseDataSetProperties 5245 } 5246 case "kind": 5247 if v != nil { 5248 var kind Kind 5249 err = json.Unmarshal(*v, &kind) 5250 if err != nil { 5251 return err 5252 } 5253 kdds.Kind = kind 5254 } 5255 case "id": 5256 if v != nil { 5257 var ID string 5258 err = json.Unmarshal(*v, &ID) 5259 if err != nil { 5260 return err 5261 } 5262 kdds.ID = &ID 5263 } 5264 case "name": 5265 if v != nil { 5266 var name string 5267 err = json.Unmarshal(*v, &name) 5268 if err != nil { 5269 return err 5270 } 5271 kdds.Name = &name 5272 } 5273 case "type": 5274 if v != nil { 5275 var typeVar string 5276 err = json.Unmarshal(*v, &typeVar) 5277 if err != nil { 5278 return err 5279 } 5280 kdds.Type = &typeVar 5281 } 5282 } 5283 } 5284 5285 return nil 5286} 5287 5288// KustoDatabaseDataSetMapping a Kusto database data set mapping 5289type KustoDatabaseDataSetMapping struct { 5290 // KustoDatabaseDataSetMappingProperties - Kusto database data set mapping properties. 5291 *KustoDatabaseDataSetMappingProperties `json:"properties,omitempty"` 5292 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 5293 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 5294 // ID - READ-ONLY; The resource id of the azure resource 5295 ID *string `json:"id,omitempty"` 5296 // Name - READ-ONLY; Name of the azure resource 5297 Name *string `json:"name,omitempty"` 5298 // Type - READ-ONLY; Type of the azure resource 5299 Type *string `json:"type,omitempty"` 5300} 5301 5302// MarshalJSON is the custom marshaler for KustoDatabaseDataSetMapping. 5303func (kddsm KustoDatabaseDataSetMapping) MarshalJSON() ([]byte, error) { 5304 kddsm.Kind = KindBasicDataSetMappingKindKustoDatabase 5305 objectMap := make(map[string]interface{}) 5306 if kddsm.KustoDatabaseDataSetMappingProperties != nil { 5307 objectMap["properties"] = kddsm.KustoDatabaseDataSetMappingProperties 5308 } 5309 if kddsm.Kind != "" { 5310 objectMap["kind"] = kddsm.Kind 5311 } 5312 return json.Marshal(objectMap) 5313} 5314 5315// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5316func (kddsm KustoDatabaseDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 5317 return nil, false 5318} 5319 5320// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5321func (kddsm KustoDatabaseDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 5322 return nil, false 5323} 5324 5325// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5326func (kddsm KustoDatabaseDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 5327 return nil, false 5328} 5329 5330// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5331func (kddsm KustoDatabaseDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 5332 return nil, false 5333} 5334 5335// AsBlobDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5336func (kddsm KustoDatabaseDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 5337 return nil, false 5338} 5339 5340// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5341func (kddsm KustoDatabaseDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 5342 return nil, false 5343} 5344 5345// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5346func (kddsm KustoDatabaseDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 5347 return nil, false 5348} 5349 5350// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5351func (kddsm KustoDatabaseDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 5352 return &kddsm, true 5353} 5354 5355// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5356func (kddsm KustoDatabaseDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 5357 return nil, false 5358} 5359 5360// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5361func (kddsm KustoDatabaseDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 5362 return nil, false 5363} 5364 5365// AsDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5366func (kddsm KustoDatabaseDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 5367 return nil, false 5368} 5369 5370// AsBasicDataSetMapping is the BasicDataSetMapping implementation for KustoDatabaseDataSetMapping. 5371func (kddsm KustoDatabaseDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 5372 return &kddsm, true 5373} 5374 5375// UnmarshalJSON is the custom unmarshaler for KustoDatabaseDataSetMapping struct. 5376func (kddsm *KustoDatabaseDataSetMapping) UnmarshalJSON(body []byte) error { 5377 var m map[string]*json.RawMessage 5378 err := json.Unmarshal(body, &m) 5379 if err != nil { 5380 return err 5381 } 5382 for k, v := range m { 5383 switch k { 5384 case "properties": 5385 if v != nil { 5386 var kustoDatabaseDataSetMappingProperties KustoDatabaseDataSetMappingProperties 5387 err = json.Unmarshal(*v, &kustoDatabaseDataSetMappingProperties) 5388 if err != nil { 5389 return err 5390 } 5391 kddsm.KustoDatabaseDataSetMappingProperties = &kustoDatabaseDataSetMappingProperties 5392 } 5393 case "kind": 5394 if v != nil { 5395 var kind KindBasicDataSetMapping 5396 err = json.Unmarshal(*v, &kind) 5397 if err != nil { 5398 return err 5399 } 5400 kddsm.Kind = kind 5401 } 5402 case "id": 5403 if v != nil { 5404 var ID string 5405 err = json.Unmarshal(*v, &ID) 5406 if err != nil { 5407 return err 5408 } 5409 kddsm.ID = &ID 5410 } 5411 case "name": 5412 if v != nil { 5413 var name string 5414 err = json.Unmarshal(*v, &name) 5415 if err != nil { 5416 return err 5417 } 5418 kddsm.Name = &name 5419 } 5420 case "type": 5421 if v != nil { 5422 var typeVar string 5423 err = json.Unmarshal(*v, &typeVar) 5424 if err != nil { 5425 return err 5426 } 5427 kddsm.Type = &typeVar 5428 } 5429 } 5430 } 5431 5432 return nil 5433} 5434 5435// KustoDatabaseDataSetMappingProperties properties of the Kusto database data set mapping 5436type KustoDatabaseDataSetMappingProperties struct { 5437 // DataSetID - The id of the source data set. 5438 DataSetID *string `json:"dataSetId,omitempty"` 5439 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 5440 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 5441 // KustoClusterResourceID - Resource id of the sink kusto cluster. 5442 KustoClusterResourceID *string `json:"kustoClusterResourceId,omitempty"` 5443 // Location - READ-ONLY; Location of the sink kusto cluster. 5444 Location *string `json:"location,omitempty"` 5445 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 5446 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5447} 5448 5449// MarshalJSON is the custom marshaler for KustoDatabaseDataSetMappingProperties. 5450func (kddsmp KustoDatabaseDataSetMappingProperties) MarshalJSON() ([]byte, error) { 5451 objectMap := make(map[string]interface{}) 5452 if kddsmp.DataSetID != nil { 5453 objectMap["dataSetId"] = kddsmp.DataSetID 5454 } 5455 if kddsmp.KustoClusterResourceID != nil { 5456 objectMap["kustoClusterResourceId"] = kddsmp.KustoClusterResourceID 5457 } 5458 return json.Marshal(objectMap) 5459} 5460 5461// KustoDatabaseDataSetProperties properties of the kusto database data set. 5462type KustoDatabaseDataSetProperties struct { 5463 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 5464 DataSetID *string `json:"dataSetId,omitempty"` 5465 // KustoDatabaseResourceID - Resource id of the kusto database. 5466 KustoDatabaseResourceID *string `json:"kustoDatabaseResourceId,omitempty"` 5467 // Location - READ-ONLY; Location of the kusto cluster. 5468 Location *string `json:"location,omitempty"` 5469 // ProvisioningState - READ-ONLY; Provisioning state of the kusto database data set. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 5470 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5471} 5472 5473// MarshalJSON is the custom marshaler for KustoDatabaseDataSetProperties. 5474func (kddsp KustoDatabaseDataSetProperties) MarshalJSON() ([]byte, error) { 5475 objectMap := make(map[string]interface{}) 5476 if kddsp.KustoDatabaseResourceID != nil { 5477 objectMap["kustoDatabaseResourceId"] = kddsp.KustoDatabaseResourceID 5478 } 5479 return json.Marshal(objectMap) 5480} 5481 5482// OperationList list response for get operations. 5483type OperationList struct { 5484 autorest.Response `json:"-"` 5485 // NextLink - The Url of next result page. 5486 NextLink *string `json:"nextLink,omitempty"` 5487 // Value - Collection of items of type DataTransferObjects. 5488 Value *[]OperationModel `json:"value,omitempty"` 5489} 5490 5491// OperationListIterator provides access to a complete listing of OperationModel values. 5492type OperationListIterator struct { 5493 i int 5494 page OperationListPage 5495} 5496 5497// NextWithContext advances to the next value. If there was an error making 5498// the request the iterator does not advance and the error is returned. 5499func (iter *OperationListIterator) NextWithContext(ctx context.Context) (err error) { 5500 if tracing.IsEnabled() { 5501 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListIterator.NextWithContext") 5502 defer func() { 5503 sc := -1 5504 if iter.Response().Response.Response != nil { 5505 sc = iter.Response().Response.Response.StatusCode 5506 } 5507 tracing.EndSpan(ctx, sc, err) 5508 }() 5509 } 5510 iter.i++ 5511 if iter.i < len(iter.page.Values()) { 5512 return nil 5513 } 5514 err = iter.page.NextWithContext(ctx) 5515 if err != nil { 5516 iter.i-- 5517 return err 5518 } 5519 iter.i = 0 5520 return nil 5521} 5522 5523// Next advances to the next value. If there was an error making 5524// the request the iterator does not advance and the error is returned. 5525// Deprecated: Use NextWithContext() instead. 5526func (iter *OperationListIterator) Next() error { 5527 return iter.NextWithContext(context.Background()) 5528} 5529 5530// NotDone returns true if the enumeration should be started or is not yet complete. 5531func (iter OperationListIterator) NotDone() bool { 5532 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5533} 5534 5535// Response returns the raw server response from the last page request. 5536func (iter OperationListIterator) Response() OperationList { 5537 return iter.page.Response() 5538} 5539 5540// Value returns the current value or a zero-initialized value if the 5541// iterator has advanced beyond the end of the collection. 5542func (iter OperationListIterator) Value() OperationModel { 5543 if !iter.page.NotDone() { 5544 return OperationModel{} 5545 } 5546 return iter.page.Values()[iter.i] 5547} 5548 5549// Creates a new instance of the OperationListIterator type. 5550func NewOperationListIterator(page OperationListPage) OperationListIterator { 5551 return OperationListIterator{page: page} 5552} 5553 5554// IsEmpty returns true if the ListResult contains no values. 5555func (ol OperationList) IsEmpty() bool { 5556 return ol.Value == nil || len(*ol.Value) == 0 5557} 5558 5559// hasNextLink returns true if the NextLink is not empty. 5560func (ol OperationList) hasNextLink() bool { 5561 return ol.NextLink != nil && len(*ol.NextLink) != 0 5562} 5563 5564// operationListPreparer prepares a request to retrieve the next set of results. 5565// It returns nil if no more results exist. 5566func (ol OperationList) operationListPreparer(ctx context.Context) (*http.Request, error) { 5567 if !ol.hasNextLink() { 5568 return nil, nil 5569 } 5570 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5571 autorest.AsJSON(), 5572 autorest.AsGet(), 5573 autorest.WithBaseURL(to.String(ol.NextLink))) 5574} 5575 5576// OperationListPage contains a page of OperationModel values. 5577type OperationListPage struct { 5578 fn func(context.Context, OperationList) (OperationList, error) 5579 ol OperationList 5580} 5581 5582// NextWithContext advances to the next page of values. If there was an error making 5583// the request the page does not advance and the error is returned. 5584func (page *OperationListPage) NextWithContext(ctx context.Context) (err error) { 5585 if tracing.IsEnabled() { 5586 ctx = tracing.StartSpan(ctx, fqdn+"/OperationListPage.NextWithContext") 5587 defer func() { 5588 sc := -1 5589 if page.Response().Response.Response != nil { 5590 sc = page.Response().Response.Response.StatusCode 5591 } 5592 tracing.EndSpan(ctx, sc, err) 5593 }() 5594 } 5595 for { 5596 next, err := page.fn(ctx, page.ol) 5597 if err != nil { 5598 return err 5599 } 5600 page.ol = next 5601 if !next.hasNextLink() || !next.IsEmpty() { 5602 break 5603 } 5604 } 5605 return nil 5606} 5607 5608// Next advances to the next page of values. If there was an error making 5609// the request the page does not advance and the error is returned. 5610// Deprecated: Use NextWithContext() instead. 5611func (page *OperationListPage) Next() error { 5612 return page.NextWithContext(context.Background()) 5613} 5614 5615// NotDone returns true if the page enumeration should be started or is not yet complete. 5616func (page OperationListPage) NotDone() bool { 5617 return !page.ol.IsEmpty() 5618} 5619 5620// Response returns the raw server response from the last page request. 5621func (page OperationListPage) Response() OperationList { 5622 return page.ol 5623} 5624 5625// Values returns the slice of values for the current page or nil if there are no values. 5626func (page OperationListPage) Values() []OperationModel { 5627 if page.ol.IsEmpty() { 5628 return nil 5629 } 5630 return *page.ol.Value 5631} 5632 5633// Creates a new instance of the OperationListPage type. 5634func NewOperationListPage(cur OperationList, getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage { 5635 return OperationListPage{ 5636 fn: getNextPage, 5637 ol: cur, 5638 } 5639} 5640 5641// OperationMetaLogSpecification log specifications for operation api 5642type OperationMetaLogSpecification struct { 5643 // BlobDuration - blob duration of the log 5644 BlobDuration *string `json:"blobDuration,omitempty"` 5645 // DisplayName - localized name of the log category 5646 DisplayName *string `json:"displayName,omitempty"` 5647 // Name - name of the log category 5648 Name *string `json:"name,omitempty"` 5649} 5650 5651// OperationMetaMetricSpecification metric specifications for the operation 5652type OperationMetaMetricSpecification struct { 5653 // AggregationType - aggregation type of metric 5654 AggregationType *string `json:"aggregationType,omitempty"` 5655 // Dimensions - properties for dimension 5656 Dimensions *[]DimensionProperties `json:"dimensions,omitempty"` 5657 // DisplayDescription - description of the metric 5658 DisplayDescription *string `json:"displayDescription,omitempty"` 5659 // DisplayName - localized name of the metric 5660 DisplayName *string `json:"displayName,omitempty"` 5661 // EnableRegionalMdmAccount - enable regional mdm account 5662 EnableRegionalMdmAccount *string `json:"enableRegionalMdmAccount,omitempty"` 5663 // InternalMetricName - internal metric name 5664 InternalMetricName *string `json:"internalMetricName,omitempty"` 5665 // Name - name of the metric 5666 Name *string `json:"name,omitempty"` 5667 // ResourceIDDimensionNameOverride - dimension name use to replace resource id if specified 5668 ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` 5669 // SupportedAggregationTypes - supported aggregation types 5670 SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"` 5671 // SupportedTimeGrainTypes - supported time grain types 5672 SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"` 5673 // Unit - units for the metric 5674 Unit *string `json:"unit,omitempty"` 5675} 5676 5677// OperationMetaPropertyInfo properties on meta info 5678type OperationMetaPropertyInfo struct { 5679 // ServiceSpecification - meta service specification 5680 ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"` 5681} 5682 5683// OperationMetaServiceSpecification the operation meta service specification 5684type OperationMetaServiceSpecification struct { 5685 // LogSpecifications - log specifications for the operation 5686 LogSpecifications *[]OperationMetaLogSpecification `json:"logSpecifications,omitempty"` 5687 // MetricSpecifications - metric specifications for the operation 5688 MetricSpecifications *[]OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"` 5689} 5690 5691// OperationModel the response model for get operations 5692type OperationModel struct { 5693 // Display - Properties on the operation 5694 Display *OperationModelProperties `json:"display,omitempty"` 5695 // Name - Operation name for display purposes 5696 Name *string `json:"name,omitempty"` 5697 // Origin - origin of the operation 5698 Origin *string `json:"origin,omitempty"` 5699 // OperationMetaPropertyInfo - properties for the operation meta info 5700 *OperationMetaPropertyInfo `json:"properties,omitempty"` 5701} 5702 5703// MarshalJSON is the custom marshaler for OperationModel. 5704func (om OperationModel) MarshalJSON() ([]byte, error) { 5705 objectMap := make(map[string]interface{}) 5706 if om.Display != nil { 5707 objectMap["display"] = om.Display 5708 } 5709 if om.Name != nil { 5710 objectMap["name"] = om.Name 5711 } 5712 if om.Origin != nil { 5713 objectMap["origin"] = om.Origin 5714 } 5715 if om.OperationMetaPropertyInfo != nil { 5716 objectMap["properties"] = om.OperationMetaPropertyInfo 5717 } 5718 return json.Marshal(objectMap) 5719} 5720 5721// UnmarshalJSON is the custom unmarshaler for OperationModel struct. 5722func (om *OperationModel) UnmarshalJSON(body []byte) error { 5723 var m map[string]*json.RawMessage 5724 err := json.Unmarshal(body, &m) 5725 if err != nil { 5726 return err 5727 } 5728 for k, v := range m { 5729 switch k { 5730 case "display": 5731 if v != nil { 5732 var display OperationModelProperties 5733 err = json.Unmarshal(*v, &display) 5734 if err != nil { 5735 return err 5736 } 5737 om.Display = &display 5738 } 5739 case "name": 5740 if v != nil { 5741 var name string 5742 err = json.Unmarshal(*v, &name) 5743 if err != nil { 5744 return err 5745 } 5746 om.Name = &name 5747 } 5748 case "origin": 5749 if v != nil { 5750 var origin string 5751 err = json.Unmarshal(*v, &origin) 5752 if err != nil { 5753 return err 5754 } 5755 om.Origin = &origin 5756 } 5757 case "properties": 5758 if v != nil { 5759 var operationMetaPropertyInfo OperationMetaPropertyInfo 5760 err = json.Unmarshal(*v, &operationMetaPropertyInfo) 5761 if err != nil { 5762 return err 5763 } 5764 om.OperationMetaPropertyInfo = &operationMetaPropertyInfo 5765 } 5766 } 5767 } 5768 5769 return nil 5770} 5771 5772// OperationModelProperties properties on operations 5773type OperationModelProperties struct { 5774 // Description - Description of the operation for display purposes 5775 Description *string `json:"description,omitempty"` 5776 // Operation - Name of the operation for display purposes 5777 Operation *string `json:"operation,omitempty"` 5778 // Provider - Name of the provider for display purposes 5779 Provider *string `json:"provider,omitempty"` 5780 // Resource - Name of the resource type for display purposes 5781 Resource *string `json:"resource,omitempty"` 5782} 5783 5784// OperationResponse response for long running operation 5785type OperationResponse struct { 5786 autorest.Response `json:"-"` 5787 // EndTime - start time 5788 EndTime *date.Time `json:"endTime,omitempty"` 5789 // Error - The error property when status is failed. 5790 Error *ErrorInfo `json:"error,omitempty"` 5791 // StartTime - start time 5792 StartTime *date.Time `json:"startTime,omitempty"` 5793 // Status - Operation state of the long running operation. Possible values include: 'StatusAccepted', 'StatusInProgress', 'StatusTransientFailure', 'StatusSucceeded', 'StatusFailed', 'StatusCanceled' 5794 Status Status `json:"status,omitempty"` 5795} 5796 5797// ProviderShareSubscription a provider side share subscription data transfer object. 5798type ProviderShareSubscription struct { 5799 autorest.Response `json:"-"` 5800 // ProviderShareSubscriptionProperties - properties of providerShareSubscription 5801 *ProviderShareSubscriptionProperties `json:"properties,omitempty"` 5802 // ID - READ-ONLY; The resource id of the azure resource 5803 ID *string `json:"id,omitempty"` 5804 // Name - READ-ONLY; Name of the azure resource 5805 Name *string `json:"name,omitempty"` 5806 // Type - READ-ONLY; Type of the azure resource 5807 Type *string `json:"type,omitempty"` 5808} 5809 5810// MarshalJSON is the custom marshaler for ProviderShareSubscription. 5811func (pss ProviderShareSubscription) MarshalJSON() ([]byte, error) { 5812 objectMap := make(map[string]interface{}) 5813 if pss.ProviderShareSubscriptionProperties != nil { 5814 objectMap["properties"] = pss.ProviderShareSubscriptionProperties 5815 } 5816 return json.Marshal(objectMap) 5817} 5818 5819// UnmarshalJSON is the custom unmarshaler for ProviderShareSubscription struct. 5820func (pss *ProviderShareSubscription) UnmarshalJSON(body []byte) error { 5821 var m map[string]*json.RawMessage 5822 err := json.Unmarshal(body, &m) 5823 if err != nil { 5824 return err 5825 } 5826 for k, v := range m { 5827 switch k { 5828 case "properties": 5829 if v != nil { 5830 var providerShareSubscriptionProperties ProviderShareSubscriptionProperties 5831 err = json.Unmarshal(*v, &providerShareSubscriptionProperties) 5832 if err != nil { 5833 return err 5834 } 5835 pss.ProviderShareSubscriptionProperties = &providerShareSubscriptionProperties 5836 } 5837 case "id": 5838 if v != nil { 5839 var ID string 5840 err = json.Unmarshal(*v, &ID) 5841 if err != nil { 5842 return err 5843 } 5844 pss.ID = &ID 5845 } 5846 case "name": 5847 if v != nil { 5848 var name string 5849 err = json.Unmarshal(*v, &name) 5850 if err != nil { 5851 return err 5852 } 5853 pss.Name = &name 5854 } 5855 case "type": 5856 if v != nil { 5857 var typeVar string 5858 err = json.Unmarshal(*v, &typeVar) 5859 if err != nil { 5860 return err 5861 } 5862 pss.Type = &typeVar 5863 } 5864 } 5865 } 5866 5867 return nil 5868} 5869 5870// ProviderShareSubscriptionList list response for get ShareSubscription. 5871type ProviderShareSubscriptionList struct { 5872 autorest.Response `json:"-"` 5873 // NextLink - The Url of next result page. 5874 NextLink *string `json:"nextLink,omitempty"` 5875 // Value - Collection of items of type DataTransferObjects. 5876 Value *[]ProviderShareSubscription `json:"value,omitempty"` 5877} 5878 5879// ProviderShareSubscriptionListIterator provides access to a complete listing of ProviderShareSubscription 5880// values. 5881type ProviderShareSubscriptionListIterator struct { 5882 i int 5883 page ProviderShareSubscriptionListPage 5884} 5885 5886// NextWithContext advances to the next value. If there was an error making 5887// the request the iterator does not advance and the error is returned. 5888func (iter *ProviderShareSubscriptionListIterator) NextWithContext(ctx context.Context) (err error) { 5889 if tracing.IsEnabled() { 5890 ctx = tracing.StartSpan(ctx, fqdn+"/ProviderShareSubscriptionListIterator.NextWithContext") 5891 defer func() { 5892 sc := -1 5893 if iter.Response().Response.Response != nil { 5894 sc = iter.Response().Response.Response.StatusCode 5895 } 5896 tracing.EndSpan(ctx, sc, err) 5897 }() 5898 } 5899 iter.i++ 5900 if iter.i < len(iter.page.Values()) { 5901 return nil 5902 } 5903 err = iter.page.NextWithContext(ctx) 5904 if err != nil { 5905 iter.i-- 5906 return err 5907 } 5908 iter.i = 0 5909 return nil 5910} 5911 5912// Next advances to the next value. If there was an error making 5913// the request the iterator does not advance and the error is returned. 5914// Deprecated: Use NextWithContext() instead. 5915func (iter *ProviderShareSubscriptionListIterator) Next() error { 5916 return iter.NextWithContext(context.Background()) 5917} 5918 5919// NotDone returns true if the enumeration should be started or is not yet complete. 5920func (iter ProviderShareSubscriptionListIterator) NotDone() bool { 5921 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5922} 5923 5924// Response returns the raw server response from the last page request. 5925func (iter ProviderShareSubscriptionListIterator) Response() ProviderShareSubscriptionList { 5926 return iter.page.Response() 5927} 5928 5929// Value returns the current value or a zero-initialized value if the 5930// iterator has advanced beyond the end of the collection. 5931func (iter ProviderShareSubscriptionListIterator) Value() ProviderShareSubscription { 5932 if !iter.page.NotDone() { 5933 return ProviderShareSubscription{} 5934 } 5935 return iter.page.Values()[iter.i] 5936} 5937 5938// Creates a new instance of the ProviderShareSubscriptionListIterator type. 5939func NewProviderShareSubscriptionListIterator(page ProviderShareSubscriptionListPage) ProviderShareSubscriptionListIterator { 5940 return ProviderShareSubscriptionListIterator{page: page} 5941} 5942 5943// IsEmpty returns true if the ListResult contains no values. 5944func (pssl ProviderShareSubscriptionList) IsEmpty() bool { 5945 return pssl.Value == nil || len(*pssl.Value) == 0 5946} 5947 5948// hasNextLink returns true if the NextLink is not empty. 5949func (pssl ProviderShareSubscriptionList) hasNextLink() bool { 5950 return pssl.NextLink != nil && len(*pssl.NextLink) != 0 5951} 5952 5953// providerShareSubscriptionListPreparer prepares a request to retrieve the next set of results. 5954// It returns nil if no more results exist. 5955func (pssl ProviderShareSubscriptionList) providerShareSubscriptionListPreparer(ctx context.Context) (*http.Request, error) { 5956 if !pssl.hasNextLink() { 5957 return nil, nil 5958 } 5959 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5960 autorest.AsJSON(), 5961 autorest.AsGet(), 5962 autorest.WithBaseURL(to.String(pssl.NextLink))) 5963} 5964 5965// ProviderShareSubscriptionListPage contains a page of ProviderShareSubscription values. 5966type ProviderShareSubscriptionListPage struct { 5967 fn func(context.Context, ProviderShareSubscriptionList) (ProviderShareSubscriptionList, error) 5968 pssl ProviderShareSubscriptionList 5969} 5970 5971// NextWithContext advances to the next page of values. If there was an error making 5972// the request the page does not advance and the error is returned. 5973func (page *ProviderShareSubscriptionListPage) NextWithContext(ctx context.Context) (err error) { 5974 if tracing.IsEnabled() { 5975 ctx = tracing.StartSpan(ctx, fqdn+"/ProviderShareSubscriptionListPage.NextWithContext") 5976 defer func() { 5977 sc := -1 5978 if page.Response().Response.Response != nil { 5979 sc = page.Response().Response.Response.StatusCode 5980 } 5981 tracing.EndSpan(ctx, sc, err) 5982 }() 5983 } 5984 for { 5985 next, err := page.fn(ctx, page.pssl) 5986 if err != nil { 5987 return err 5988 } 5989 page.pssl = next 5990 if !next.hasNextLink() || !next.IsEmpty() { 5991 break 5992 } 5993 } 5994 return nil 5995} 5996 5997// Next advances to the next page of values. If there was an error making 5998// the request the page does not advance and the error is returned. 5999// Deprecated: Use NextWithContext() instead. 6000func (page *ProviderShareSubscriptionListPage) Next() error { 6001 return page.NextWithContext(context.Background()) 6002} 6003 6004// NotDone returns true if the page enumeration should be started or is not yet complete. 6005func (page ProviderShareSubscriptionListPage) NotDone() bool { 6006 return !page.pssl.IsEmpty() 6007} 6008 6009// Response returns the raw server response from the last page request. 6010func (page ProviderShareSubscriptionListPage) Response() ProviderShareSubscriptionList { 6011 return page.pssl 6012} 6013 6014// Values returns the slice of values for the current page or nil if there are no values. 6015func (page ProviderShareSubscriptionListPage) Values() []ProviderShareSubscription { 6016 if page.pssl.IsEmpty() { 6017 return nil 6018 } 6019 return *page.pssl.Value 6020} 6021 6022// Creates a new instance of the ProviderShareSubscriptionListPage type. 6023func NewProviderShareSubscriptionListPage(cur ProviderShareSubscriptionList, getNextPage func(context.Context, ProviderShareSubscriptionList) (ProviderShareSubscriptionList, error)) ProviderShareSubscriptionListPage { 6024 return ProviderShareSubscriptionListPage{ 6025 fn: getNextPage, 6026 pssl: cur, 6027 } 6028} 6029 6030// ProviderShareSubscriptionProperties provider share subscription properties 6031type ProviderShareSubscriptionProperties struct { 6032 // ConsumerEmail - READ-ONLY; Email of the consumer who created the share subscription 6033 ConsumerEmail *string `json:"consumerEmail,omitempty"` 6034 // ConsumerName - READ-ONLY; Name of the consumer who created the share subscription 6035 ConsumerName *string `json:"consumerName,omitempty"` 6036 // ConsumerTenantName - READ-ONLY; Tenant name of the consumer who created the share subscription 6037 ConsumerTenantName *string `json:"consumerTenantName,omitempty"` 6038 // CreatedAt - READ-ONLY; created at 6039 CreatedAt *date.Time `json:"createdAt,omitempty"` 6040 // ProviderEmail - READ-ONLY; Email of the provider who created the share 6041 ProviderEmail *string `json:"providerEmail,omitempty"` 6042 // ProviderName - READ-ONLY; Name of the provider who created the share 6043 ProviderName *string `json:"providerName,omitempty"` 6044 // SharedAt - READ-ONLY; Shared at 6045 SharedAt *date.Time `json:"sharedAt,omitempty"` 6046 // ShareSubscriptionObjectID - READ-ONLY; share Subscription Object Id 6047 ShareSubscriptionObjectID *string `json:"shareSubscriptionObjectId,omitempty"` 6048 // ShareSubscriptionStatus - READ-ONLY; Gets the status of share subscription. Possible values include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking' 6049 ShareSubscriptionStatus ShareSubscriptionStatus `json:"shareSubscriptionStatus,omitempty"` 6050} 6051 6052// MarshalJSON is the custom marshaler for ProviderShareSubscriptionProperties. 6053func (pssp ProviderShareSubscriptionProperties) MarshalJSON() ([]byte, error) { 6054 objectMap := make(map[string]interface{}) 6055 return json.Marshal(objectMap) 6056} 6057 6058// ProviderShareSubscriptionsRevokeFuture an abstraction for monitoring and retrieving the results of a 6059// long-running operation. 6060type ProviderShareSubscriptionsRevokeFuture struct { 6061 azure.FutureAPI 6062 // Result returns the result of the asynchronous operation. 6063 // If the operation has not completed it will return an error. 6064 Result func(ProviderShareSubscriptionsClient) (ProviderShareSubscription, error) 6065} 6066 6067// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6068func (future *ProviderShareSubscriptionsRevokeFuture) UnmarshalJSON(body []byte) error { 6069 var azFuture azure.Future 6070 if err := json.Unmarshal(body, &azFuture); err != nil { 6071 return err 6072 } 6073 future.FutureAPI = &azFuture 6074 future.Result = future.result 6075 return nil 6076} 6077 6078// result is the default implementation for ProviderShareSubscriptionsRevokeFuture.Result. 6079func (future *ProviderShareSubscriptionsRevokeFuture) result(client ProviderShareSubscriptionsClient) (pss ProviderShareSubscription, err error) { 6080 var done bool 6081 done, err = future.DoneWithContext(context.Background(), client) 6082 if err != nil { 6083 err = autorest.NewErrorWithError(err, "datashare.ProviderShareSubscriptionsRevokeFuture", "Result", future.Response(), "Polling failure") 6084 return 6085 } 6086 if !done { 6087 pss.Response.Response = future.Response() 6088 err = azure.NewAsyncOpIncompleteError("datashare.ProviderShareSubscriptionsRevokeFuture") 6089 return 6090 } 6091 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6092 if pss.Response.Response, err = future.GetResult(sender); err == nil && pss.Response.Response.StatusCode != http.StatusNoContent { 6093 pss, err = client.RevokeResponder(pss.Response.Response) 6094 if err != nil { 6095 err = autorest.NewErrorWithError(err, "datashare.ProviderShareSubscriptionsRevokeFuture", "Result", pss.Response.Response, "Failure responding to request") 6096 } 6097 } 6098 return 6099} 6100 6101// ProxyDto base data transfer object implementation for proxy resources. 6102type ProxyDto struct { 6103 // ID - READ-ONLY; The resource id of the azure resource 6104 ID *string `json:"id,omitempty"` 6105 // Name - READ-ONLY; Name of the azure resource 6106 Name *string `json:"name,omitempty"` 6107 // Type - READ-ONLY; Type of the azure resource 6108 Type *string `json:"type,omitempty"` 6109} 6110 6111// MarshalJSON is the custom marshaler for ProxyDto. 6112func (pd ProxyDto) MarshalJSON() ([]byte, error) { 6113 objectMap := make(map[string]interface{}) 6114 return json.Marshal(objectMap) 6115} 6116 6117// ScheduledSourceShareSynchronizationSettingProperties a Scheduled source synchronization setting data 6118// transfer object. 6119type ScheduledSourceShareSynchronizationSettingProperties struct { 6120 // RecurrenceInterval - Recurrence Interval. Possible values include: 'Hour', 'Day' 6121 RecurrenceInterval RecurrenceInterval `json:"recurrenceInterval,omitempty"` 6122 // SynchronizationTime - Synchronization time 6123 SynchronizationTime *date.Time `json:"synchronizationTime,omitempty"` 6124} 6125 6126// ScheduledSourceSynchronizationSetting a type of synchronization setting based on schedule 6127type ScheduledSourceSynchronizationSetting struct { 6128 // ScheduledSourceShareSynchronizationSettingProperties - Properties of scheduled synchronization 6129 *ScheduledSourceShareSynchronizationSettingProperties `json:"properties,omitempty"` 6130 // Kind - Possible values include: 'KindSourceShareSynchronizationSetting', 'KindScheduleBased' 6131 Kind KindBasicSourceShareSynchronizationSetting `json:"kind,omitempty"` 6132} 6133 6134// MarshalJSON is the custom marshaler for ScheduledSourceSynchronizationSetting. 6135func (ssss ScheduledSourceSynchronizationSetting) MarshalJSON() ([]byte, error) { 6136 ssss.Kind = KindScheduleBased 6137 objectMap := make(map[string]interface{}) 6138 if ssss.ScheduledSourceShareSynchronizationSettingProperties != nil { 6139 objectMap["properties"] = ssss.ScheduledSourceShareSynchronizationSettingProperties 6140 } 6141 if ssss.Kind != "" { 6142 objectMap["kind"] = ssss.Kind 6143 } 6144 return json.Marshal(objectMap) 6145} 6146 6147// AsScheduledSourceSynchronizationSetting is the BasicSourceShareSynchronizationSetting implementation for ScheduledSourceSynchronizationSetting. 6148func (ssss ScheduledSourceSynchronizationSetting) AsScheduledSourceSynchronizationSetting() (*ScheduledSourceSynchronizationSetting, bool) { 6149 return &ssss, true 6150} 6151 6152// AsSourceShareSynchronizationSetting is the BasicSourceShareSynchronizationSetting implementation for ScheduledSourceSynchronizationSetting. 6153func (ssss ScheduledSourceSynchronizationSetting) AsSourceShareSynchronizationSetting() (*SourceShareSynchronizationSetting, bool) { 6154 return nil, false 6155} 6156 6157// AsBasicSourceShareSynchronizationSetting is the BasicSourceShareSynchronizationSetting implementation for ScheduledSourceSynchronizationSetting. 6158func (ssss ScheduledSourceSynchronizationSetting) AsBasicSourceShareSynchronizationSetting() (BasicSourceShareSynchronizationSetting, bool) { 6159 return &ssss, true 6160} 6161 6162// UnmarshalJSON is the custom unmarshaler for ScheduledSourceSynchronizationSetting struct. 6163func (ssss *ScheduledSourceSynchronizationSetting) UnmarshalJSON(body []byte) error { 6164 var m map[string]*json.RawMessage 6165 err := json.Unmarshal(body, &m) 6166 if err != nil { 6167 return err 6168 } 6169 for k, v := range m { 6170 switch k { 6171 case "properties": 6172 if v != nil { 6173 var scheduledSourceShareSynchronizationSettingProperties ScheduledSourceShareSynchronizationSettingProperties 6174 err = json.Unmarshal(*v, &scheduledSourceShareSynchronizationSettingProperties) 6175 if err != nil { 6176 return err 6177 } 6178 ssss.ScheduledSourceShareSynchronizationSettingProperties = &scheduledSourceShareSynchronizationSettingProperties 6179 } 6180 case "kind": 6181 if v != nil { 6182 var kind KindBasicSourceShareSynchronizationSetting 6183 err = json.Unmarshal(*v, &kind) 6184 if err != nil { 6185 return err 6186 } 6187 ssss.Kind = kind 6188 } 6189 } 6190 } 6191 6192 return nil 6193} 6194 6195// ScheduledSynchronizationSetting a type of synchronization setting based on schedule 6196type ScheduledSynchronizationSetting struct { 6197 // ScheduledSynchronizationSettingProperties - Properties of scheduled synchronization 6198 *ScheduledSynchronizationSettingProperties `json:"properties,omitempty"` 6199 // ID - READ-ONLY; The resource id of the azure resource 6200 ID *string `json:"id,omitempty"` 6201 // Name - READ-ONLY; Name of the azure resource 6202 Name *string `json:"name,omitempty"` 6203 // Type - READ-ONLY; Type of the azure resource 6204 Type *string `json:"type,omitempty"` 6205 // Kind - Possible values include: 'KindBasicSynchronizationSettingKindSynchronizationSetting', 'KindBasicSynchronizationSettingKindScheduleBased' 6206 Kind KindBasicSynchronizationSetting `json:"kind,omitempty"` 6207} 6208 6209// MarshalJSON is the custom marshaler for ScheduledSynchronizationSetting. 6210func (sss ScheduledSynchronizationSetting) MarshalJSON() ([]byte, error) { 6211 sss.Kind = KindBasicSynchronizationSettingKindScheduleBased 6212 objectMap := make(map[string]interface{}) 6213 if sss.ScheduledSynchronizationSettingProperties != nil { 6214 objectMap["properties"] = sss.ScheduledSynchronizationSettingProperties 6215 } 6216 if sss.Kind != "" { 6217 objectMap["kind"] = sss.Kind 6218 } 6219 return json.Marshal(objectMap) 6220} 6221 6222// AsScheduledSynchronizationSetting is the BasicSynchronizationSetting implementation for ScheduledSynchronizationSetting. 6223func (sss ScheduledSynchronizationSetting) AsScheduledSynchronizationSetting() (*ScheduledSynchronizationSetting, bool) { 6224 return &sss, true 6225} 6226 6227// AsSynchronizationSetting is the BasicSynchronizationSetting implementation for ScheduledSynchronizationSetting. 6228func (sss ScheduledSynchronizationSetting) AsSynchronizationSetting() (*SynchronizationSetting, bool) { 6229 return nil, false 6230} 6231 6232// AsBasicSynchronizationSetting is the BasicSynchronizationSetting implementation for ScheduledSynchronizationSetting. 6233func (sss ScheduledSynchronizationSetting) AsBasicSynchronizationSetting() (BasicSynchronizationSetting, bool) { 6234 return &sss, true 6235} 6236 6237// UnmarshalJSON is the custom unmarshaler for ScheduledSynchronizationSetting struct. 6238func (sss *ScheduledSynchronizationSetting) UnmarshalJSON(body []byte) error { 6239 var m map[string]*json.RawMessage 6240 err := json.Unmarshal(body, &m) 6241 if err != nil { 6242 return err 6243 } 6244 for k, v := range m { 6245 switch k { 6246 case "properties": 6247 if v != nil { 6248 var scheduledSynchronizationSettingProperties ScheduledSynchronizationSettingProperties 6249 err = json.Unmarshal(*v, &scheduledSynchronizationSettingProperties) 6250 if err != nil { 6251 return err 6252 } 6253 sss.ScheduledSynchronizationSettingProperties = &scheduledSynchronizationSettingProperties 6254 } 6255 case "kind": 6256 if v != nil { 6257 var kind KindBasicSynchronizationSetting 6258 err = json.Unmarshal(*v, &kind) 6259 if err != nil { 6260 return err 6261 } 6262 sss.Kind = kind 6263 } 6264 case "id": 6265 if v != nil { 6266 var ID string 6267 err = json.Unmarshal(*v, &ID) 6268 if err != nil { 6269 return err 6270 } 6271 sss.ID = &ID 6272 } 6273 case "name": 6274 if v != nil { 6275 var name string 6276 err = json.Unmarshal(*v, &name) 6277 if err != nil { 6278 return err 6279 } 6280 sss.Name = &name 6281 } 6282 case "type": 6283 if v != nil { 6284 var typeVar string 6285 err = json.Unmarshal(*v, &typeVar) 6286 if err != nil { 6287 return err 6288 } 6289 sss.Type = &typeVar 6290 } 6291 } 6292 } 6293 6294 return nil 6295} 6296 6297// ScheduledSynchronizationSettingProperties a Scheduled synchronization setting data transfer object. 6298type ScheduledSynchronizationSettingProperties struct { 6299 // CreatedAt - READ-ONLY; Time at which the synchronization setting was created. 6300 CreatedAt *date.Time `json:"createdAt,omitempty"` 6301 // ProvisioningState - READ-ONLY; Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 6302 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 6303 // RecurrenceInterval - Recurrence Interval. Possible values include: 'Hour', 'Day' 6304 RecurrenceInterval RecurrenceInterval `json:"recurrenceInterval,omitempty"` 6305 // SynchronizationTime - Synchronization time 6306 SynchronizationTime *date.Time `json:"synchronizationTime,omitempty"` 6307 // UserName - READ-ONLY; Name of the user who created the synchronization setting. 6308 UserName *string `json:"userName,omitempty"` 6309} 6310 6311// MarshalJSON is the custom marshaler for ScheduledSynchronizationSettingProperties. 6312func (sssp ScheduledSynchronizationSettingProperties) MarshalJSON() ([]byte, error) { 6313 objectMap := make(map[string]interface{}) 6314 if sssp.RecurrenceInterval != "" { 6315 objectMap["recurrenceInterval"] = sssp.RecurrenceInterval 6316 } 6317 if sssp.SynchronizationTime != nil { 6318 objectMap["synchronizationTime"] = sssp.SynchronizationTime 6319 } 6320 return json.Marshal(objectMap) 6321} 6322 6323// ScheduledTrigger a type of trigger based on schedule 6324type ScheduledTrigger struct { 6325 // ScheduledTriggerProperties - Properties of scheduled synchronization 6326 *ScheduledTriggerProperties `json:"properties,omitempty"` 6327 // ID - READ-ONLY; The resource id of the azure resource 6328 ID *string `json:"id,omitempty"` 6329 // Name - READ-ONLY; Name of the azure resource 6330 Name *string `json:"name,omitempty"` 6331 // Type - READ-ONLY; Type of the azure resource 6332 Type *string `json:"type,omitempty"` 6333 // Kind - Possible values include: 'KindBasicTriggerKindTrigger', 'KindBasicTriggerKindScheduleBased' 6334 Kind KindBasicTrigger `json:"kind,omitempty"` 6335} 6336 6337// MarshalJSON is the custom marshaler for ScheduledTrigger. 6338func (st ScheduledTrigger) MarshalJSON() ([]byte, error) { 6339 st.Kind = KindBasicTriggerKindScheduleBased 6340 objectMap := make(map[string]interface{}) 6341 if st.ScheduledTriggerProperties != nil { 6342 objectMap["properties"] = st.ScheduledTriggerProperties 6343 } 6344 if st.Kind != "" { 6345 objectMap["kind"] = st.Kind 6346 } 6347 return json.Marshal(objectMap) 6348} 6349 6350// AsScheduledTrigger is the BasicTrigger implementation for ScheduledTrigger. 6351func (st ScheduledTrigger) AsScheduledTrigger() (*ScheduledTrigger, bool) { 6352 return &st, true 6353} 6354 6355// AsTrigger is the BasicTrigger implementation for ScheduledTrigger. 6356func (st ScheduledTrigger) AsTrigger() (*Trigger, bool) { 6357 return nil, false 6358} 6359 6360// AsBasicTrigger is the BasicTrigger implementation for ScheduledTrigger. 6361func (st ScheduledTrigger) AsBasicTrigger() (BasicTrigger, bool) { 6362 return &st, true 6363} 6364 6365// UnmarshalJSON is the custom unmarshaler for ScheduledTrigger struct. 6366func (st *ScheduledTrigger) UnmarshalJSON(body []byte) error { 6367 var m map[string]*json.RawMessage 6368 err := json.Unmarshal(body, &m) 6369 if err != nil { 6370 return err 6371 } 6372 for k, v := range m { 6373 switch k { 6374 case "properties": 6375 if v != nil { 6376 var scheduledTriggerProperties ScheduledTriggerProperties 6377 err = json.Unmarshal(*v, &scheduledTriggerProperties) 6378 if err != nil { 6379 return err 6380 } 6381 st.ScheduledTriggerProperties = &scheduledTriggerProperties 6382 } 6383 case "kind": 6384 if v != nil { 6385 var kind KindBasicTrigger 6386 err = json.Unmarshal(*v, &kind) 6387 if err != nil { 6388 return err 6389 } 6390 st.Kind = kind 6391 } 6392 case "id": 6393 if v != nil { 6394 var ID string 6395 err = json.Unmarshal(*v, &ID) 6396 if err != nil { 6397 return err 6398 } 6399 st.ID = &ID 6400 } 6401 case "name": 6402 if v != nil { 6403 var name string 6404 err = json.Unmarshal(*v, &name) 6405 if err != nil { 6406 return err 6407 } 6408 st.Name = &name 6409 } 6410 case "type": 6411 if v != nil { 6412 var typeVar string 6413 err = json.Unmarshal(*v, &typeVar) 6414 if err != nil { 6415 return err 6416 } 6417 st.Type = &typeVar 6418 } 6419 } 6420 } 6421 6422 return nil 6423} 6424 6425// ScheduledTriggerProperties a Scheduled trigger data transfer object. 6426type ScheduledTriggerProperties struct { 6427 // CreatedAt - READ-ONLY; Time at which the trigger was created. 6428 CreatedAt *date.Time `json:"createdAt,omitempty"` 6429 // ProvisioningState - READ-ONLY; Gets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 6430 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 6431 // RecurrenceInterval - Recurrence Interval. Possible values include: 'Hour', 'Day' 6432 RecurrenceInterval RecurrenceInterval `json:"recurrenceInterval,omitempty"` 6433 // SynchronizationMode - Synchronization mode. Possible values include: 'Incremental', 'FullSync' 6434 SynchronizationMode SynchronizationMode `json:"synchronizationMode,omitempty"` 6435 // SynchronizationTime - Synchronization time 6436 SynchronizationTime *date.Time `json:"synchronizationTime,omitempty"` 6437 // TriggerStatus - READ-ONLY; Gets the trigger state. Possible values include: 'TriggerStatusActive', 'TriggerStatusInactive', 'TriggerStatusSourceSynchronizationSettingDeleted' 6438 TriggerStatus TriggerStatus `json:"triggerStatus,omitempty"` 6439 // UserName - READ-ONLY; Name of the user who created the trigger. 6440 UserName *string `json:"userName,omitempty"` 6441} 6442 6443// MarshalJSON is the custom marshaler for ScheduledTriggerProperties. 6444func (stp ScheduledTriggerProperties) MarshalJSON() ([]byte, error) { 6445 objectMap := make(map[string]interface{}) 6446 if stp.RecurrenceInterval != "" { 6447 objectMap["recurrenceInterval"] = stp.RecurrenceInterval 6448 } 6449 if stp.SynchronizationMode != "" { 6450 objectMap["synchronizationMode"] = stp.SynchronizationMode 6451 } 6452 if stp.SynchronizationTime != nil { 6453 objectMap["synchronizationTime"] = stp.SynchronizationTime 6454 } 6455 return json.Marshal(objectMap) 6456} 6457 6458// Share a share data transfer object. 6459type Share struct { 6460 autorest.Response `json:"-"` 6461 // ShareProperties - Properties on the share 6462 *ShareProperties `json:"properties,omitempty"` 6463 // ID - READ-ONLY; The resource id of the azure resource 6464 ID *string `json:"id,omitempty"` 6465 // Name - READ-ONLY; Name of the azure resource 6466 Name *string `json:"name,omitempty"` 6467 // Type - READ-ONLY; Type of the azure resource 6468 Type *string `json:"type,omitempty"` 6469} 6470 6471// MarshalJSON is the custom marshaler for Share. 6472func (s Share) MarshalJSON() ([]byte, error) { 6473 objectMap := make(map[string]interface{}) 6474 if s.ShareProperties != nil { 6475 objectMap["properties"] = s.ShareProperties 6476 } 6477 return json.Marshal(objectMap) 6478} 6479 6480// UnmarshalJSON is the custom unmarshaler for Share struct. 6481func (s *Share) UnmarshalJSON(body []byte) error { 6482 var m map[string]*json.RawMessage 6483 err := json.Unmarshal(body, &m) 6484 if err != nil { 6485 return err 6486 } 6487 for k, v := range m { 6488 switch k { 6489 case "properties": 6490 if v != nil { 6491 var shareProperties ShareProperties 6492 err = json.Unmarshal(*v, &shareProperties) 6493 if err != nil { 6494 return err 6495 } 6496 s.ShareProperties = &shareProperties 6497 } 6498 case "id": 6499 if v != nil { 6500 var ID string 6501 err = json.Unmarshal(*v, &ID) 6502 if err != nil { 6503 return err 6504 } 6505 s.ID = &ID 6506 } 6507 case "name": 6508 if v != nil { 6509 var name string 6510 err = json.Unmarshal(*v, &name) 6511 if err != nil { 6512 return err 6513 } 6514 s.Name = &name 6515 } 6516 case "type": 6517 if v != nil { 6518 var typeVar string 6519 err = json.Unmarshal(*v, &typeVar) 6520 if err != nil { 6521 return err 6522 } 6523 s.Type = &typeVar 6524 } 6525 } 6526 } 6527 6528 return nil 6529} 6530 6531// ShareList list response for get Shares. 6532type ShareList struct { 6533 autorest.Response `json:"-"` 6534 // NextLink - The Url of next result page. 6535 NextLink *string `json:"nextLink,omitempty"` 6536 // Value - Collection of items of type DataTransferObjects. 6537 Value *[]Share `json:"value,omitempty"` 6538} 6539 6540// ShareListIterator provides access to a complete listing of Share values. 6541type ShareListIterator struct { 6542 i int 6543 page ShareListPage 6544} 6545 6546// NextWithContext advances to the next value. If there was an error making 6547// the request the iterator does not advance and the error is returned. 6548func (iter *ShareListIterator) NextWithContext(ctx context.Context) (err error) { 6549 if tracing.IsEnabled() { 6550 ctx = tracing.StartSpan(ctx, fqdn+"/ShareListIterator.NextWithContext") 6551 defer func() { 6552 sc := -1 6553 if iter.Response().Response.Response != nil { 6554 sc = iter.Response().Response.Response.StatusCode 6555 } 6556 tracing.EndSpan(ctx, sc, err) 6557 }() 6558 } 6559 iter.i++ 6560 if iter.i < len(iter.page.Values()) { 6561 return nil 6562 } 6563 err = iter.page.NextWithContext(ctx) 6564 if err != nil { 6565 iter.i-- 6566 return err 6567 } 6568 iter.i = 0 6569 return nil 6570} 6571 6572// Next advances to the next value. If there was an error making 6573// the request the iterator does not advance and the error is returned. 6574// Deprecated: Use NextWithContext() instead. 6575func (iter *ShareListIterator) Next() error { 6576 return iter.NextWithContext(context.Background()) 6577} 6578 6579// NotDone returns true if the enumeration should be started or is not yet complete. 6580func (iter ShareListIterator) NotDone() bool { 6581 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6582} 6583 6584// Response returns the raw server response from the last page request. 6585func (iter ShareListIterator) Response() ShareList { 6586 return iter.page.Response() 6587} 6588 6589// Value returns the current value or a zero-initialized value if the 6590// iterator has advanced beyond the end of the collection. 6591func (iter ShareListIterator) Value() Share { 6592 if !iter.page.NotDone() { 6593 return Share{} 6594 } 6595 return iter.page.Values()[iter.i] 6596} 6597 6598// Creates a new instance of the ShareListIterator type. 6599func NewShareListIterator(page ShareListPage) ShareListIterator { 6600 return ShareListIterator{page: page} 6601} 6602 6603// IsEmpty returns true if the ListResult contains no values. 6604func (sl ShareList) IsEmpty() bool { 6605 return sl.Value == nil || len(*sl.Value) == 0 6606} 6607 6608// hasNextLink returns true if the NextLink is not empty. 6609func (sl ShareList) hasNextLink() bool { 6610 return sl.NextLink != nil && len(*sl.NextLink) != 0 6611} 6612 6613// shareListPreparer prepares a request to retrieve the next set of results. 6614// It returns nil if no more results exist. 6615func (sl ShareList) shareListPreparer(ctx context.Context) (*http.Request, error) { 6616 if !sl.hasNextLink() { 6617 return nil, nil 6618 } 6619 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6620 autorest.AsJSON(), 6621 autorest.AsGet(), 6622 autorest.WithBaseURL(to.String(sl.NextLink))) 6623} 6624 6625// ShareListPage contains a page of Share values. 6626type ShareListPage struct { 6627 fn func(context.Context, ShareList) (ShareList, error) 6628 sl ShareList 6629} 6630 6631// NextWithContext advances to the next page of values. If there was an error making 6632// the request the page does not advance and the error is returned. 6633func (page *ShareListPage) NextWithContext(ctx context.Context) (err error) { 6634 if tracing.IsEnabled() { 6635 ctx = tracing.StartSpan(ctx, fqdn+"/ShareListPage.NextWithContext") 6636 defer func() { 6637 sc := -1 6638 if page.Response().Response.Response != nil { 6639 sc = page.Response().Response.Response.StatusCode 6640 } 6641 tracing.EndSpan(ctx, sc, err) 6642 }() 6643 } 6644 for { 6645 next, err := page.fn(ctx, page.sl) 6646 if err != nil { 6647 return err 6648 } 6649 page.sl = next 6650 if !next.hasNextLink() || !next.IsEmpty() { 6651 break 6652 } 6653 } 6654 return nil 6655} 6656 6657// Next advances to the next page of values. If there was an error making 6658// the request the page does not advance and the error is returned. 6659// Deprecated: Use NextWithContext() instead. 6660func (page *ShareListPage) Next() error { 6661 return page.NextWithContext(context.Background()) 6662} 6663 6664// NotDone returns true if the page enumeration should be started or is not yet complete. 6665func (page ShareListPage) NotDone() bool { 6666 return !page.sl.IsEmpty() 6667} 6668 6669// Response returns the raw server response from the last page request. 6670func (page ShareListPage) Response() ShareList { 6671 return page.sl 6672} 6673 6674// Values returns the slice of values for the current page or nil if there are no values. 6675func (page ShareListPage) Values() []Share { 6676 if page.sl.IsEmpty() { 6677 return nil 6678 } 6679 return *page.sl.Value 6680} 6681 6682// Creates a new instance of the ShareListPage type. 6683func NewShareListPage(cur ShareList, getNextPage func(context.Context, ShareList) (ShareList, error)) ShareListPage { 6684 return ShareListPage{ 6685 fn: getNextPage, 6686 sl: cur, 6687 } 6688} 6689 6690// ShareProperties share property bag. 6691type ShareProperties struct { 6692 // CreatedAt - READ-ONLY; Time at which the share was created. 6693 CreatedAt *date.Time `json:"createdAt,omitempty"` 6694 // Description - Share description. 6695 Description *string `json:"description,omitempty"` 6696 // ProvisioningState - READ-ONLY; Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 6697 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 6698 // ShareKind - Share kind. Possible values include: 'CopyBased', 'InPlace' 6699 ShareKind ShareKind `json:"shareKind,omitempty"` 6700 // Terms - Share terms. 6701 Terms *string `json:"terms,omitempty"` 6702 // UserEmail - READ-ONLY; Email of the user who created the resource 6703 UserEmail *string `json:"userEmail,omitempty"` 6704 // UserName - READ-ONLY; Name of the user who created the resource 6705 UserName *string `json:"userName,omitempty"` 6706} 6707 6708// MarshalJSON is the custom marshaler for ShareProperties. 6709func (sp ShareProperties) MarshalJSON() ([]byte, error) { 6710 objectMap := make(map[string]interface{}) 6711 if sp.Description != nil { 6712 objectMap["description"] = sp.Description 6713 } 6714 if sp.ShareKind != "" { 6715 objectMap["shareKind"] = sp.ShareKind 6716 } 6717 if sp.Terms != nil { 6718 objectMap["terms"] = sp.Terms 6719 } 6720 return json.Marshal(objectMap) 6721} 6722 6723// SharesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 6724type SharesDeleteFuture struct { 6725 azure.FutureAPI 6726 // Result returns the result of the asynchronous operation. 6727 // If the operation has not completed it will return an error. 6728 Result func(SharesClient) (OperationResponse, error) 6729} 6730 6731// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6732func (future *SharesDeleteFuture) UnmarshalJSON(body []byte) error { 6733 var azFuture azure.Future 6734 if err := json.Unmarshal(body, &azFuture); err != nil { 6735 return err 6736 } 6737 future.FutureAPI = &azFuture 6738 future.Result = future.result 6739 return nil 6740} 6741 6742// result is the default implementation for SharesDeleteFuture.Result. 6743func (future *SharesDeleteFuture) result(client SharesClient) (or OperationResponse, err error) { 6744 var done bool 6745 done, err = future.DoneWithContext(context.Background(), client) 6746 if err != nil { 6747 err = autorest.NewErrorWithError(err, "datashare.SharesDeleteFuture", "Result", future.Response(), "Polling failure") 6748 return 6749 } 6750 if !done { 6751 or.Response.Response = future.Response() 6752 err = azure.NewAsyncOpIncompleteError("datashare.SharesDeleteFuture") 6753 return 6754 } 6755 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6756 if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { 6757 or, err = client.DeleteResponder(or.Response.Response) 6758 if err != nil { 6759 err = autorest.NewErrorWithError(err, "datashare.SharesDeleteFuture", "Result", or.Response.Response, "Failure responding to request") 6760 } 6761 } 6762 return 6763} 6764 6765// ShareSubscription a share subscription data transfer object. 6766type ShareSubscription struct { 6767 autorest.Response `json:"-"` 6768 // ShareSubscriptionProperties - Properties on the share subscription 6769 *ShareSubscriptionProperties `json:"properties,omitempty"` 6770 // ID - READ-ONLY; The resource id of the azure resource 6771 ID *string `json:"id,omitempty"` 6772 // Name - READ-ONLY; Name of the azure resource 6773 Name *string `json:"name,omitempty"` 6774 // Type - READ-ONLY; Type of the azure resource 6775 Type *string `json:"type,omitempty"` 6776} 6777 6778// MarshalJSON is the custom marshaler for ShareSubscription. 6779func (ss ShareSubscription) MarshalJSON() ([]byte, error) { 6780 objectMap := make(map[string]interface{}) 6781 if ss.ShareSubscriptionProperties != nil { 6782 objectMap["properties"] = ss.ShareSubscriptionProperties 6783 } 6784 return json.Marshal(objectMap) 6785} 6786 6787// UnmarshalJSON is the custom unmarshaler for ShareSubscription struct. 6788func (ss *ShareSubscription) UnmarshalJSON(body []byte) error { 6789 var m map[string]*json.RawMessage 6790 err := json.Unmarshal(body, &m) 6791 if err != nil { 6792 return err 6793 } 6794 for k, v := range m { 6795 switch k { 6796 case "properties": 6797 if v != nil { 6798 var shareSubscriptionProperties ShareSubscriptionProperties 6799 err = json.Unmarshal(*v, &shareSubscriptionProperties) 6800 if err != nil { 6801 return err 6802 } 6803 ss.ShareSubscriptionProperties = &shareSubscriptionProperties 6804 } 6805 case "id": 6806 if v != nil { 6807 var ID string 6808 err = json.Unmarshal(*v, &ID) 6809 if err != nil { 6810 return err 6811 } 6812 ss.ID = &ID 6813 } 6814 case "name": 6815 if v != nil { 6816 var name string 6817 err = json.Unmarshal(*v, &name) 6818 if err != nil { 6819 return err 6820 } 6821 ss.Name = &name 6822 } 6823 case "type": 6824 if v != nil { 6825 var typeVar string 6826 err = json.Unmarshal(*v, &typeVar) 6827 if err != nil { 6828 return err 6829 } 6830 ss.Type = &typeVar 6831 } 6832 } 6833 } 6834 6835 return nil 6836} 6837 6838// ShareSubscriptionList list response for get ShareSubscription. 6839type ShareSubscriptionList struct { 6840 autorest.Response `json:"-"` 6841 // NextLink - The Url of next result page. 6842 NextLink *string `json:"nextLink,omitempty"` 6843 // Value - Collection of items of type DataTransferObjects. 6844 Value *[]ShareSubscription `json:"value,omitempty"` 6845} 6846 6847// ShareSubscriptionListIterator provides access to a complete listing of ShareSubscription values. 6848type ShareSubscriptionListIterator struct { 6849 i int 6850 page ShareSubscriptionListPage 6851} 6852 6853// NextWithContext advances to the next value. If there was an error making 6854// the request the iterator does not advance and the error is returned. 6855func (iter *ShareSubscriptionListIterator) NextWithContext(ctx context.Context) (err error) { 6856 if tracing.IsEnabled() { 6857 ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionListIterator.NextWithContext") 6858 defer func() { 6859 sc := -1 6860 if iter.Response().Response.Response != nil { 6861 sc = iter.Response().Response.Response.StatusCode 6862 } 6863 tracing.EndSpan(ctx, sc, err) 6864 }() 6865 } 6866 iter.i++ 6867 if iter.i < len(iter.page.Values()) { 6868 return nil 6869 } 6870 err = iter.page.NextWithContext(ctx) 6871 if err != nil { 6872 iter.i-- 6873 return err 6874 } 6875 iter.i = 0 6876 return nil 6877} 6878 6879// Next advances to the next value. If there was an error making 6880// the request the iterator does not advance and the error is returned. 6881// Deprecated: Use NextWithContext() instead. 6882func (iter *ShareSubscriptionListIterator) Next() error { 6883 return iter.NextWithContext(context.Background()) 6884} 6885 6886// NotDone returns true if the enumeration should be started or is not yet complete. 6887func (iter ShareSubscriptionListIterator) NotDone() bool { 6888 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6889} 6890 6891// Response returns the raw server response from the last page request. 6892func (iter ShareSubscriptionListIterator) Response() ShareSubscriptionList { 6893 return iter.page.Response() 6894} 6895 6896// Value returns the current value or a zero-initialized value if the 6897// iterator has advanced beyond the end of the collection. 6898func (iter ShareSubscriptionListIterator) Value() ShareSubscription { 6899 if !iter.page.NotDone() { 6900 return ShareSubscription{} 6901 } 6902 return iter.page.Values()[iter.i] 6903} 6904 6905// Creates a new instance of the ShareSubscriptionListIterator type. 6906func NewShareSubscriptionListIterator(page ShareSubscriptionListPage) ShareSubscriptionListIterator { 6907 return ShareSubscriptionListIterator{page: page} 6908} 6909 6910// IsEmpty returns true if the ListResult contains no values. 6911func (ssl ShareSubscriptionList) IsEmpty() bool { 6912 return ssl.Value == nil || len(*ssl.Value) == 0 6913} 6914 6915// hasNextLink returns true if the NextLink is not empty. 6916func (ssl ShareSubscriptionList) hasNextLink() bool { 6917 return ssl.NextLink != nil && len(*ssl.NextLink) != 0 6918} 6919 6920// shareSubscriptionListPreparer prepares a request to retrieve the next set of results. 6921// It returns nil if no more results exist. 6922func (ssl ShareSubscriptionList) shareSubscriptionListPreparer(ctx context.Context) (*http.Request, error) { 6923 if !ssl.hasNextLink() { 6924 return nil, nil 6925 } 6926 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6927 autorest.AsJSON(), 6928 autorest.AsGet(), 6929 autorest.WithBaseURL(to.String(ssl.NextLink))) 6930} 6931 6932// ShareSubscriptionListPage contains a page of ShareSubscription values. 6933type ShareSubscriptionListPage struct { 6934 fn func(context.Context, ShareSubscriptionList) (ShareSubscriptionList, error) 6935 ssl ShareSubscriptionList 6936} 6937 6938// NextWithContext advances to the next page of values. If there was an error making 6939// the request the page does not advance and the error is returned. 6940func (page *ShareSubscriptionListPage) NextWithContext(ctx context.Context) (err error) { 6941 if tracing.IsEnabled() { 6942 ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionListPage.NextWithContext") 6943 defer func() { 6944 sc := -1 6945 if page.Response().Response.Response != nil { 6946 sc = page.Response().Response.Response.StatusCode 6947 } 6948 tracing.EndSpan(ctx, sc, err) 6949 }() 6950 } 6951 for { 6952 next, err := page.fn(ctx, page.ssl) 6953 if err != nil { 6954 return err 6955 } 6956 page.ssl = next 6957 if !next.hasNextLink() || !next.IsEmpty() { 6958 break 6959 } 6960 } 6961 return nil 6962} 6963 6964// Next advances to the next page of values. If there was an error making 6965// the request the page does not advance and the error is returned. 6966// Deprecated: Use NextWithContext() instead. 6967func (page *ShareSubscriptionListPage) Next() error { 6968 return page.NextWithContext(context.Background()) 6969} 6970 6971// NotDone returns true if the page enumeration should be started or is not yet complete. 6972func (page ShareSubscriptionListPage) NotDone() bool { 6973 return !page.ssl.IsEmpty() 6974} 6975 6976// Response returns the raw server response from the last page request. 6977func (page ShareSubscriptionListPage) Response() ShareSubscriptionList { 6978 return page.ssl 6979} 6980 6981// Values returns the slice of values for the current page or nil if there are no values. 6982func (page ShareSubscriptionListPage) Values() []ShareSubscription { 6983 if page.ssl.IsEmpty() { 6984 return nil 6985 } 6986 return *page.ssl.Value 6987} 6988 6989// Creates a new instance of the ShareSubscriptionListPage type. 6990func NewShareSubscriptionListPage(cur ShareSubscriptionList, getNextPage func(context.Context, ShareSubscriptionList) (ShareSubscriptionList, error)) ShareSubscriptionListPage { 6991 return ShareSubscriptionListPage{ 6992 fn: getNextPage, 6993 ssl: cur, 6994 } 6995} 6996 6997// ShareSubscriptionProperties share subscription property bag. 6998type ShareSubscriptionProperties struct { 6999 // CreatedAt - READ-ONLY; Time at which the share subscription was created. 7000 CreatedAt *date.Time `json:"createdAt,omitempty"` 7001 // InvitationID - The invitation id. 7002 InvitationID *string `json:"invitationId,omitempty"` 7003 // ProviderEmail - READ-ONLY; Email of the provider who created the resource 7004 ProviderEmail *string `json:"providerEmail,omitempty"` 7005 // ProviderName - READ-ONLY; Name of the provider who created the resource 7006 ProviderName *string `json:"providerName,omitempty"` 7007 // ProviderTenantName - READ-ONLY; Tenant name of the provider who created the resource 7008 ProviderTenantName *string `json:"providerTenantName,omitempty"` 7009 // ProvisioningState - READ-ONLY; Provisioning state of the share subscription. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 7010 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 7011 // ShareDescription - READ-ONLY; Description of share 7012 ShareDescription *string `json:"shareDescription,omitempty"` 7013 // ShareKind - READ-ONLY; Kind of share. Possible values include: 'CopyBased', 'InPlace' 7014 ShareKind ShareKind `json:"shareKind,omitempty"` 7015 // ShareName - READ-ONLY; Name of the share 7016 ShareName *string `json:"shareName,omitempty"` 7017 // ShareSubscriptionStatus - READ-ONLY; Gets the current status of share subscription. Possible values include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking' 7018 ShareSubscriptionStatus ShareSubscriptionStatus `json:"shareSubscriptionStatus,omitempty"` 7019 // ShareTerms - READ-ONLY; Terms of a share 7020 ShareTerms *string `json:"shareTerms,omitempty"` 7021 // UserEmail - READ-ONLY; Email of the user who created the resource 7022 UserEmail *string `json:"userEmail,omitempty"` 7023 // UserName - READ-ONLY; Name of the user who created the resource 7024 UserName *string `json:"userName,omitempty"` 7025} 7026 7027// MarshalJSON is the custom marshaler for ShareSubscriptionProperties. 7028func (ssp ShareSubscriptionProperties) MarshalJSON() ([]byte, error) { 7029 objectMap := make(map[string]interface{}) 7030 if ssp.InvitationID != nil { 7031 objectMap["invitationId"] = ssp.InvitationID 7032 } 7033 return json.Marshal(objectMap) 7034} 7035 7036// ShareSubscriptionsCancelSynchronizationFuture an abstraction for monitoring and retrieving the results 7037// of a long-running operation. 7038type ShareSubscriptionsCancelSynchronizationFuture struct { 7039 azure.FutureAPI 7040 // Result returns the result of the asynchronous operation. 7041 // If the operation has not completed it will return an error. 7042 Result func(ShareSubscriptionsClient) (ShareSubscriptionSynchronization, error) 7043} 7044 7045// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7046func (future *ShareSubscriptionsCancelSynchronizationFuture) UnmarshalJSON(body []byte) error { 7047 var azFuture azure.Future 7048 if err := json.Unmarshal(body, &azFuture); err != nil { 7049 return err 7050 } 7051 future.FutureAPI = &azFuture 7052 future.Result = future.result 7053 return nil 7054} 7055 7056// result is the default implementation for ShareSubscriptionsCancelSynchronizationFuture.Result. 7057func (future *ShareSubscriptionsCancelSynchronizationFuture) result(client ShareSubscriptionsClient) (sss ShareSubscriptionSynchronization, err error) { 7058 var done bool 7059 done, err = future.DoneWithContext(context.Background(), client) 7060 if err != nil { 7061 err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsCancelSynchronizationFuture", "Result", future.Response(), "Polling failure") 7062 return 7063 } 7064 if !done { 7065 sss.Response.Response = future.Response() 7066 err = azure.NewAsyncOpIncompleteError("datashare.ShareSubscriptionsCancelSynchronizationFuture") 7067 return 7068 } 7069 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7070 if sss.Response.Response, err = future.GetResult(sender); err == nil && sss.Response.Response.StatusCode != http.StatusNoContent { 7071 sss, err = client.CancelSynchronizationResponder(sss.Response.Response) 7072 if err != nil { 7073 err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsCancelSynchronizationFuture", "Result", sss.Response.Response, "Failure responding to request") 7074 } 7075 } 7076 return 7077} 7078 7079// ShareSubscriptionsDeleteFuture an abstraction for monitoring and retrieving the results of a 7080// long-running operation. 7081type ShareSubscriptionsDeleteFuture struct { 7082 azure.FutureAPI 7083 // Result returns the result of the asynchronous operation. 7084 // If the operation has not completed it will return an error. 7085 Result func(ShareSubscriptionsClient) (OperationResponse, error) 7086} 7087 7088// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7089func (future *ShareSubscriptionsDeleteFuture) UnmarshalJSON(body []byte) error { 7090 var azFuture azure.Future 7091 if err := json.Unmarshal(body, &azFuture); err != nil { 7092 return err 7093 } 7094 future.FutureAPI = &azFuture 7095 future.Result = future.result 7096 return nil 7097} 7098 7099// result is the default implementation for ShareSubscriptionsDeleteFuture.Result. 7100func (future *ShareSubscriptionsDeleteFuture) result(client ShareSubscriptionsClient) (or OperationResponse, err error) { 7101 var done bool 7102 done, err = future.DoneWithContext(context.Background(), client) 7103 if err != nil { 7104 err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsDeleteFuture", "Result", future.Response(), "Polling failure") 7105 return 7106 } 7107 if !done { 7108 or.Response.Response = future.Response() 7109 err = azure.NewAsyncOpIncompleteError("datashare.ShareSubscriptionsDeleteFuture") 7110 return 7111 } 7112 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7113 if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { 7114 or, err = client.DeleteResponder(or.Response.Response) 7115 if err != nil { 7116 err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsDeleteFuture", "Result", or.Response.Response, "Failure responding to request") 7117 } 7118 } 7119 return 7120} 7121 7122// ShareSubscriptionsSynchronizeMethodFuture an abstraction for monitoring and retrieving the results of a 7123// long-running operation. 7124type ShareSubscriptionsSynchronizeMethodFuture struct { 7125 azure.FutureAPI 7126 // Result returns the result of the asynchronous operation. 7127 // If the operation has not completed it will return an error. 7128 Result func(ShareSubscriptionsClient) (ShareSubscriptionSynchronization, error) 7129} 7130 7131// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7132func (future *ShareSubscriptionsSynchronizeMethodFuture) UnmarshalJSON(body []byte) error { 7133 var azFuture azure.Future 7134 if err := json.Unmarshal(body, &azFuture); err != nil { 7135 return err 7136 } 7137 future.FutureAPI = &azFuture 7138 future.Result = future.result 7139 return nil 7140} 7141 7142// result is the default implementation for ShareSubscriptionsSynchronizeMethodFuture.Result. 7143func (future *ShareSubscriptionsSynchronizeMethodFuture) result(client ShareSubscriptionsClient) (sss ShareSubscriptionSynchronization, err error) { 7144 var done bool 7145 done, err = future.DoneWithContext(context.Background(), client) 7146 if err != nil { 7147 err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsSynchronizeMethodFuture", "Result", future.Response(), "Polling failure") 7148 return 7149 } 7150 if !done { 7151 sss.Response.Response = future.Response() 7152 err = azure.NewAsyncOpIncompleteError("datashare.ShareSubscriptionsSynchronizeMethodFuture") 7153 return 7154 } 7155 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7156 if sss.Response.Response, err = future.GetResult(sender); err == nil && sss.Response.Response.StatusCode != http.StatusNoContent { 7157 sss, err = client.SynchronizeMethodResponder(sss.Response.Response) 7158 if err != nil { 7159 err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsSynchronizeMethodFuture", "Result", sss.Response.Response, "Failure responding to request") 7160 } 7161 } 7162 return 7163} 7164 7165// ShareSubscriptionSynchronization a ShareSubscriptionSynchronization data transfer object. 7166type ShareSubscriptionSynchronization struct { 7167 autorest.Response `json:"-"` 7168 // DurationMs - READ-ONLY; Synchronization duration 7169 DurationMs *int32 `json:"durationMs,omitempty"` 7170 // EndTime - READ-ONLY; End time of synchronization 7171 EndTime *date.Time `json:"endTime,omitempty"` 7172 // Message - READ-ONLY; message of Synchronization 7173 Message *string `json:"message,omitempty"` 7174 // StartTime - READ-ONLY; start time of synchronization 7175 StartTime *date.Time `json:"startTime,omitempty"` 7176 // Status - READ-ONLY; Raw Status 7177 Status *string `json:"status,omitempty"` 7178 // SynchronizationID - Synchronization id 7179 SynchronizationID *string `json:"synchronizationId,omitempty"` 7180 // SynchronizationMode - READ-ONLY; Synchronization Mode. Possible values include: 'Incremental', 'FullSync' 7181 SynchronizationMode SynchronizationMode `json:"synchronizationMode,omitempty"` 7182} 7183 7184// MarshalJSON is the custom marshaler for ShareSubscriptionSynchronization. 7185func (sss ShareSubscriptionSynchronization) MarshalJSON() ([]byte, error) { 7186 objectMap := make(map[string]interface{}) 7187 if sss.SynchronizationID != nil { 7188 objectMap["synchronizationId"] = sss.SynchronizationID 7189 } 7190 return json.Marshal(objectMap) 7191} 7192 7193// ShareSubscriptionSynchronizationList a consumer side list of share subscription synchronizations 7194type ShareSubscriptionSynchronizationList struct { 7195 autorest.Response `json:"-"` 7196 // NextLink - The Url of next result page. 7197 NextLink *string `json:"nextLink,omitempty"` 7198 // Value - Collection of items of type DataTransferObjects. 7199 Value *[]ShareSubscriptionSynchronization `json:"value,omitempty"` 7200} 7201 7202// ShareSubscriptionSynchronizationListIterator provides access to a complete listing of 7203// ShareSubscriptionSynchronization values. 7204type ShareSubscriptionSynchronizationListIterator struct { 7205 i int 7206 page ShareSubscriptionSynchronizationListPage 7207} 7208 7209// NextWithContext advances to the next value. If there was an error making 7210// the request the iterator does not advance and the error is returned. 7211func (iter *ShareSubscriptionSynchronizationListIterator) NextWithContext(ctx context.Context) (err error) { 7212 if tracing.IsEnabled() { 7213 ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionSynchronizationListIterator.NextWithContext") 7214 defer func() { 7215 sc := -1 7216 if iter.Response().Response.Response != nil { 7217 sc = iter.Response().Response.Response.StatusCode 7218 } 7219 tracing.EndSpan(ctx, sc, err) 7220 }() 7221 } 7222 iter.i++ 7223 if iter.i < len(iter.page.Values()) { 7224 return nil 7225 } 7226 err = iter.page.NextWithContext(ctx) 7227 if err != nil { 7228 iter.i-- 7229 return err 7230 } 7231 iter.i = 0 7232 return nil 7233} 7234 7235// Next advances to the next value. If there was an error making 7236// the request the iterator does not advance and the error is returned. 7237// Deprecated: Use NextWithContext() instead. 7238func (iter *ShareSubscriptionSynchronizationListIterator) Next() error { 7239 return iter.NextWithContext(context.Background()) 7240} 7241 7242// NotDone returns true if the enumeration should be started or is not yet complete. 7243func (iter ShareSubscriptionSynchronizationListIterator) NotDone() bool { 7244 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7245} 7246 7247// Response returns the raw server response from the last page request. 7248func (iter ShareSubscriptionSynchronizationListIterator) Response() ShareSubscriptionSynchronizationList { 7249 return iter.page.Response() 7250} 7251 7252// Value returns the current value or a zero-initialized value if the 7253// iterator has advanced beyond the end of the collection. 7254func (iter ShareSubscriptionSynchronizationListIterator) Value() ShareSubscriptionSynchronization { 7255 if !iter.page.NotDone() { 7256 return ShareSubscriptionSynchronization{} 7257 } 7258 return iter.page.Values()[iter.i] 7259} 7260 7261// Creates a new instance of the ShareSubscriptionSynchronizationListIterator type. 7262func NewShareSubscriptionSynchronizationListIterator(page ShareSubscriptionSynchronizationListPage) ShareSubscriptionSynchronizationListIterator { 7263 return ShareSubscriptionSynchronizationListIterator{page: page} 7264} 7265 7266// IsEmpty returns true if the ListResult contains no values. 7267func (sssl ShareSubscriptionSynchronizationList) IsEmpty() bool { 7268 return sssl.Value == nil || len(*sssl.Value) == 0 7269} 7270 7271// hasNextLink returns true if the NextLink is not empty. 7272func (sssl ShareSubscriptionSynchronizationList) hasNextLink() bool { 7273 return sssl.NextLink != nil && len(*sssl.NextLink) != 0 7274} 7275 7276// shareSubscriptionSynchronizationListPreparer prepares a request to retrieve the next set of results. 7277// It returns nil if no more results exist. 7278func (sssl ShareSubscriptionSynchronizationList) shareSubscriptionSynchronizationListPreparer(ctx context.Context) (*http.Request, error) { 7279 if !sssl.hasNextLink() { 7280 return nil, nil 7281 } 7282 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7283 autorest.AsJSON(), 7284 autorest.AsGet(), 7285 autorest.WithBaseURL(to.String(sssl.NextLink))) 7286} 7287 7288// ShareSubscriptionSynchronizationListPage contains a page of ShareSubscriptionSynchronization values. 7289type ShareSubscriptionSynchronizationListPage struct { 7290 fn func(context.Context, ShareSubscriptionSynchronizationList) (ShareSubscriptionSynchronizationList, error) 7291 sssl ShareSubscriptionSynchronizationList 7292} 7293 7294// NextWithContext advances to the next page of values. If there was an error making 7295// the request the page does not advance and the error is returned. 7296func (page *ShareSubscriptionSynchronizationListPage) NextWithContext(ctx context.Context) (err error) { 7297 if tracing.IsEnabled() { 7298 ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionSynchronizationListPage.NextWithContext") 7299 defer func() { 7300 sc := -1 7301 if page.Response().Response.Response != nil { 7302 sc = page.Response().Response.Response.StatusCode 7303 } 7304 tracing.EndSpan(ctx, sc, err) 7305 }() 7306 } 7307 for { 7308 next, err := page.fn(ctx, page.sssl) 7309 if err != nil { 7310 return err 7311 } 7312 page.sssl = next 7313 if !next.hasNextLink() || !next.IsEmpty() { 7314 break 7315 } 7316 } 7317 return nil 7318} 7319 7320// Next advances to the next page of values. If there was an error making 7321// the request the page does not advance and the error is returned. 7322// Deprecated: Use NextWithContext() instead. 7323func (page *ShareSubscriptionSynchronizationListPage) Next() error { 7324 return page.NextWithContext(context.Background()) 7325} 7326 7327// NotDone returns true if the page enumeration should be started or is not yet complete. 7328func (page ShareSubscriptionSynchronizationListPage) NotDone() bool { 7329 return !page.sssl.IsEmpty() 7330} 7331 7332// Response returns the raw server response from the last page request. 7333func (page ShareSubscriptionSynchronizationListPage) Response() ShareSubscriptionSynchronizationList { 7334 return page.sssl 7335} 7336 7337// Values returns the slice of values for the current page or nil if there are no values. 7338func (page ShareSubscriptionSynchronizationListPage) Values() []ShareSubscriptionSynchronization { 7339 if page.sssl.IsEmpty() { 7340 return nil 7341 } 7342 return *page.sssl.Value 7343} 7344 7345// Creates a new instance of the ShareSubscriptionSynchronizationListPage type. 7346func NewShareSubscriptionSynchronizationListPage(cur ShareSubscriptionSynchronizationList, getNextPage func(context.Context, ShareSubscriptionSynchronizationList) (ShareSubscriptionSynchronizationList, error)) ShareSubscriptionSynchronizationListPage { 7347 return ShareSubscriptionSynchronizationListPage{ 7348 fn: getNextPage, 7349 sssl: cur, 7350 } 7351} 7352 7353// ShareSynchronization a ShareSynchronization data transfer object. 7354type ShareSynchronization struct { 7355 // ConsumerEmail - Email of the user who created the synchronization 7356 ConsumerEmail *string `json:"consumerEmail,omitempty"` 7357 // ConsumerName - Name of the user who created the synchronization 7358 ConsumerName *string `json:"consumerName,omitempty"` 7359 // ConsumerTenantName - Tenant name of the consumer who created the synchronization 7360 ConsumerTenantName *string `json:"consumerTenantName,omitempty"` 7361 // DurationMs - synchronization duration 7362 DurationMs *int32 `json:"durationMs,omitempty"` 7363 // EndTime - End time of synchronization 7364 EndTime *date.Time `json:"endTime,omitempty"` 7365 // Message - message of synchronization 7366 Message *string `json:"message,omitempty"` 7367 // StartTime - start time of synchronization 7368 StartTime *date.Time `json:"startTime,omitempty"` 7369 // Status - Raw Status 7370 Status *string `json:"status,omitempty"` 7371 // SynchronizationID - Synchronization id 7372 SynchronizationID *string `json:"synchronizationId,omitempty"` 7373 // SynchronizationMode - READ-ONLY; Synchronization mode. Possible values include: 'Incremental', 'FullSync' 7374 SynchronizationMode SynchronizationMode `json:"synchronizationMode,omitempty"` 7375} 7376 7377// MarshalJSON is the custom marshaler for ShareSynchronization. 7378func (ss ShareSynchronization) MarshalJSON() ([]byte, error) { 7379 objectMap := make(map[string]interface{}) 7380 if ss.ConsumerEmail != nil { 7381 objectMap["consumerEmail"] = ss.ConsumerEmail 7382 } 7383 if ss.ConsumerName != nil { 7384 objectMap["consumerName"] = ss.ConsumerName 7385 } 7386 if ss.ConsumerTenantName != nil { 7387 objectMap["consumerTenantName"] = ss.ConsumerTenantName 7388 } 7389 if ss.DurationMs != nil { 7390 objectMap["durationMs"] = ss.DurationMs 7391 } 7392 if ss.EndTime != nil { 7393 objectMap["endTime"] = ss.EndTime 7394 } 7395 if ss.Message != nil { 7396 objectMap["message"] = ss.Message 7397 } 7398 if ss.StartTime != nil { 7399 objectMap["startTime"] = ss.StartTime 7400 } 7401 if ss.Status != nil { 7402 objectMap["status"] = ss.Status 7403 } 7404 if ss.SynchronizationID != nil { 7405 objectMap["synchronizationId"] = ss.SynchronizationID 7406 } 7407 return json.Marshal(objectMap) 7408} 7409 7410// ShareSynchronizationList list response for get ShareSynchronization. 7411type ShareSynchronizationList struct { 7412 autorest.Response `json:"-"` 7413 // NextLink - The Url of next result page. 7414 NextLink *string `json:"nextLink,omitempty"` 7415 // Value - Collection of items of type DataTransferObjects. 7416 Value *[]ShareSynchronization `json:"value,omitempty"` 7417} 7418 7419// ShareSynchronizationListIterator provides access to a complete listing of ShareSynchronization values. 7420type ShareSynchronizationListIterator struct { 7421 i int 7422 page ShareSynchronizationListPage 7423} 7424 7425// NextWithContext advances to the next value. If there was an error making 7426// the request the iterator does not advance and the error is returned. 7427func (iter *ShareSynchronizationListIterator) NextWithContext(ctx context.Context) (err error) { 7428 if tracing.IsEnabled() { 7429 ctx = tracing.StartSpan(ctx, fqdn+"/ShareSynchronizationListIterator.NextWithContext") 7430 defer func() { 7431 sc := -1 7432 if iter.Response().Response.Response != nil { 7433 sc = iter.Response().Response.Response.StatusCode 7434 } 7435 tracing.EndSpan(ctx, sc, err) 7436 }() 7437 } 7438 iter.i++ 7439 if iter.i < len(iter.page.Values()) { 7440 return nil 7441 } 7442 err = iter.page.NextWithContext(ctx) 7443 if err != nil { 7444 iter.i-- 7445 return err 7446 } 7447 iter.i = 0 7448 return nil 7449} 7450 7451// Next advances to the next value. If there was an error making 7452// the request the iterator does not advance and the error is returned. 7453// Deprecated: Use NextWithContext() instead. 7454func (iter *ShareSynchronizationListIterator) Next() error { 7455 return iter.NextWithContext(context.Background()) 7456} 7457 7458// NotDone returns true if the enumeration should be started or is not yet complete. 7459func (iter ShareSynchronizationListIterator) NotDone() bool { 7460 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7461} 7462 7463// Response returns the raw server response from the last page request. 7464func (iter ShareSynchronizationListIterator) Response() ShareSynchronizationList { 7465 return iter.page.Response() 7466} 7467 7468// Value returns the current value or a zero-initialized value if the 7469// iterator has advanced beyond the end of the collection. 7470func (iter ShareSynchronizationListIterator) Value() ShareSynchronization { 7471 if !iter.page.NotDone() { 7472 return ShareSynchronization{} 7473 } 7474 return iter.page.Values()[iter.i] 7475} 7476 7477// Creates a new instance of the ShareSynchronizationListIterator type. 7478func NewShareSynchronizationListIterator(page ShareSynchronizationListPage) ShareSynchronizationListIterator { 7479 return ShareSynchronizationListIterator{page: page} 7480} 7481 7482// IsEmpty returns true if the ListResult contains no values. 7483func (ssl ShareSynchronizationList) IsEmpty() bool { 7484 return ssl.Value == nil || len(*ssl.Value) == 0 7485} 7486 7487// hasNextLink returns true if the NextLink is not empty. 7488func (ssl ShareSynchronizationList) hasNextLink() bool { 7489 return ssl.NextLink != nil && len(*ssl.NextLink) != 0 7490} 7491 7492// shareSynchronizationListPreparer prepares a request to retrieve the next set of results. 7493// It returns nil if no more results exist. 7494func (ssl ShareSynchronizationList) shareSynchronizationListPreparer(ctx context.Context) (*http.Request, error) { 7495 if !ssl.hasNextLink() { 7496 return nil, nil 7497 } 7498 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7499 autorest.AsJSON(), 7500 autorest.AsGet(), 7501 autorest.WithBaseURL(to.String(ssl.NextLink))) 7502} 7503 7504// ShareSynchronizationListPage contains a page of ShareSynchronization values. 7505type ShareSynchronizationListPage struct { 7506 fn func(context.Context, ShareSynchronizationList) (ShareSynchronizationList, error) 7507 ssl ShareSynchronizationList 7508} 7509 7510// NextWithContext advances to the next page of values. If there was an error making 7511// the request the page does not advance and the error is returned. 7512func (page *ShareSynchronizationListPage) NextWithContext(ctx context.Context) (err error) { 7513 if tracing.IsEnabled() { 7514 ctx = tracing.StartSpan(ctx, fqdn+"/ShareSynchronizationListPage.NextWithContext") 7515 defer func() { 7516 sc := -1 7517 if page.Response().Response.Response != nil { 7518 sc = page.Response().Response.Response.StatusCode 7519 } 7520 tracing.EndSpan(ctx, sc, err) 7521 }() 7522 } 7523 for { 7524 next, err := page.fn(ctx, page.ssl) 7525 if err != nil { 7526 return err 7527 } 7528 page.ssl = next 7529 if !next.hasNextLink() || !next.IsEmpty() { 7530 break 7531 } 7532 } 7533 return nil 7534} 7535 7536// Next advances to the next page of values. If there was an error making 7537// the request the page does not advance and the error is returned. 7538// Deprecated: Use NextWithContext() instead. 7539func (page *ShareSynchronizationListPage) Next() error { 7540 return page.NextWithContext(context.Background()) 7541} 7542 7543// NotDone returns true if the page enumeration should be started or is not yet complete. 7544func (page ShareSynchronizationListPage) NotDone() bool { 7545 return !page.ssl.IsEmpty() 7546} 7547 7548// Response returns the raw server response from the last page request. 7549func (page ShareSynchronizationListPage) Response() ShareSynchronizationList { 7550 return page.ssl 7551} 7552 7553// Values returns the slice of values for the current page or nil if there are no values. 7554func (page ShareSynchronizationListPage) Values() []ShareSynchronization { 7555 if page.ssl.IsEmpty() { 7556 return nil 7557 } 7558 return *page.ssl.Value 7559} 7560 7561// Creates a new instance of the ShareSynchronizationListPage type. 7562func NewShareSynchronizationListPage(cur ShareSynchronizationList, getNextPage func(context.Context, ShareSynchronizationList) (ShareSynchronizationList, error)) ShareSynchronizationListPage { 7563 return ShareSynchronizationListPage{ 7564 fn: getNextPage, 7565 ssl: cur, 7566 } 7567} 7568 7569// BasicSourceShareSynchronizationSetting a view of synchronization setting added by the provider 7570type BasicSourceShareSynchronizationSetting interface { 7571 AsScheduledSourceSynchronizationSetting() (*ScheduledSourceSynchronizationSetting, bool) 7572 AsSourceShareSynchronizationSetting() (*SourceShareSynchronizationSetting, bool) 7573} 7574 7575// SourceShareSynchronizationSetting a view of synchronization setting added by the provider 7576type SourceShareSynchronizationSetting struct { 7577 // Kind - Possible values include: 'KindSourceShareSynchronizationSetting', 'KindScheduleBased' 7578 Kind KindBasicSourceShareSynchronizationSetting `json:"kind,omitempty"` 7579} 7580 7581func unmarshalBasicSourceShareSynchronizationSetting(body []byte) (BasicSourceShareSynchronizationSetting, error) { 7582 var m map[string]interface{} 7583 err := json.Unmarshal(body, &m) 7584 if err != nil { 7585 return nil, err 7586 } 7587 7588 switch m["kind"] { 7589 case string(KindScheduleBased): 7590 var ssss ScheduledSourceSynchronizationSetting 7591 err := json.Unmarshal(body, &ssss) 7592 return ssss, err 7593 default: 7594 var ssss SourceShareSynchronizationSetting 7595 err := json.Unmarshal(body, &ssss) 7596 return ssss, err 7597 } 7598} 7599func unmarshalBasicSourceShareSynchronizationSettingArray(body []byte) ([]BasicSourceShareSynchronizationSetting, error) { 7600 var rawMessages []*json.RawMessage 7601 err := json.Unmarshal(body, &rawMessages) 7602 if err != nil { 7603 return nil, err 7604 } 7605 7606 ssssArray := make([]BasicSourceShareSynchronizationSetting, len(rawMessages)) 7607 7608 for index, rawMessage := range rawMessages { 7609 ssss, err := unmarshalBasicSourceShareSynchronizationSetting(*rawMessage) 7610 if err != nil { 7611 return nil, err 7612 } 7613 ssssArray[index] = ssss 7614 } 7615 return ssssArray, nil 7616} 7617 7618// MarshalJSON is the custom marshaler for SourceShareSynchronizationSetting. 7619func (ssss SourceShareSynchronizationSetting) MarshalJSON() ([]byte, error) { 7620 ssss.Kind = KindSourceShareSynchronizationSetting 7621 objectMap := make(map[string]interface{}) 7622 if ssss.Kind != "" { 7623 objectMap["kind"] = ssss.Kind 7624 } 7625 return json.Marshal(objectMap) 7626} 7627 7628// AsScheduledSourceSynchronizationSetting is the BasicSourceShareSynchronizationSetting implementation for SourceShareSynchronizationSetting. 7629func (ssss SourceShareSynchronizationSetting) AsScheduledSourceSynchronizationSetting() (*ScheduledSourceSynchronizationSetting, bool) { 7630 return nil, false 7631} 7632 7633// AsSourceShareSynchronizationSetting is the BasicSourceShareSynchronizationSetting implementation for SourceShareSynchronizationSetting. 7634func (ssss SourceShareSynchronizationSetting) AsSourceShareSynchronizationSetting() (*SourceShareSynchronizationSetting, bool) { 7635 return &ssss, true 7636} 7637 7638// AsBasicSourceShareSynchronizationSetting is the BasicSourceShareSynchronizationSetting implementation for SourceShareSynchronizationSetting. 7639func (ssss SourceShareSynchronizationSetting) AsBasicSourceShareSynchronizationSetting() (BasicSourceShareSynchronizationSetting, bool) { 7640 return &ssss, true 7641} 7642 7643// SourceShareSynchronizationSettingList list response for get source share Synchronization settings 7644type SourceShareSynchronizationSettingList struct { 7645 autorest.Response `json:"-"` 7646 // NextLink - The Url of next result page. 7647 NextLink *string `json:"nextLink,omitempty"` 7648 // Value - Collection of items of type DataTransferObjects. 7649 Value *[]BasicSourceShareSynchronizationSetting `json:"value,omitempty"` 7650} 7651 7652// UnmarshalJSON is the custom unmarshaler for SourceShareSynchronizationSettingList struct. 7653func (ssssl *SourceShareSynchronizationSettingList) UnmarshalJSON(body []byte) error { 7654 var m map[string]*json.RawMessage 7655 err := json.Unmarshal(body, &m) 7656 if err != nil { 7657 return err 7658 } 7659 for k, v := range m { 7660 switch k { 7661 case "nextLink": 7662 if v != nil { 7663 var nextLink string 7664 err = json.Unmarshal(*v, &nextLink) 7665 if err != nil { 7666 return err 7667 } 7668 ssssl.NextLink = &nextLink 7669 } 7670 case "value": 7671 if v != nil { 7672 value, err := unmarshalBasicSourceShareSynchronizationSettingArray(*v) 7673 if err != nil { 7674 return err 7675 } 7676 ssssl.Value = &value 7677 } 7678 } 7679 } 7680 7681 return nil 7682} 7683 7684// SourceShareSynchronizationSettingListIterator provides access to a complete listing of 7685// SourceShareSynchronizationSetting values. 7686type SourceShareSynchronizationSettingListIterator struct { 7687 i int 7688 page SourceShareSynchronizationSettingListPage 7689} 7690 7691// NextWithContext advances to the next value. If there was an error making 7692// the request the iterator does not advance and the error is returned. 7693func (iter *SourceShareSynchronizationSettingListIterator) NextWithContext(ctx context.Context) (err error) { 7694 if tracing.IsEnabled() { 7695 ctx = tracing.StartSpan(ctx, fqdn+"/SourceShareSynchronizationSettingListIterator.NextWithContext") 7696 defer func() { 7697 sc := -1 7698 if iter.Response().Response.Response != nil { 7699 sc = iter.Response().Response.Response.StatusCode 7700 } 7701 tracing.EndSpan(ctx, sc, err) 7702 }() 7703 } 7704 iter.i++ 7705 if iter.i < len(iter.page.Values()) { 7706 return nil 7707 } 7708 err = iter.page.NextWithContext(ctx) 7709 if err != nil { 7710 iter.i-- 7711 return err 7712 } 7713 iter.i = 0 7714 return nil 7715} 7716 7717// Next advances to the next value. If there was an error making 7718// the request the iterator does not advance and the error is returned. 7719// Deprecated: Use NextWithContext() instead. 7720func (iter *SourceShareSynchronizationSettingListIterator) Next() error { 7721 return iter.NextWithContext(context.Background()) 7722} 7723 7724// NotDone returns true if the enumeration should be started or is not yet complete. 7725func (iter SourceShareSynchronizationSettingListIterator) NotDone() bool { 7726 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7727} 7728 7729// Response returns the raw server response from the last page request. 7730func (iter SourceShareSynchronizationSettingListIterator) Response() SourceShareSynchronizationSettingList { 7731 return iter.page.Response() 7732} 7733 7734// Value returns the current value or a zero-initialized value if the 7735// iterator has advanced beyond the end of the collection. 7736func (iter SourceShareSynchronizationSettingListIterator) Value() BasicSourceShareSynchronizationSetting { 7737 if !iter.page.NotDone() { 7738 return SourceShareSynchronizationSetting{} 7739 } 7740 return iter.page.Values()[iter.i] 7741} 7742 7743// Creates a new instance of the SourceShareSynchronizationSettingListIterator type. 7744func NewSourceShareSynchronizationSettingListIterator(page SourceShareSynchronizationSettingListPage) SourceShareSynchronizationSettingListIterator { 7745 return SourceShareSynchronizationSettingListIterator{page: page} 7746} 7747 7748// IsEmpty returns true if the ListResult contains no values. 7749func (ssssl SourceShareSynchronizationSettingList) IsEmpty() bool { 7750 return ssssl.Value == nil || len(*ssssl.Value) == 0 7751} 7752 7753// hasNextLink returns true if the NextLink is not empty. 7754func (ssssl SourceShareSynchronizationSettingList) hasNextLink() bool { 7755 return ssssl.NextLink != nil && len(*ssssl.NextLink) != 0 7756} 7757 7758// sourceShareSynchronizationSettingListPreparer prepares a request to retrieve the next set of results. 7759// It returns nil if no more results exist. 7760func (ssssl SourceShareSynchronizationSettingList) sourceShareSynchronizationSettingListPreparer(ctx context.Context) (*http.Request, error) { 7761 if !ssssl.hasNextLink() { 7762 return nil, nil 7763 } 7764 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7765 autorest.AsJSON(), 7766 autorest.AsGet(), 7767 autorest.WithBaseURL(to.String(ssssl.NextLink))) 7768} 7769 7770// SourceShareSynchronizationSettingListPage contains a page of BasicSourceShareSynchronizationSetting 7771// values. 7772type SourceShareSynchronizationSettingListPage struct { 7773 fn func(context.Context, SourceShareSynchronizationSettingList) (SourceShareSynchronizationSettingList, error) 7774 ssssl SourceShareSynchronizationSettingList 7775} 7776 7777// NextWithContext advances to the next page of values. If there was an error making 7778// the request the page does not advance and the error is returned. 7779func (page *SourceShareSynchronizationSettingListPage) NextWithContext(ctx context.Context) (err error) { 7780 if tracing.IsEnabled() { 7781 ctx = tracing.StartSpan(ctx, fqdn+"/SourceShareSynchronizationSettingListPage.NextWithContext") 7782 defer func() { 7783 sc := -1 7784 if page.Response().Response.Response != nil { 7785 sc = page.Response().Response.Response.StatusCode 7786 } 7787 tracing.EndSpan(ctx, sc, err) 7788 }() 7789 } 7790 for { 7791 next, err := page.fn(ctx, page.ssssl) 7792 if err != nil { 7793 return err 7794 } 7795 page.ssssl = next 7796 if !next.hasNextLink() || !next.IsEmpty() { 7797 break 7798 } 7799 } 7800 return nil 7801} 7802 7803// Next advances to the next page of values. If there was an error making 7804// the request the page does not advance and the error is returned. 7805// Deprecated: Use NextWithContext() instead. 7806func (page *SourceShareSynchronizationSettingListPage) Next() error { 7807 return page.NextWithContext(context.Background()) 7808} 7809 7810// NotDone returns true if the page enumeration should be started or is not yet complete. 7811func (page SourceShareSynchronizationSettingListPage) NotDone() bool { 7812 return !page.ssssl.IsEmpty() 7813} 7814 7815// Response returns the raw server response from the last page request. 7816func (page SourceShareSynchronizationSettingListPage) Response() SourceShareSynchronizationSettingList { 7817 return page.ssssl 7818} 7819 7820// Values returns the slice of values for the current page or nil if there are no values. 7821func (page SourceShareSynchronizationSettingListPage) Values() []BasicSourceShareSynchronizationSetting { 7822 if page.ssssl.IsEmpty() { 7823 return nil 7824 } 7825 return *page.ssssl.Value 7826} 7827 7828// Creates a new instance of the SourceShareSynchronizationSettingListPage type. 7829func NewSourceShareSynchronizationSettingListPage(cur SourceShareSynchronizationSettingList, getNextPage func(context.Context, SourceShareSynchronizationSettingList) (SourceShareSynchronizationSettingList, error)) SourceShareSynchronizationSettingListPage { 7830 return SourceShareSynchronizationSettingListPage{ 7831 fn: getNextPage, 7832 ssssl: cur, 7833 } 7834} 7835 7836// SQLDBTableDataSet a SQL DB table data set. 7837type SQLDBTableDataSet struct { 7838 // SQLDBTableProperties - SQL DB table data set properties. 7839 *SQLDBTableProperties `json:"properties,omitempty"` 7840 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 7841 Kind Kind `json:"kind,omitempty"` 7842 // ID - READ-ONLY; The resource id of the azure resource 7843 ID *string `json:"id,omitempty"` 7844 // Name - READ-ONLY; Name of the azure resource 7845 Name *string `json:"name,omitempty"` 7846 // Type - READ-ONLY; Type of the azure resource 7847 Type *string `json:"type,omitempty"` 7848} 7849 7850// MarshalJSON is the custom marshaler for SQLDBTableDataSet. 7851func (sdtds SQLDBTableDataSet) MarshalJSON() ([]byte, error) { 7852 sdtds.Kind = KindSQLDBTable 7853 objectMap := make(map[string]interface{}) 7854 if sdtds.SQLDBTableProperties != nil { 7855 objectMap["properties"] = sdtds.SQLDBTableProperties 7856 } 7857 if sdtds.Kind != "" { 7858 objectMap["kind"] = sdtds.Kind 7859 } 7860 return json.Marshal(objectMap) 7861} 7862 7863// AsADLSGen1FileDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7864func (sdtds SQLDBTableDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 7865 return nil, false 7866} 7867 7868// AsADLSGen1FolderDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7869func (sdtds SQLDBTableDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 7870 return nil, false 7871} 7872 7873// AsADLSGen2FileDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7874func (sdtds SQLDBTableDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 7875 return nil, false 7876} 7877 7878// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7879func (sdtds SQLDBTableDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 7880 return nil, false 7881} 7882 7883// AsADLSGen2FolderDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7884func (sdtds SQLDBTableDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 7885 return nil, false 7886} 7887 7888// AsBlobContainerDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7889func (sdtds SQLDBTableDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 7890 return nil, false 7891} 7892 7893// AsBlobDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7894func (sdtds SQLDBTableDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 7895 return nil, false 7896} 7897 7898// AsBlobFolderDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7899func (sdtds SQLDBTableDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 7900 return nil, false 7901} 7902 7903// AsKustoClusterDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7904func (sdtds SQLDBTableDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 7905 return nil, false 7906} 7907 7908// AsKustoDatabaseDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7909func (sdtds SQLDBTableDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 7910 return nil, false 7911} 7912 7913// AsSQLDBTableDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7914func (sdtds SQLDBTableDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 7915 return &sdtds, true 7916} 7917 7918// AsSQLDWTableDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7919func (sdtds SQLDBTableDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 7920 return nil, false 7921} 7922 7923// AsDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7924func (sdtds SQLDBTableDataSet) AsDataSet() (*DataSet, bool) { 7925 return nil, false 7926} 7927 7928// AsBasicDataSet is the BasicDataSet implementation for SQLDBTableDataSet. 7929func (sdtds SQLDBTableDataSet) AsBasicDataSet() (BasicDataSet, bool) { 7930 return &sdtds, true 7931} 7932 7933// UnmarshalJSON is the custom unmarshaler for SQLDBTableDataSet struct. 7934func (sdtds *SQLDBTableDataSet) UnmarshalJSON(body []byte) error { 7935 var m map[string]*json.RawMessage 7936 err := json.Unmarshal(body, &m) 7937 if err != nil { 7938 return err 7939 } 7940 for k, v := range m { 7941 switch k { 7942 case "properties": 7943 if v != nil { 7944 var sQLDBTableProperties SQLDBTableProperties 7945 err = json.Unmarshal(*v, &sQLDBTableProperties) 7946 if err != nil { 7947 return err 7948 } 7949 sdtds.SQLDBTableProperties = &sQLDBTableProperties 7950 } 7951 case "kind": 7952 if v != nil { 7953 var kind Kind 7954 err = json.Unmarshal(*v, &kind) 7955 if err != nil { 7956 return err 7957 } 7958 sdtds.Kind = kind 7959 } 7960 case "id": 7961 if v != nil { 7962 var ID string 7963 err = json.Unmarshal(*v, &ID) 7964 if err != nil { 7965 return err 7966 } 7967 sdtds.ID = &ID 7968 } 7969 case "name": 7970 if v != nil { 7971 var name string 7972 err = json.Unmarshal(*v, &name) 7973 if err != nil { 7974 return err 7975 } 7976 sdtds.Name = &name 7977 } 7978 case "type": 7979 if v != nil { 7980 var typeVar string 7981 err = json.Unmarshal(*v, &typeVar) 7982 if err != nil { 7983 return err 7984 } 7985 sdtds.Type = &typeVar 7986 } 7987 } 7988 } 7989 7990 return nil 7991} 7992 7993// SQLDBTableDataSetMapping a SQL DB Table data set mapping. 7994type SQLDBTableDataSetMapping struct { 7995 // SQLDBTableDataSetMappingProperties - Sql DB data set mapping properties. 7996 *SQLDBTableDataSetMappingProperties `json:"properties,omitempty"` 7997 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 7998 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 7999 // ID - READ-ONLY; The resource id of the azure resource 8000 ID *string `json:"id,omitempty"` 8001 // Name - READ-ONLY; Name of the azure resource 8002 Name *string `json:"name,omitempty"` 8003 // Type - READ-ONLY; Type of the azure resource 8004 Type *string `json:"type,omitempty"` 8005} 8006 8007// MarshalJSON is the custom marshaler for SQLDBTableDataSetMapping. 8008func (sdtdsm SQLDBTableDataSetMapping) MarshalJSON() ([]byte, error) { 8009 sdtdsm.Kind = KindBasicDataSetMappingKindSQLDBTable 8010 objectMap := make(map[string]interface{}) 8011 if sdtdsm.SQLDBTableDataSetMappingProperties != nil { 8012 objectMap["properties"] = sdtdsm.SQLDBTableDataSetMappingProperties 8013 } 8014 if sdtdsm.Kind != "" { 8015 objectMap["kind"] = sdtdsm.Kind 8016 } 8017 return json.Marshal(objectMap) 8018} 8019 8020// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8021func (sdtdsm SQLDBTableDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 8022 return nil, false 8023} 8024 8025// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8026func (sdtdsm SQLDBTableDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 8027 return nil, false 8028} 8029 8030// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8031func (sdtdsm SQLDBTableDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 8032 return nil, false 8033} 8034 8035// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8036func (sdtdsm SQLDBTableDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 8037 return nil, false 8038} 8039 8040// AsBlobDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8041func (sdtdsm SQLDBTableDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 8042 return nil, false 8043} 8044 8045// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8046func (sdtdsm SQLDBTableDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 8047 return nil, false 8048} 8049 8050// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8051func (sdtdsm SQLDBTableDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 8052 return nil, false 8053} 8054 8055// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8056func (sdtdsm SQLDBTableDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 8057 return nil, false 8058} 8059 8060// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8061func (sdtdsm SQLDBTableDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 8062 return &sdtdsm, true 8063} 8064 8065// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8066func (sdtdsm SQLDBTableDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 8067 return nil, false 8068} 8069 8070// AsDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8071func (sdtdsm SQLDBTableDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 8072 return nil, false 8073} 8074 8075// AsBasicDataSetMapping is the BasicDataSetMapping implementation for SQLDBTableDataSetMapping. 8076func (sdtdsm SQLDBTableDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 8077 return &sdtdsm, true 8078} 8079 8080// UnmarshalJSON is the custom unmarshaler for SQLDBTableDataSetMapping struct. 8081func (sdtdsm *SQLDBTableDataSetMapping) UnmarshalJSON(body []byte) error { 8082 var m map[string]*json.RawMessage 8083 err := json.Unmarshal(body, &m) 8084 if err != nil { 8085 return err 8086 } 8087 for k, v := range m { 8088 switch k { 8089 case "properties": 8090 if v != nil { 8091 var sQLDBTableDataSetMappingProperties SQLDBTableDataSetMappingProperties 8092 err = json.Unmarshal(*v, &sQLDBTableDataSetMappingProperties) 8093 if err != nil { 8094 return err 8095 } 8096 sdtdsm.SQLDBTableDataSetMappingProperties = &sQLDBTableDataSetMappingProperties 8097 } 8098 case "kind": 8099 if v != nil { 8100 var kind KindBasicDataSetMapping 8101 err = json.Unmarshal(*v, &kind) 8102 if err != nil { 8103 return err 8104 } 8105 sdtdsm.Kind = kind 8106 } 8107 case "id": 8108 if v != nil { 8109 var ID string 8110 err = json.Unmarshal(*v, &ID) 8111 if err != nil { 8112 return err 8113 } 8114 sdtdsm.ID = &ID 8115 } 8116 case "name": 8117 if v != nil { 8118 var name string 8119 err = json.Unmarshal(*v, &name) 8120 if err != nil { 8121 return err 8122 } 8123 sdtdsm.Name = &name 8124 } 8125 case "type": 8126 if v != nil { 8127 var typeVar string 8128 err = json.Unmarshal(*v, &typeVar) 8129 if err != nil { 8130 return err 8131 } 8132 sdtdsm.Type = &typeVar 8133 } 8134 } 8135 } 8136 8137 return nil 8138} 8139 8140// SQLDBTableDataSetMappingProperties properties of the SQL DB table data set mapping. 8141type SQLDBTableDataSetMappingProperties struct { 8142 // DatabaseName - DatabaseName name of the sink data set 8143 DatabaseName *string `json:"databaseName,omitempty"` 8144 // DataSetID - The id of the source data set. 8145 DataSetID *string `json:"dataSetId,omitempty"` 8146 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 8147 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 8148 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 8149 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 8150 // SchemaName - Schema of the table. Default value is dbo. 8151 SchemaName *string `json:"schemaName,omitempty"` 8152 // SQLServerResourceID - Resource id of SQL server 8153 SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` 8154 // TableName - SQL DB table name. 8155 TableName *string `json:"tableName,omitempty"` 8156} 8157 8158// MarshalJSON is the custom marshaler for SQLDBTableDataSetMappingProperties. 8159func (sdtdsmp SQLDBTableDataSetMappingProperties) MarshalJSON() ([]byte, error) { 8160 objectMap := make(map[string]interface{}) 8161 if sdtdsmp.DatabaseName != nil { 8162 objectMap["databaseName"] = sdtdsmp.DatabaseName 8163 } 8164 if sdtdsmp.DataSetID != nil { 8165 objectMap["dataSetId"] = sdtdsmp.DataSetID 8166 } 8167 if sdtdsmp.SchemaName != nil { 8168 objectMap["schemaName"] = sdtdsmp.SchemaName 8169 } 8170 if sdtdsmp.SQLServerResourceID != nil { 8171 objectMap["sqlServerResourceId"] = sdtdsmp.SQLServerResourceID 8172 } 8173 if sdtdsmp.TableName != nil { 8174 objectMap["tableName"] = sdtdsmp.TableName 8175 } 8176 return json.Marshal(objectMap) 8177} 8178 8179// SQLDBTableProperties properties of the SQL DB table data set. 8180type SQLDBTableProperties struct { 8181 // DatabaseName - Database name of the source data set 8182 DatabaseName *string `json:"databaseName,omitempty"` 8183 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 8184 DataSetID *string `json:"dataSetId,omitempty"` 8185 // SchemaName - Schema of the table. Default value is dbo. 8186 SchemaName *string `json:"schemaName,omitempty"` 8187 // SQLServerResourceID - Resource id of SQL server 8188 SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` 8189 // TableName - SQL DB table name. 8190 TableName *string `json:"tableName,omitempty"` 8191} 8192 8193// MarshalJSON is the custom marshaler for SQLDBTableProperties. 8194func (sdtp SQLDBTableProperties) MarshalJSON() ([]byte, error) { 8195 objectMap := make(map[string]interface{}) 8196 if sdtp.DatabaseName != nil { 8197 objectMap["databaseName"] = sdtp.DatabaseName 8198 } 8199 if sdtp.SchemaName != nil { 8200 objectMap["schemaName"] = sdtp.SchemaName 8201 } 8202 if sdtp.SQLServerResourceID != nil { 8203 objectMap["sqlServerResourceId"] = sdtp.SQLServerResourceID 8204 } 8205 if sdtp.TableName != nil { 8206 objectMap["tableName"] = sdtp.TableName 8207 } 8208 return json.Marshal(objectMap) 8209} 8210 8211// SQLDWTableDataSet a SQL DW table data set. 8212type SQLDWTableDataSet struct { 8213 // SQLDWTableProperties - SQL DW table data set properties. 8214 *SQLDWTableProperties `json:"properties,omitempty"` 8215 // Kind - Possible values include: 'KindDataSet', 'KindAdlsGen1File', 'KindAdlsGen1Folder', 'KindAdlsGen2File', 'KindAdlsGen2FileSystem', 'KindAdlsGen2Folder', 'KindContainer', 'KindBlob', 'KindBlobFolder', 'KindKustoCluster', 'KindKustoDatabase', 'KindSQLDBTable', 'KindSQLDWTable' 8216 Kind Kind `json:"kind,omitempty"` 8217 // ID - READ-ONLY; The resource id of the azure resource 8218 ID *string `json:"id,omitempty"` 8219 // Name - READ-ONLY; Name of the azure resource 8220 Name *string `json:"name,omitempty"` 8221 // Type - READ-ONLY; Type of the azure resource 8222 Type *string `json:"type,omitempty"` 8223} 8224 8225// MarshalJSON is the custom marshaler for SQLDWTableDataSet. 8226func (sdtds SQLDWTableDataSet) MarshalJSON() ([]byte, error) { 8227 sdtds.Kind = KindSQLDWTable 8228 objectMap := make(map[string]interface{}) 8229 if sdtds.SQLDWTableProperties != nil { 8230 objectMap["properties"] = sdtds.SQLDWTableProperties 8231 } 8232 if sdtds.Kind != "" { 8233 objectMap["kind"] = sdtds.Kind 8234 } 8235 return json.Marshal(objectMap) 8236} 8237 8238// AsADLSGen1FileDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8239func (sdtds SQLDWTableDataSet) AsADLSGen1FileDataSet() (*ADLSGen1FileDataSet, bool) { 8240 return nil, false 8241} 8242 8243// AsADLSGen1FolderDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8244func (sdtds SQLDWTableDataSet) AsADLSGen1FolderDataSet() (*ADLSGen1FolderDataSet, bool) { 8245 return nil, false 8246} 8247 8248// AsADLSGen2FileDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8249func (sdtds SQLDWTableDataSet) AsADLSGen2FileDataSet() (*ADLSGen2FileDataSet, bool) { 8250 return nil, false 8251} 8252 8253// AsADLSGen2FileSystemDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8254func (sdtds SQLDWTableDataSet) AsADLSGen2FileSystemDataSet() (*ADLSGen2FileSystemDataSet, bool) { 8255 return nil, false 8256} 8257 8258// AsADLSGen2FolderDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8259func (sdtds SQLDWTableDataSet) AsADLSGen2FolderDataSet() (*ADLSGen2FolderDataSet, bool) { 8260 return nil, false 8261} 8262 8263// AsBlobContainerDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8264func (sdtds SQLDWTableDataSet) AsBlobContainerDataSet() (*BlobContainerDataSet, bool) { 8265 return nil, false 8266} 8267 8268// AsBlobDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8269func (sdtds SQLDWTableDataSet) AsBlobDataSet() (*BlobDataSet, bool) { 8270 return nil, false 8271} 8272 8273// AsBlobFolderDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8274func (sdtds SQLDWTableDataSet) AsBlobFolderDataSet() (*BlobFolderDataSet, bool) { 8275 return nil, false 8276} 8277 8278// AsKustoClusterDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8279func (sdtds SQLDWTableDataSet) AsKustoClusterDataSet() (*KustoClusterDataSet, bool) { 8280 return nil, false 8281} 8282 8283// AsKustoDatabaseDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8284func (sdtds SQLDWTableDataSet) AsKustoDatabaseDataSet() (*KustoDatabaseDataSet, bool) { 8285 return nil, false 8286} 8287 8288// AsSQLDBTableDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8289func (sdtds SQLDWTableDataSet) AsSQLDBTableDataSet() (*SQLDBTableDataSet, bool) { 8290 return nil, false 8291} 8292 8293// AsSQLDWTableDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8294func (sdtds SQLDWTableDataSet) AsSQLDWTableDataSet() (*SQLDWTableDataSet, bool) { 8295 return &sdtds, true 8296} 8297 8298// AsDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8299func (sdtds SQLDWTableDataSet) AsDataSet() (*DataSet, bool) { 8300 return nil, false 8301} 8302 8303// AsBasicDataSet is the BasicDataSet implementation for SQLDWTableDataSet. 8304func (sdtds SQLDWTableDataSet) AsBasicDataSet() (BasicDataSet, bool) { 8305 return &sdtds, true 8306} 8307 8308// UnmarshalJSON is the custom unmarshaler for SQLDWTableDataSet struct. 8309func (sdtds *SQLDWTableDataSet) UnmarshalJSON(body []byte) error { 8310 var m map[string]*json.RawMessage 8311 err := json.Unmarshal(body, &m) 8312 if err != nil { 8313 return err 8314 } 8315 for k, v := range m { 8316 switch k { 8317 case "properties": 8318 if v != nil { 8319 var sQLDWTableProperties SQLDWTableProperties 8320 err = json.Unmarshal(*v, &sQLDWTableProperties) 8321 if err != nil { 8322 return err 8323 } 8324 sdtds.SQLDWTableProperties = &sQLDWTableProperties 8325 } 8326 case "kind": 8327 if v != nil { 8328 var kind Kind 8329 err = json.Unmarshal(*v, &kind) 8330 if err != nil { 8331 return err 8332 } 8333 sdtds.Kind = kind 8334 } 8335 case "id": 8336 if v != nil { 8337 var ID string 8338 err = json.Unmarshal(*v, &ID) 8339 if err != nil { 8340 return err 8341 } 8342 sdtds.ID = &ID 8343 } 8344 case "name": 8345 if v != nil { 8346 var name string 8347 err = json.Unmarshal(*v, &name) 8348 if err != nil { 8349 return err 8350 } 8351 sdtds.Name = &name 8352 } 8353 case "type": 8354 if v != nil { 8355 var typeVar string 8356 err = json.Unmarshal(*v, &typeVar) 8357 if err != nil { 8358 return err 8359 } 8360 sdtds.Type = &typeVar 8361 } 8362 } 8363 } 8364 8365 return nil 8366} 8367 8368// SQLDWTableDataSetMapping a SQL DW Table data set mapping. 8369type SQLDWTableDataSetMapping struct { 8370 // SQLDWTableDataSetMappingProperties - Sql DW data set mapping properties. 8371 *SQLDWTableDataSetMappingProperties `json:"properties,omitempty"` 8372 // Kind - Possible values include: 'KindBasicDataSetMappingKindDataSetMapping', 'KindBasicDataSetMappingKindAdlsGen2File', 'KindBasicDataSetMappingKindAdlsGen2FileSystem', 'KindBasicDataSetMappingKindAdlsGen2Folder', 'KindBasicDataSetMappingKindContainer', 'KindBasicDataSetMappingKindBlob', 'KindBasicDataSetMappingKindBlobFolder', 'KindBasicDataSetMappingKindKustoCluster', 'KindBasicDataSetMappingKindKustoDatabase', 'KindBasicDataSetMappingKindSQLDBTable', 'KindBasicDataSetMappingKindSQLDWTable' 8373 Kind KindBasicDataSetMapping `json:"kind,omitempty"` 8374 // ID - READ-ONLY; The resource id of the azure resource 8375 ID *string `json:"id,omitempty"` 8376 // Name - READ-ONLY; Name of the azure resource 8377 Name *string `json:"name,omitempty"` 8378 // Type - READ-ONLY; Type of the azure resource 8379 Type *string `json:"type,omitempty"` 8380} 8381 8382// MarshalJSON is the custom marshaler for SQLDWTableDataSetMapping. 8383func (sdtdsm SQLDWTableDataSetMapping) MarshalJSON() ([]byte, error) { 8384 sdtdsm.Kind = KindBasicDataSetMappingKindSQLDWTable 8385 objectMap := make(map[string]interface{}) 8386 if sdtdsm.SQLDWTableDataSetMappingProperties != nil { 8387 objectMap["properties"] = sdtdsm.SQLDWTableDataSetMappingProperties 8388 } 8389 if sdtdsm.Kind != "" { 8390 objectMap["kind"] = sdtdsm.Kind 8391 } 8392 return json.Marshal(objectMap) 8393} 8394 8395// AsADLSGen2FileDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8396func (sdtdsm SQLDWTableDataSetMapping) AsADLSGen2FileDataSetMapping() (*ADLSGen2FileDataSetMapping, bool) { 8397 return nil, false 8398} 8399 8400// AsADLSGen2FileSystemDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8401func (sdtdsm SQLDWTableDataSetMapping) AsADLSGen2FileSystemDataSetMapping() (*ADLSGen2FileSystemDataSetMapping, bool) { 8402 return nil, false 8403} 8404 8405// AsADLSGen2FolderDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8406func (sdtdsm SQLDWTableDataSetMapping) AsADLSGen2FolderDataSetMapping() (*ADLSGen2FolderDataSetMapping, bool) { 8407 return nil, false 8408} 8409 8410// AsBlobContainerDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8411func (sdtdsm SQLDWTableDataSetMapping) AsBlobContainerDataSetMapping() (*BlobContainerDataSetMapping, bool) { 8412 return nil, false 8413} 8414 8415// AsBlobDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8416func (sdtdsm SQLDWTableDataSetMapping) AsBlobDataSetMapping() (*BlobDataSetMapping, bool) { 8417 return nil, false 8418} 8419 8420// AsBlobFolderDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8421func (sdtdsm SQLDWTableDataSetMapping) AsBlobFolderDataSetMapping() (*BlobFolderDataSetMapping, bool) { 8422 return nil, false 8423} 8424 8425// AsKustoClusterDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8426func (sdtdsm SQLDWTableDataSetMapping) AsKustoClusterDataSetMapping() (*KustoClusterDataSetMapping, bool) { 8427 return nil, false 8428} 8429 8430// AsKustoDatabaseDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8431func (sdtdsm SQLDWTableDataSetMapping) AsKustoDatabaseDataSetMapping() (*KustoDatabaseDataSetMapping, bool) { 8432 return nil, false 8433} 8434 8435// AsSQLDBTableDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8436func (sdtdsm SQLDWTableDataSetMapping) AsSQLDBTableDataSetMapping() (*SQLDBTableDataSetMapping, bool) { 8437 return nil, false 8438} 8439 8440// AsSQLDWTableDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8441func (sdtdsm SQLDWTableDataSetMapping) AsSQLDWTableDataSetMapping() (*SQLDWTableDataSetMapping, bool) { 8442 return &sdtdsm, true 8443} 8444 8445// AsDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8446func (sdtdsm SQLDWTableDataSetMapping) AsDataSetMapping() (*DataSetMapping, bool) { 8447 return nil, false 8448} 8449 8450// AsBasicDataSetMapping is the BasicDataSetMapping implementation for SQLDWTableDataSetMapping. 8451func (sdtdsm SQLDWTableDataSetMapping) AsBasicDataSetMapping() (BasicDataSetMapping, bool) { 8452 return &sdtdsm, true 8453} 8454 8455// UnmarshalJSON is the custom unmarshaler for SQLDWTableDataSetMapping struct. 8456func (sdtdsm *SQLDWTableDataSetMapping) UnmarshalJSON(body []byte) error { 8457 var m map[string]*json.RawMessage 8458 err := json.Unmarshal(body, &m) 8459 if err != nil { 8460 return err 8461 } 8462 for k, v := range m { 8463 switch k { 8464 case "properties": 8465 if v != nil { 8466 var sQLDWTableDataSetMappingProperties SQLDWTableDataSetMappingProperties 8467 err = json.Unmarshal(*v, &sQLDWTableDataSetMappingProperties) 8468 if err != nil { 8469 return err 8470 } 8471 sdtdsm.SQLDWTableDataSetMappingProperties = &sQLDWTableDataSetMappingProperties 8472 } 8473 case "kind": 8474 if v != nil { 8475 var kind KindBasicDataSetMapping 8476 err = json.Unmarshal(*v, &kind) 8477 if err != nil { 8478 return err 8479 } 8480 sdtdsm.Kind = kind 8481 } 8482 case "id": 8483 if v != nil { 8484 var ID string 8485 err = json.Unmarshal(*v, &ID) 8486 if err != nil { 8487 return err 8488 } 8489 sdtdsm.ID = &ID 8490 } 8491 case "name": 8492 if v != nil { 8493 var name string 8494 err = json.Unmarshal(*v, &name) 8495 if err != nil { 8496 return err 8497 } 8498 sdtdsm.Name = &name 8499 } 8500 case "type": 8501 if v != nil { 8502 var typeVar string 8503 err = json.Unmarshal(*v, &typeVar) 8504 if err != nil { 8505 return err 8506 } 8507 sdtdsm.Type = &typeVar 8508 } 8509 } 8510 } 8511 8512 return nil 8513} 8514 8515// SQLDWTableDataSetMappingProperties properties of the SQL DW table data set mapping. 8516type SQLDWTableDataSetMappingProperties struct { 8517 // DataSetID - The id of the source data set. 8518 DataSetID *string `json:"dataSetId,omitempty"` 8519 // DataSetMappingStatus - READ-ONLY; Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' 8520 DataSetMappingStatus DataSetMappingStatus `json:"dataSetMappingStatus,omitempty"` 8521 // DataWarehouseName - DataWarehouse name of the source data set 8522 DataWarehouseName *string `json:"dataWarehouseName,omitempty"` 8523 // ProvisioningState - READ-ONLY; Provisioning state of the data set mapping. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' 8524 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 8525 // SchemaName - Schema of the table. Default value is dbo. 8526 SchemaName *string `json:"schemaName,omitempty"` 8527 // SQLServerResourceID - Resource id of SQL server 8528 SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` 8529 // TableName - SQL DW table name. 8530 TableName *string `json:"tableName,omitempty"` 8531} 8532 8533// MarshalJSON is the custom marshaler for SQLDWTableDataSetMappingProperties. 8534func (sdtdsmp SQLDWTableDataSetMappingProperties) MarshalJSON() ([]byte, error) { 8535 objectMap := make(map[string]interface{}) 8536 if sdtdsmp.DataSetID != nil { 8537 objectMap["dataSetId"] = sdtdsmp.DataSetID 8538 } 8539 if sdtdsmp.DataWarehouseName != nil { 8540 objectMap["dataWarehouseName"] = sdtdsmp.DataWarehouseName 8541 } 8542 if sdtdsmp.SchemaName != nil { 8543 objectMap["schemaName"] = sdtdsmp.SchemaName 8544 } 8545 if sdtdsmp.SQLServerResourceID != nil { 8546 objectMap["sqlServerResourceId"] = sdtdsmp.SQLServerResourceID 8547 } 8548 if sdtdsmp.TableName != nil { 8549 objectMap["tableName"] = sdtdsmp.TableName 8550 } 8551 return json.Marshal(objectMap) 8552} 8553 8554// SQLDWTableProperties properties of the SQL DW table data set. 8555type SQLDWTableProperties struct { 8556 // DataSetID - READ-ONLY; Unique id for identifying a data set resource 8557 DataSetID *string `json:"dataSetId,omitempty"` 8558 // DataWarehouseName - DataWarehouse name of the source data set 8559 DataWarehouseName *string `json:"dataWarehouseName,omitempty"` 8560 // SchemaName - Schema of the table. Default value is dbo. 8561 SchemaName *string `json:"schemaName,omitempty"` 8562 // SQLServerResourceID - Resource id of SQL server 8563 SQLServerResourceID *string `json:"sqlServerResourceId,omitempty"` 8564 // TableName - SQL DW table name. 8565 TableName *string `json:"tableName,omitempty"` 8566} 8567 8568// MarshalJSON is the custom marshaler for SQLDWTableProperties. 8569func (sdtp SQLDWTableProperties) MarshalJSON() ([]byte, error) { 8570 objectMap := make(map[string]interface{}) 8571 if sdtp.DataWarehouseName != nil { 8572 objectMap["dataWarehouseName"] = sdtp.DataWarehouseName 8573 } 8574 if sdtp.SchemaName != nil { 8575 objectMap["schemaName"] = sdtp.SchemaName 8576 } 8577 if sdtp.SQLServerResourceID != nil { 8578 objectMap["sqlServerResourceId"] = sdtp.SQLServerResourceID 8579 } 8580 if sdtp.TableName != nil { 8581 objectMap["tableName"] = sdtp.TableName 8582 } 8583 return json.Marshal(objectMap) 8584} 8585 8586// SynchronizationDetails synchronization details at data set level 8587type SynchronizationDetails struct { 8588 // DataSetID - READ-ONLY; Id of data set 8589 DataSetID *string `json:"dataSetId,omitempty"` 8590 // DataSetType - READ-ONLY; Type of the data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SQLDBTable', 'SQLDWTable' 8591 DataSetType DataSetType `json:"dataSetType,omitempty"` 8592 // DurationMs - READ-ONLY; Duration of data set level copy 8593 DurationMs *int32 `json:"durationMs,omitempty"` 8594 // EndTime - READ-ONLY; End time of data set level copy 8595 EndTime *date.Time `json:"endTime,omitempty"` 8596 // FilesRead - READ-ONLY; The number of files read from the source data set 8597 FilesRead *int64 `json:"filesRead,omitempty"` 8598 // FilesWritten - READ-ONLY; The number of files written into the sink data set 8599 FilesWritten *int64 `json:"filesWritten,omitempty"` 8600 // Message - READ-ONLY; Error message if any 8601 Message *string `json:"message,omitempty"` 8602 // Name - READ-ONLY; Name of the data set 8603 Name *string `json:"name,omitempty"` 8604 // RowsCopied - READ-ONLY; The number of files copied into the sink data set 8605 RowsCopied *int64 `json:"rowsCopied,omitempty"` 8606 // RowsRead - READ-ONLY; The number of rows read from the source data set. 8607 RowsRead *int64 `json:"rowsRead,omitempty"` 8608 // SizeRead - READ-ONLY; The size of the data read from the source data set in bytes 8609 SizeRead *int64 `json:"sizeRead,omitempty"` 8610 // SizeWritten - READ-ONLY; The size of the data written into the sink data set in bytes 8611 SizeWritten *int64 `json:"sizeWritten,omitempty"` 8612 // StartTime - READ-ONLY; Start time of data set level copy 8613 StartTime *date.Time `json:"startTime,omitempty"` 8614 // Status - READ-ONLY; Raw Status 8615 Status *string `json:"status,omitempty"` 8616 // VCore - READ-ONLY; The vCore units consumed for the data set synchronization 8617 VCore *int64 `json:"vCore,omitempty"` 8618} 8619 8620// MarshalJSON is the custom marshaler for SynchronizationDetails. 8621func (sd SynchronizationDetails) MarshalJSON() ([]byte, error) { 8622 objectMap := make(map[string]interface{}) 8623 return json.Marshal(objectMap) 8624} 8625 8626// SynchronizationDetailsList details of synchronization 8627type SynchronizationDetailsList struct { 8628 autorest.Response `json:"-"` 8629 // NextLink - The Url of next result page. 8630 NextLink *string `json:"nextLink,omitempty"` 8631 // Value - Collection of items of type DataTransferObjects. 8632 Value *[]SynchronizationDetails `json:"value,omitempty"` 8633} 8634 8635// SynchronizationDetailsListIterator provides access to a complete listing of SynchronizationDetails 8636// values. 8637type SynchronizationDetailsListIterator struct { 8638 i int 8639 page SynchronizationDetailsListPage 8640} 8641 8642// NextWithContext advances to the next value. If there was an error making 8643// the request the iterator does not advance and the error is returned. 8644func (iter *SynchronizationDetailsListIterator) NextWithContext(ctx context.Context) (err error) { 8645 if tracing.IsEnabled() { 8646 ctx = tracing.StartSpan(ctx, fqdn+"/SynchronizationDetailsListIterator.NextWithContext") 8647 defer func() { 8648 sc := -1 8649 if iter.Response().Response.Response != nil { 8650 sc = iter.Response().Response.Response.StatusCode 8651 } 8652 tracing.EndSpan(ctx, sc, err) 8653 }() 8654 } 8655 iter.i++ 8656 if iter.i < len(iter.page.Values()) { 8657 return nil 8658 } 8659 err = iter.page.NextWithContext(ctx) 8660 if err != nil { 8661 iter.i-- 8662 return err 8663 } 8664 iter.i = 0 8665 return nil 8666} 8667 8668// Next advances to the next value. If there was an error making 8669// the request the iterator does not advance and the error is returned. 8670// Deprecated: Use NextWithContext() instead. 8671func (iter *SynchronizationDetailsListIterator) Next() error { 8672 return iter.NextWithContext(context.Background()) 8673} 8674 8675// NotDone returns true if the enumeration should be started or is not yet complete. 8676func (iter SynchronizationDetailsListIterator) NotDone() bool { 8677 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8678} 8679 8680// Response returns the raw server response from the last page request. 8681func (iter SynchronizationDetailsListIterator) Response() SynchronizationDetailsList { 8682 return iter.page.Response() 8683} 8684 8685// Value returns the current value or a zero-initialized value if the 8686// iterator has advanced beyond the end of the collection. 8687func (iter SynchronizationDetailsListIterator) Value() SynchronizationDetails { 8688 if !iter.page.NotDone() { 8689 return SynchronizationDetails{} 8690 } 8691 return iter.page.Values()[iter.i] 8692} 8693 8694// Creates a new instance of the SynchronizationDetailsListIterator type. 8695func NewSynchronizationDetailsListIterator(page SynchronizationDetailsListPage) SynchronizationDetailsListIterator { 8696 return SynchronizationDetailsListIterator{page: page} 8697} 8698 8699// IsEmpty returns true if the ListResult contains no values. 8700func (sdl SynchronizationDetailsList) IsEmpty() bool { 8701 return sdl.Value == nil || len(*sdl.Value) == 0 8702} 8703 8704// hasNextLink returns true if the NextLink is not empty. 8705func (sdl SynchronizationDetailsList) hasNextLink() bool { 8706 return sdl.NextLink != nil && len(*sdl.NextLink) != 0 8707} 8708 8709// synchronizationDetailsListPreparer prepares a request to retrieve the next set of results. 8710// It returns nil if no more results exist. 8711func (sdl SynchronizationDetailsList) synchronizationDetailsListPreparer(ctx context.Context) (*http.Request, error) { 8712 if !sdl.hasNextLink() { 8713 return nil, nil 8714 } 8715 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8716 autorest.AsJSON(), 8717 autorest.AsGet(), 8718 autorest.WithBaseURL(to.String(sdl.NextLink))) 8719} 8720 8721// SynchronizationDetailsListPage contains a page of SynchronizationDetails values. 8722type SynchronizationDetailsListPage struct { 8723 fn func(context.Context, SynchronizationDetailsList) (SynchronizationDetailsList, error) 8724 sdl SynchronizationDetailsList 8725} 8726 8727// NextWithContext advances to the next page of values. If there was an error making 8728// the request the page does not advance and the error is returned. 8729func (page *SynchronizationDetailsListPage) NextWithContext(ctx context.Context) (err error) { 8730 if tracing.IsEnabled() { 8731 ctx = tracing.StartSpan(ctx, fqdn+"/SynchronizationDetailsListPage.NextWithContext") 8732 defer func() { 8733 sc := -1 8734 if page.Response().Response.Response != nil { 8735 sc = page.Response().Response.Response.StatusCode 8736 } 8737 tracing.EndSpan(ctx, sc, err) 8738 }() 8739 } 8740 for { 8741 next, err := page.fn(ctx, page.sdl) 8742 if err != nil { 8743 return err 8744 } 8745 page.sdl = next 8746 if !next.hasNextLink() || !next.IsEmpty() { 8747 break 8748 } 8749 } 8750 return nil 8751} 8752 8753// Next advances to the next page of values. If there was an error making 8754// the request the page does not advance and the error is returned. 8755// Deprecated: Use NextWithContext() instead. 8756func (page *SynchronizationDetailsListPage) Next() error { 8757 return page.NextWithContext(context.Background()) 8758} 8759 8760// NotDone returns true if the page enumeration should be started or is not yet complete. 8761func (page SynchronizationDetailsListPage) NotDone() bool { 8762 return !page.sdl.IsEmpty() 8763} 8764 8765// Response returns the raw server response from the last page request. 8766func (page SynchronizationDetailsListPage) Response() SynchronizationDetailsList { 8767 return page.sdl 8768} 8769 8770// Values returns the slice of values for the current page or nil if there are no values. 8771func (page SynchronizationDetailsListPage) Values() []SynchronizationDetails { 8772 if page.sdl.IsEmpty() { 8773 return nil 8774 } 8775 return *page.sdl.Value 8776} 8777 8778// Creates a new instance of the SynchronizationDetailsListPage type. 8779func NewSynchronizationDetailsListPage(cur SynchronizationDetailsList, getNextPage func(context.Context, SynchronizationDetailsList) (SynchronizationDetailsList, error)) SynchronizationDetailsListPage { 8780 return SynchronizationDetailsListPage{ 8781 fn: getNextPage, 8782 sdl: cur, 8783 } 8784} 8785 8786// BasicSynchronizationSetting a Synchronization Setting data transfer object. 8787type BasicSynchronizationSetting interface { 8788 AsScheduledSynchronizationSetting() (*ScheduledSynchronizationSetting, bool) 8789 AsSynchronizationSetting() (*SynchronizationSetting, bool) 8790} 8791 8792// SynchronizationSetting a Synchronization Setting data transfer object. 8793type SynchronizationSetting struct { 8794 autorest.Response `json:"-"` 8795 // Kind - Possible values include: 'KindBasicSynchronizationSettingKindSynchronizationSetting', 'KindBasicSynchronizationSettingKindScheduleBased' 8796 Kind KindBasicSynchronizationSetting `json:"kind,omitempty"` 8797 // ID - READ-ONLY; The resource id of the azure resource 8798 ID *string `json:"id,omitempty"` 8799 // Name - READ-ONLY; Name of the azure resource 8800 Name *string `json:"name,omitempty"` 8801 // Type - READ-ONLY; Type of the azure resource 8802 Type *string `json:"type,omitempty"` 8803} 8804 8805func unmarshalBasicSynchronizationSetting(body []byte) (BasicSynchronizationSetting, error) { 8806 var m map[string]interface{} 8807 err := json.Unmarshal(body, &m) 8808 if err != nil { 8809 return nil, err 8810 } 8811 8812 switch m["kind"] { 8813 case string(KindBasicSynchronizationSettingKindScheduleBased): 8814 var sss ScheduledSynchronizationSetting 8815 err := json.Unmarshal(body, &sss) 8816 return sss, err 8817 default: 8818 var ss SynchronizationSetting 8819 err := json.Unmarshal(body, &ss) 8820 return ss, err 8821 } 8822} 8823func unmarshalBasicSynchronizationSettingArray(body []byte) ([]BasicSynchronizationSetting, error) { 8824 var rawMessages []*json.RawMessage 8825 err := json.Unmarshal(body, &rawMessages) 8826 if err != nil { 8827 return nil, err 8828 } 8829 8830 ssArray := make([]BasicSynchronizationSetting, len(rawMessages)) 8831 8832 for index, rawMessage := range rawMessages { 8833 ss, err := unmarshalBasicSynchronizationSetting(*rawMessage) 8834 if err != nil { 8835 return nil, err 8836 } 8837 ssArray[index] = ss 8838 } 8839 return ssArray, nil 8840} 8841 8842// MarshalJSON is the custom marshaler for SynchronizationSetting. 8843func (ss SynchronizationSetting) MarshalJSON() ([]byte, error) { 8844 ss.Kind = KindBasicSynchronizationSettingKindSynchronizationSetting 8845 objectMap := make(map[string]interface{}) 8846 if ss.Kind != "" { 8847 objectMap["kind"] = ss.Kind 8848 } 8849 return json.Marshal(objectMap) 8850} 8851 8852// AsScheduledSynchronizationSetting is the BasicSynchronizationSetting implementation for SynchronizationSetting. 8853func (ss SynchronizationSetting) AsScheduledSynchronizationSetting() (*ScheduledSynchronizationSetting, bool) { 8854 return nil, false 8855} 8856 8857// AsSynchronizationSetting is the BasicSynchronizationSetting implementation for SynchronizationSetting. 8858func (ss SynchronizationSetting) AsSynchronizationSetting() (*SynchronizationSetting, bool) { 8859 return &ss, true 8860} 8861 8862// AsBasicSynchronizationSetting is the BasicSynchronizationSetting implementation for SynchronizationSetting. 8863func (ss SynchronizationSetting) AsBasicSynchronizationSetting() (BasicSynchronizationSetting, bool) { 8864 return &ss, true 8865} 8866 8867// SynchronizationSettingList list response for get Synchronization settings 8868type SynchronizationSettingList struct { 8869 autorest.Response `json:"-"` 8870 // NextLink - The Url of next result page. 8871 NextLink *string `json:"nextLink,omitempty"` 8872 // Value - Collection of items of type DataTransferObjects. 8873 Value *[]BasicSynchronizationSetting `json:"value,omitempty"` 8874} 8875 8876// UnmarshalJSON is the custom unmarshaler for SynchronizationSettingList struct. 8877func (ssl *SynchronizationSettingList) UnmarshalJSON(body []byte) error { 8878 var m map[string]*json.RawMessage 8879 err := json.Unmarshal(body, &m) 8880 if err != nil { 8881 return err 8882 } 8883 for k, v := range m { 8884 switch k { 8885 case "nextLink": 8886 if v != nil { 8887 var nextLink string 8888 err = json.Unmarshal(*v, &nextLink) 8889 if err != nil { 8890 return err 8891 } 8892 ssl.NextLink = &nextLink 8893 } 8894 case "value": 8895 if v != nil { 8896 value, err := unmarshalBasicSynchronizationSettingArray(*v) 8897 if err != nil { 8898 return err 8899 } 8900 ssl.Value = &value 8901 } 8902 } 8903 } 8904 8905 return nil 8906} 8907 8908// SynchronizationSettingListIterator provides access to a complete listing of SynchronizationSetting 8909// values. 8910type SynchronizationSettingListIterator struct { 8911 i int 8912 page SynchronizationSettingListPage 8913} 8914 8915// NextWithContext advances to the next value. If there was an error making 8916// the request the iterator does not advance and the error is returned. 8917func (iter *SynchronizationSettingListIterator) NextWithContext(ctx context.Context) (err error) { 8918 if tracing.IsEnabled() { 8919 ctx = tracing.StartSpan(ctx, fqdn+"/SynchronizationSettingListIterator.NextWithContext") 8920 defer func() { 8921 sc := -1 8922 if iter.Response().Response.Response != nil { 8923 sc = iter.Response().Response.Response.StatusCode 8924 } 8925 tracing.EndSpan(ctx, sc, err) 8926 }() 8927 } 8928 iter.i++ 8929 if iter.i < len(iter.page.Values()) { 8930 return nil 8931 } 8932 err = iter.page.NextWithContext(ctx) 8933 if err != nil { 8934 iter.i-- 8935 return err 8936 } 8937 iter.i = 0 8938 return nil 8939} 8940 8941// Next advances to the next value. If there was an error making 8942// the request the iterator does not advance and the error is returned. 8943// Deprecated: Use NextWithContext() instead. 8944func (iter *SynchronizationSettingListIterator) Next() error { 8945 return iter.NextWithContext(context.Background()) 8946} 8947 8948// NotDone returns true if the enumeration should be started or is not yet complete. 8949func (iter SynchronizationSettingListIterator) NotDone() bool { 8950 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8951} 8952 8953// Response returns the raw server response from the last page request. 8954func (iter SynchronizationSettingListIterator) Response() SynchronizationSettingList { 8955 return iter.page.Response() 8956} 8957 8958// Value returns the current value or a zero-initialized value if the 8959// iterator has advanced beyond the end of the collection. 8960func (iter SynchronizationSettingListIterator) Value() BasicSynchronizationSetting { 8961 if !iter.page.NotDone() { 8962 return SynchronizationSetting{} 8963 } 8964 return iter.page.Values()[iter.i] 8965} 8966 8967// Creates a new instance of the SynchronizationSettingListIterator type. 8968func NewSynchronizationSettingListIterator(page SynchronizationSettingListPage) SynchronizationSettingListIterator { 8969 return SynchronizationSettingListIterator{page: page} 8970} 8971 8972// IsEmpty returns true if the ListResult contains no values. 8973func (ssl SynchronizationSettingList) IsEmpty() bool { 8974 return ssl.Value == nil || len(*ssl.Value) == 0 8975} 8976 8977// hasNextLink returns true if the NextLink is not empty. 8978func (ssl SynchronizationSettingList) hasNextLink() bool { 8979 return ssl.NextLink != nil && len(*ssl.NextLink) != 0 8980} 8981 8982// synchronizationSettingListPreparer prepares a request to retrieve the next set of results. 8983// It returns nil if no more results exist. 8984func (ssl SynchronizationSettingList) synchronizationSettingListPreparer(ctx context.Context) (*http.Request, error) { 8985 if !ssl.hasNextLink() { 8986 return nil, nil 8987 } 8988 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8989 autorest.AsJSON(), 8990 autorest.AsGet(), 8991 autorest.WithBaseURL(to.String(ssl.NextLink))) 8992} 8993 8994// SynchronizationSettingListPage contains a page of BasicSynchronizationSetting values. 8995type SynchronizationSettingListPage struct { 8996 fn func(context.Context, SynchronizationSettingList) (SynchronizationSettingList, error) 8997 ssl SynchronizationSettingList 8998} 8999 9000// NextWithContext advances to the next page of values. If there was an error making 9001// the request the page does not advance and the error is returned. 9002func (page *SynchronizationSettingListPage) NextWithContext(ctx context.Context) (err error) { 9003 if tracing.IsEnabled() { 9004 ctx = tracing.StartSpan(ctx, fqdn+"/SynchronizationSettingListPage.NextWithContext") 9005 defer func() { 9006 sc := -1 9007 if page.Response().Response.Response != nil { 9008 sc = page.Response().Response.Response.StatusCode 9009 } 9010 tracing.EndSpan(ctx, sc, err) 9011 }() 9012 } 9013 for { 9014 next, err := page.fn(ctx, page.ssl) 9015 if err != nil { 9016 return err 9017 } 9018 page.ssl = next 9019 if !next.hasNextLink() || !next.IsEmpty() { 9020 break 9021 } 9022 } 9023 return nil 9024} 9025 9026// Next advances to the next page of values. If there was an error making 9027// the request the page does not advance and the error is returned. 9028// Deprecated: Use NextWithContext() instead. 9029func (page *SynchronizationSettingListPage) Next() error { 9030 return page.NextWithContext(context.Background()) 9031} 9032 9033// NotDone returns true if the page enumeration should be started or is not yet complete. 9034func (page SynchronizationSettingListPage) NotDone() bool { 9035 return !page.ssl.IsEmpty() 9036} 9037 9038// Response returns the raw server response from the last page request. 9039func (page SynchronizationSettingListPage) Response() SynchronizationSettingList { 9040 return page.ssl 9041} 9042 9043// Values returns the slice of values for the current page or nil if there are no values. 9044func (page SynchronizationSettingListPage) Values() []BasicSynchronizationSetting { 9045 if page.ssl.IsEmpty() { 9046 return nil 9047 } 9048 return *page.ssl.Value 9049} 9050 9051// Creates a new instance of the SynchronizationSettingListPage type. 9052func NewSynchronizationSettingListPage(cur SynchronizationSettingList, getNextPage func(context.Context, SynchronizationSettingList) (SynchronizationSettingList, error)) SynchronizationSettingListPage { 9053 return SynchronizationSettingListPage{ 9054 fn: getNextPage, 9055 ssl: cur, 9056 } 9057} 9058 9059// SynchronizationSettingModel ... 9060type SynchronizationSettingModel struct { 9061 autorest.Response `json:"-"` 9062 Value BasicSynchronizationSetting `json:"value,omitempty"` 9063} 9064 9065// UnmarshalJSON is the custom unmarshaler for SynchronizationSettingModel struct. 9066func (ssm *SynchronizationSettingModel) UnmarshalJSON(body []byte) error { 9067 ss, err := unmarshalBasicSynchronizationSetting(body) 9068 if err != nil { 9069 return err 9070 } 9071 ssm.Value = ss 9072 9073 return nil 9074} 9075 9076// SynchronizationSettingsDeleteFuture an abstraction for monitoring and retrieving the results of a 9077// long-running operation. 9078type SynchronizationSettingsDeleteFuture struct { 9079 azure.FutureAPI 9080 // Result returns the result of the asynchronous operation. 9081 // If the operation has not completed it will return an error. 9082 Result func(SynchronizationSettingsClient) (OperationResponse, error) 9083} 9084 9085// UnmarshalJSON is the custom unmarshaller for CreateFuture. 9086func (future *SynchronizationSettingsDeleteFuture) UnmarshalJSON(body []byte) error { 9087 var azFuture azure.Future 9088 if err := json.Unmarshal(body, &azFuture); err != nil { 9089 return err 9090 } 9091 future.FutureAPI = &azFuture 9092 future.Result = future.result 9093 return nil 9094} 9095 9096// result is the default implementation for SynchronizationSettingsDeleteFuture.Result. 9097func (future *SynchronizationSettingsDeleteFuture) result(client SynchronizationSettingsClient) (or OperationResponse, err error) { 9098 var done bool 9099 done, err = future.DoneWithContext(context.Background(), client) 9100 if err != nil { 9101 err = autorest.NewErrorWithError(err, "datashare.SynchronizationSettingsDeleteFuture", "Result", future.Response(), "Polling failure") 9102 return 9103 } 9104 if !done { 9105 or.Response.Response = future.Response() 9106 err = azure.NewAsyncOpIncompleteError("datashare.SynchronizationSettingsDeleteFuture") 9107 return 9108 } 9109 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9110 if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { 9111 or, err = client.DeleteResponder(or.Response.Response) 9112 if err != nil { 9113 err = autorest.NewErrorWithError(err, "datashare.SynchronizationSettingsDeleteFuture", "Result", or.Response.Response, "Failure responding to request") 9114 } 9115 } 9116 return 9117} 9118 9119// Synchronize payload for the synchronizing the data. 9120type Synchronize struct { 9121 // SynchronizationMode - Mode of synchronization used in triggers and snapshot sync. Incremental by default. Possible values include: 'Incremental', 'FullSync' 9122 SynchronizationMode SynchronizationMode `json:"synchronizationMode,omitempty"` 9123} 9124 9125// BasicTrigger a Trigger data transfer object. 9126type BasicTrigger interface { 9127 AsScheduledTrigger() (*ScheduledTrigger, bool) 9128 AsTrigger() (*Trigger, bool) 9129} 9130 9131// Trigger a Trigger data transfer object. 9132type Trigger struct { 9133 autorest.Response `json:"-"` 9134 // Kind - Possible values include: 'KindBasicTriggerKindTrigger', 'KindBasicTriggerKindScheduleBased' 9135 Kind KindBasicTrigger `json:"kind,omitempty"` 9136 // ID - READ-ONLY; The resource id of the azure resource 9137 ID *string `json:"id,omitempty"` 9138 // Name - READ-ONLY; Name of the azure resource 9139 Name *string `json:"name,omitempty"` 9140 // Type - READ-ONLY; Type of the azure resource 9141 Type *string `json:"type,omitempty"` 9142} 9143 9144func unmarshalBasicTrigger(body []byte) (BasicTrigger, error) { 9145 var m map[string]interface{} 9146 err := json.Unmarshal(body, &m) 9147 if err != nil { 9148 return nil, err 9149 } 9150 9151 switch m["kind"] { 9152 case string(KindBasicTriggerKindScheduleBased): 9153 var st ScheduledTrigger 9154 err := json.Unmarshal(body, &st) 9155 return st, err 9156 default: 9157 var t Trigger 9158 err := json.Unmarshal(body, &t) 9159 return t, err 9160 } 9161} 9162func unmarshalBasicTriggerArray(body []byte) ([]BasicTrigger, error) { 9163 var rawMessages []*json.RawMessage 9164 err := json.Unmarshal(body, &rawMessages) 9165 if err != nil { 9166 return nil, err 9167 } 9168 9169 tArray := make([]BasicTrigger, len(rawMessages)) 9170 9171 for index, rawMessage := range rawMessages { 9172 t, err := unmarshalBasicTrigger(*rawMessage) 9173 if err != nil { 9174 return nil, err 9175 } 9176 tArray[index] = t 9177 } 9178 return tArray, nil 9179} 9180 9181// MarshalJSON is the custom marshaler for Trigger. 9182func (t Trigger) MarshalJSON() ([]byte, error) { 9183 t.Kind = KindBasicTriggerKindTrigger 9184 objectMap := make(map[string]interface{}) 9185 if t.Kind != "" { 9186 objectMap["kind"] = t.Kind 9187 } 9188 return json.Marshal(objectMap) 9189} 9190 9191// AsScheduledTrigger is the BasicTrigger implementation for Trigger. 9192func (t Trigger) AsScheduledTrigger() (*ScheduledTrigger, bool) { 9193 return nil, false 9194} 9195 9196// AsTrigger is the BasicTrigger implementation for Trigger. 9197func (t Trigger) AsTrigger() (*Trigger, bool) { 9198 return &t, true 9199} 9200 9201// AsBasicTrigger is the BasicTrigger implementation for Trigger. 9202func (t Trigger) AsBasicTrigger() (BasicTrigger, bool) { 9203 return &t, true 9204} 9205 9206// TriggerList list response for get triggers 9207type TriggerList struct { 9208 autorest.Response `json:"-"` 9209 // NextLink - The Url of next result page. 9210 NextLink *string `json:"nextLink,omitempty"` 9211 // Value - Collection of items of type DataTransferObjects. 9212 Value *[]BasicTrigger `json:"value,omitempty"` 9213} 9214 9215// UnmarshalJSON is the custom unmarshaler for TriggerList struct. 9216func (tl *TriggerList) UnmarshalJSON(body []byte) error { 9217 var m map[string]*json.RawMessage 9218 err := json.Unmarshal(body, &m) 9219 if err != nil { 9220 return err 9221 } 9222 for k, v := range m { 9223 switch k { 9224 case "nextLink": 9225 if v != nil { 9226 var nextLink string 9227 err = json.Unmarshal(*v, &nextLink) 9228 if err != nil { 9229 return err 9230 } 9231 tl.NextLink = &nextLink 9232 } 9233 case "value": 9234 if v != nil { 9235 value, err := unmarshalBasicTriggerArray(*v) 9236 if err != nil { 9237 return err 9238 } 9239 tl.Value = &value 9240 } 9241 } 9242 } 9243 9244 return nil 9245} 9246 9247// TriggerListIterator provides access to a complete listing of Trigger values. 9248type TriggerListIterator struct { 9249 i int 9250 page TriggerListPage 9251} 9252 9253// NextWithContext advances to the next value. If there was an error making 9254// the request the iterator does not advance and the error is returned. 9255func (iter *TriggerListIterator) NextWithContext(ctx context.Context) (err error) { 9256 if tracing.IsEnabled() { 9257 ctx = tracing.StartSpan(ctx, fqdn+"/TriggerListIterator.NextWithContext") 9258 defer func() { 9259 sc := -1 9260 if iter.Response().Response.Response != nil { 9261 sc = iter.Response().Response.Response.StatusCode 9262 } 9263 tracing.EndSpan(ctx, sc, err) 9264 }() 9265 } 9266 iter.i++ 9267 if iter.i < len(iter.page.Values()) { 9268 return nil 9269 } 9270 err = iter.page.NextWithContext(ctx) 9271 if err != nil { 9272 iter.i-- 9273 return err 9274 } 9275 iter.i = 0 9276 return nil 9277} 9278 9279// Next advances to the next value. If there was an error making 9280// the request the iterator does not advance and the error is returned. 9281// Deprecated: Use NextWithContext() instead. 9282func (iter *TriggerListIterator) Next() error { 9283 return iter.NextWithContext(context.Background()) 9284} 9285 9286// NotDone returns true if the enumeration should be started or is not yet complete. 9287func (iter TriggerListIterator) NotDone() bool { 9288 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9289} 9290 9291// Response returns the raw server response from the last page request. 9292func (iter TriggerListIterator) Response() TriggerList { 9293 return iter.page.Response() 9294} 9295 9296// Value returns the current value or a zero-initialized value if the 9297// iterator has advanced beyond the end of the collection. 9298func (iter TriggerListIterator) Value() BasicTrigger { 9299 if !iter.page.NotDone() { 9300 return Trigger{} 9301 } 9302 return iter.page.Values()[iter.i] 9303} 9304 9305// Creates a new instance of the TriggerListIterator type. 9306func NewTriggerListIterator(page TriggerListPage) TriggerListIterator { 9307 return TriggerListIterator{page: page} 9308} 9309 9310// IsEmpty returns true if the ListResult contains no values. 9311func (tl TriggerList) IsEmpty() bool { 9312 return tl.Value == nil || len(*tl.Value) == 0 9313} 9314 9315// hasNextLink returns true if the NextLink is not empty. 9316func (tl TriggerList) hasNextLink() bool { 9317 return tl.NextLink != nil && len(*tl.NextLink) != 0 9318} 9319 9320// triggerListPreparer prepares a request to retrieve the next set of results. 9321// It returns nil if no more results exist. 9322func (tl TriggerList) triggerListPreparer(ctx context.Context) (*http.Request, error) { 9323 if !tl.hasNextLink() { 9324 return nil, nil 9325 } 9326 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9327 autorest.AsJSON(), 9328 autorest.AsGet(), 9329 autorest.WithBaseURL(to.String(tl.NextLink))) 9330} 9331 9332// TriggerListPage contains a page of BasicTrigger values. 9333type TriggerListPage struct { 9334 fn func(context.Context, TriggerList) (TriggerList, error) 9335 tl TriggerList 9336} 9337 9338// NextWithContext advances to the next page of values. If there was an error making 9339// the request the page does not advance and the error is returned. 9340func (page *TriggerListPage) NextWithContext(ctx context.Context) (err error) { 9341 if tracing.IsEnabled() { 9342 ctx = tracing.StartSpan(ctx, fqdn+"/TriggerListPage.NextWithContext") 9343 defer func() { 9344 sc := -1 9345 if page.Response().Response.Response != nil { 9346 sc = page.Response().Response.Response.StatusCode 9347 } 9348 tracing.EndSpan(ctx, sc, err) 9349 }() 9350 } 9351 for { 9352 next, err := page.fn(ctx, page.tl) 9353 if err != nil { 9354 return err 9355 } 9356 page.tl = next 9357 if !next.hasNextLink() || !next.IsEmpty() { 9358 break 9359 } 9360 } 9361 return nil 9362} 9363 9364// Next advances to the next page of values. If there was an error making 9365// the request the page does not advance and the error is returned. 9366// Deprecated: Use NextWithContext() instead. 9367func (page *TriggerListPage) Next() error { 9368 return page.NextWithContext(context.Background()) 9369} 9370 9371// NotDone returns true if the page enumeration should be started or is not yet complete. 9372func (page TriggerListPage) NotDone() bool { 9373 return !page.tl.IsEmpty() 9374} 9375 9376// Response returns the raw server response from the last page request. 9377func (page TriggerListPage) Response() TriggerList { 9378 return page.tl 9379} 9380 9381// Values returns the slice of values for the current page or nil if there are no values. 9382func (page TriggerListPage) Values() []BasicTrigger { 9383 if page.tl.IsEmpty() { 9384 return nil 9385 } 9386 return *page.tl.Value 9387} 9388 9389// Creates a new instance of the TriggerListPage type. 9390func NewTriggerListPage(cur TriggerList, getNextPage func(context.Context, TriggerList) (TriggerList, error)) TriggerListPage { 9391 return TriggerListPage{ 9392 fn: getNextPage, 9393 tl: cur, 9394 } 9395} 9396 9397// TriggerModel ... 9398type TriggerModel struct { 9399 autorest.Response `json:"-"` 9400 Value BasicTrigger `json:"value,omitempty"` 9401} 9402 9403// UnmarshalJSON is the custom unmarshaler for TriggerModel struct. 9404func (tm *TriggerModel) UnmarshalJSON(body []byte) error { 9405 t, err := unmarshalBasicTrigger(body) 9406 if err != nil { 9407 return err 9408 } 9409 tm.Value = t 9410 9411 return nil 9412} 9413 9414// TriggersCreateFuture an abstraction for monitoring and retrieving the results of a long-running 9415// operation. 9416type TriggersCreateFuture struct { 9417 azure.FutureAPI 9418 // Result returns the result of the asynchronous operation. 9419 // If the operation has not completed it will return an error. 9420 Result func(TriggersClient) (TriggerModel, error) 9421} 9422 9423// UnmarshalJSON is the custom unmarshaller for CreateFuture. 9424func (future *TriggersCreateFuture) UnmarshalJSON(body []byte) error { 9425 var azFuture azure.Future 9426 if err := json.Unmarshal(body, &azFuture); err != nil { 9427 return err 9428 } 9429 future.FutureAPI = &azFuture 9430 future.Result = future.result 9431 return nil 9432} 9433 9434// result is the default implementation for TriggersCreateFuture.Result. 9435func (future *TriggersCreateFuture) result(client TriggersClient) (tm TriggerModel, err error) { 9436 var done bool 9437 done, err = future.DoneWithContext(context.Background(), client) 9438 if err != nil { 9439 err = autorest.NewErrorWithError(err, "datashare.TriggersCreateFuture", "Result", future.Response(), "Polling failure") 9440 return 9441 } 9442 if !done { 9443 tm.Response.Response = future.Response() 9444 err = azure.NewAsyncOpIncompleteError("datashare.TriggersCreateFuture") 9445 return 9446 } 9447 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9448 if tm.Response.Response, err = future.GetResult(sender); err == nil && tm.Response.Response.StatusCode != http.StatusNoContent { 9449 tm, err = client.CreateResponder(tm.Response.Response) 9450 if err != nil { 9451 err = autorest.NewErrorWithError(err, "datashare.TriggersCreateFuture", "Result", tm.Response.Response, "Failure responding to request") 9452 } 9453 } 9454 return 9455} 9456 9457// TriggersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 9458// operation. 9459type TriggersDeleteFuture struct { 9460 azure.FutureAPI 9461 // Result returns the result of the asynchronous operation. 9462 // If the operation has not completed it will return an error. 9463 Result func(TriggersClient) (OperationResponse, error) 9464} 9465 9466// UnmarshalJSON is the custom unmarshaller for CreateFuture. 9467func (future *TriggersDeleteFuture) UnmarshalJSON(body []byte) error { 9468 var azFuture azure.Future 9469 if err := json.Unmarshal(body, &azFuture); err != nil { 9470 return err 9471 } 9472 future.FutureAPI = &azFuture 9473 future.Result = future.result 9474 return nil 9475} 9476 9477// result is the default implementation for TriggersDeleteFuture.Result. 9478func (future *TriggersDeleteFuture) result(client TriggersClient) (or OperationResponse, err error) { 9479 var done bool 9480 done, err = future.DoneWithContext(context.Background(), client) 9481 if err != nil { 9482 err = autorest.NewErrorWithError(err, "datashare.TriggersDeleteFuture", "Result", future.Response(), "Polling failure") 9483 return 9484 } 9485 if !done { 9486 or.Response.Response = future.Response() 9487 err = azure.NewAsyncOpIncompleteError("datashare.TriggersDeleteFuture") 9488 return 9489 } 9490 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9491 if or.Response.Response, err = future.GetResult(sender); err == nil && or.Response.Response.StatusCode != http.StatusNoContent { 9492 or, err = client.DeleteResponder(or.Response.Response) 9493 if err != nil { 9494 err = autorest.NewErrorWithError(err, "datashare.TriggersDeleteFuture", "Result", or.Response.Response, "Failure responding to request") 9495 } 9496 } 9497 return 9498} 9499