1package account 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 10 "context" 11 "encoding/json" 12 "github.com/Azure/go-autorest/autorest" 13 "github.com/Azure/go-autorest/autorest/azure" 14 "github.com/Azure/go-autorest/autorest/date" 15 "github.com/Azure/go-autorest/autorest/to" 16 "github.com/Azure/go-autorest/tracing" 17 "github.com/gofrs/uuid" 18 "net/http" 19) 20 21// The package's fully qualified name. 22const fqdn = "github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account" 23 24// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running 25// operation. 26type AccountsCreateFutureType struct { 27 azure.FutureAPI 28 // Result returns the result of the asynchronous operation. 29 // If the operation has not completed it will return an error. 30 Result func(AccountsClient) (DataLakeStoreAccount, error) 31} 32 33// UnmarshalJSON is the custom unmarshaller for CreateFuture. 34func (future *AccountsCreateFutureType) UnmarshalJSON(body []byte) error { 35 var azFuture azure.Future 36 if err := json.Unmarshal(body, &azFuture); err != nil { 37 return err 38 } 39 future.FutureAPI = &azFuture 40 future.Result = future.result 41 return nil 42} 43 44// result is the default implementation for AccountsCreateFutureType.Result. 45func (future *AccountsCreateFutureType) result(client AccountsClient) (dlsa DataLakeStoreAccount, err error) { 46 var done bool 47 done, err = future.DoneWithContext(context.Background(), client) 48 if err != nil { 49 err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", future.Response(), "Polling failure") 50 return 51 } 52 if !done { 53 dlsa.Response.Response = future.Response() 54 err = azure.NewAsyncOpIncompleteError("account.AccountsCreateFutureType") 55 return 56 } 57 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 58 if dlsa.Response.Response, err = future.GetResult(sender); err == nil && dlsa.Response.Response.StatusCode != http.StatusNoContent { 59 dlsa, err = client.CreateResponder(dlsa.Response.Response) 60 if err != nil { 61 err = autorest.NewErrorWithError(err, "account.AccountsCreateFutureType", "Result", dlsa.Response.Response, "Failure responding to request") 62 } 63 } 64 return 65} 66 67// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running 68// operation. 69type AccountsDeleteFutureType struct { 70 azure.FutureAPI 71 // Result returns the result of the asynchronous operation. 72 // If the operation has not completed it will return an error. 73 Result func(AccountsClient) (autorest.Response, error) 74} 75 76// UnmarshalJSON is the custom unmarshaller for CreateFuture. 77func (future *AccountsDeleteFutureType) UnmarshalJSON(body []byte) error { 78 var azFuture azure.Future 79 if err := json.Unmarshal(body, &azFuture); err != nil { 80 return err 81 } 82 future.FutureAPI = &azFuture 83 future.Result = future.result 84 return nil 85} 86 87// result is the default implementation for AccountsDeleteFutureType.Result. 88func (future *AccountsDeleteFutureType) result(client AccountsClient) (ar autorest.Response, err error) { 89 var done bool 90 done, err = future.DoneWithContext(context.Background(), client) 91 if err != nil { 92 err = autorest.NewErrorWithError(err, "account.AccountsDeleteFutureType", "Result", future.Response(), "Polling failure") 93 return 94 } 95 if !done { 96 ar.Response = future.Response() 97 err = azure.NewAsyncOpIncompleteError("account.AccountsDeleteFutureType") 98 return 99 } 100 ar.Response = future.Response() 101 return 102} 103 104// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running 105// operation. 106type AccountsUpdateFutureType struct { 107 azure.FutureAPI 108 // Result returns the result of the asynchronous operation. 109 // If the operation has not completed it will return an error. 110 Result func(AccountsClient) (DataLakeStoreAccount, error) 111} 112 113// UnmarshalJSON is the custom unmarshaller for CreateFuture. 114func (future *AccountsUpdateFutureType) UnmarshalJSON(body []byte) error { 115 var azFuture azure.Future 116 if err := json.Unmarshal(body, &azFuture); err != nil { 117 return err 118 } 119 future.FutureAPI = &azFuture 120 future.Result = future.result 121 return nil 122} 123 124// result is the default implementation for AccountsUpdateFutureType.Result. 125func (future *AccountsUpdateFutureType) result(client AccountsClient) (dlsa DataLakeStoreAccount, err error) { 126 var done bool 127 done, err = future.DoneWithContext(context.Background(), client) 128 if err != nil { 129 err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", future.Response(), "Polling failure") 130 return 131 } 132 if !done { 133 dlsa.Response.Response = future.Response() 134 err = azure.NewAsyncOpIncompleteError("account.AccountsUpdateFutureType") 135 return 136 } 137 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 138 if dlsa.Response.Response, err = future.GetResult(sender); err == nil && dlsa.Response.Response.StatusCode != http.StatusNoContent { 139 dlsa, err = client.UpdateResponder(dlsa.Response.Response) 140 if err != nil { 141 err = autorest.NewErrorWithError(err, "account.AccountsUpdateFutureType", "Result", dlsa.Response.Response, "Failure responding to request") 142 } 143 } 144 return 145} 146 147// CapabilityInformation subscription-level properties and limits for Data Lake Store. 148type CapabilityInformation struct { 149 autorest.Response `json:"-"` 150 // SubscriptionID - READ-ONLY; The subscription credentials that uniquely identifies the subscription. 151 SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"` 152 // State - READ-ONLY; The subscription state. Possible values include: 'SubscriptionStateRegistered', 'SubscriptionStateSuspended', 'SubscriptionStateDeleted', 'SubscriptionStateUnregistered', 'SubscriptionStateWarned' 153 State SubscriptionState `json:"state,omitempty"` 154 // MaxAccountCount - READ-ONLY; The maximum supported number of accounts under this subscription. 155 MaxAccountCount *int32 `json:"maxAccountCount,omitempty"` 156 // AccountCount - READ-ONLY; The current number of accounts under this subscription. 157 AccountCount *int32 `json:"accountCount,omitempty"` 158 // MigrationState - READ-ONLY; The Boolean value of true or false to indicate the maintenance state. 159 MigrationState *bool `json:"migrationState,omitempty"` 160} 161 162// MarshalJSON is the custom marshaler for CapabilityInformation. 163func (ci CapabilityInformation) MarshalJSON() ([]byte, error) { 164 objectMap := make(map[string]interface{}) 165 return json.Marshal(objectMap) 166} 167 168// CheckNameAvailabilityParameters data Lake Store account name availability check parameters. 169type CheckNameAvailabilityParameters struct { 170 // Name - The Data Lake Store name to check availability for. 171 Name *string `json:"name,omitempty"` 172 // Type - The resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeStore/accounts 173 Type *string `json:"type,omitempty"` 174} 175 176// CreateDataLakeStoreAccountParameters ... 177type CreateDataLakeStoreAccountParameters struct { 178 // Location - The resource location. 179 Location *string `json:"location,omitempty"` 180 // Tags - The resource tags. 181 Tags map[string]*string `json:"tags"` 182 // Identity - The Key Vault encryption identity, if any. 183 Identity *EncryptionIdentity `json:"identity,omitempty"` 184 // CreateDataLakeStoreAccountProperties - The Data Lake Store account properties to use for creating. 185 *CreateDataLakeStoreAccountProperties `json:"properties,omitempty"` 186} 187 188// MarshalJSON is the custom marshaler for CreateDataLakeStoreAccountParameters. 189func (cdlsap CreateDataLakeStoreAccountParameters) MarshalJSON() ([]byte, error) { 190 objectMap := make(map[string]interface{}) 191 if cdlsap.Location != nil { 192 objectMap["location"] = cdlsap.Location 193 } 194 if cdlsap.Tags != nil { 195 objectMap["tags"] = cdlsap.Tags 196 } 197 if cdlsap.Identity != nil { 198 objectMap["identity"] = cdlsap.Identity 199 } 200 if cdlsap.CreateDataLakeStoreAccountProperties != nil { 201 objectMap["properties"] = cdlsap.CreateDataLakeStoreAccountProperties 202 } 203 return json.Marshal(objectMap) 204} 205 206// UnmarshalJSON is the custom unmarshaler for CreateDataLakeStoreAccountParameters struct. 207func (cdlsap *CreateDataLakeStoreAccountParameters) UnmarshalJSON(body []byte) error { 208 var m map[string]*json.RawMessage 209 err := json.Unmarshal(body, &m) 210 if err != nil { 211 return err 212 } 213 for k, v := range m { 214 switch k { 215 case "location": 216 if v != nil { 217 var location string 218 err = json.Unmarshal(*v, &location) 219 if err != nil { 220 return err 221 } 222 cdlsap.Location = &location 223 } 224 case "tags": 225 if v != nil { 226 var tags map[string]*string 227 err = json.Unmarshal(*v, &tags) 228 if err != nil { 229 return err 230 } 231 cdlsap.Tags = tags 232 } 233 case "identity": 234 if v != nil { 235 var identity EncryptionIdentity 236 err = json.Unmarshal(*v, &identity) 237 if err != nil { 238 return err 239 } 240 cdlsap.Identity = &identity 241 } 242 case "properties": 243 if v != nil { 244 var createDataLakeStoreAccountProperties CreateDataLakeStoreAccountProperties 245 err = json.Unmarshal(*v, &createDataLakeStoreAccountProperties) 246 if err != nil { 247 return err 248 } 249 cdlsap.CreateDataLakeStoreAccountProperties = &createDataLakeStoreAccountProperties 250 } 251 } 252 } 253 254 return nil 255} 256 257// CreateDataLakeStoreAccountProperties ... 258type CreateDataLakeStoreAccountProperties struct { 259 // DefaultGroup - The default owner group for all new folders and files created in the Data Lake Store account. 260 DefaultGroup *string `json:"defaultGroup,omitempty"` 261 // EncryptionConfig - The Key Vault encryption configuration. 262 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` 263 // EncryptionState - The current state of encryption for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' 264 EncryptionState EncryptionState `json:"encryptionState,omitempty"` 265 // FirewallRules - The list of firewall rules associated with this Data Lake Store account. 266 FirewallRules *[]CreateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"` 267 // VirtualNetworkRules - The list of virtual network rules associated with this Data Lake Store account. 268 VirtualNetworkRules *[]CreateVirtualNetworkRuleWithAccountParameters `json:"virtualNetworkRules,omitempty"` 269 // FirewallState - The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' 270 FirewallState FirewallState `json:"firewallState,omitempty"` 271 // FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'FirewallAllowAzureIpsStateEnabled', 'FirewallAllowAzureIpsStateDisabled' 272 FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` 273 // TrustedIDProviders - The list of trusted identity providers associated with this Data Lake Store account. 274 TrustedIDProviders *[]CreateTrustedIDProviderWithAccountParameters `json:"trustedIdProviders,omitempty"` 275 // TrustedIDProviderState - The current state of the trusted identity provider feature for this Data Lake Store account. Possible values include: 'TrustedIDProviderStateEnabled', 'TrustedIDProviderStateDisabled' 276 TrustedIDProviderState TrustedIDProviderState `json:"trustedIdProviderState,omitempty"` 277 // NewTier - The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment1TB', 'Commitment10TB', 'Commitment100TB', 'Commitment500TB', 'Commitment1PB', 'Commitment5PB' 278 NewTier TierType `json:"newTier,omitempty"` 279} 280 281// CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating 282// a new Data Lake Store account. 283type CreateFirewallRuleWithAccountParameters struct { 284 // Name - The unique name of the firewall rule to create. 285 Name *string `json:"name,omitempty"` 286 // CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule. 287 *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"` 288} 289 290// MarshalJSON is the custom marshaler for CreateFirewallRuleWithAccountParameters. 291func (cfrwap CreateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) { 292 objectMap := make(map[string]interface{}) 293 if cfrwap.Name != nil { 294 objectMap["name"] = cfrwap.Name 295 } 296 if cfrwap.CreateOrUpdateFirewallRuleProperties != nil { 297 objectMap["properties"] = cfrwap.CreateOrUpdateFirewallRuleProperties 298 } 299 return json.Marshal(objectMap) 300} 301 302// UnmarshalJSON is the custom unmarshaler for CreateFirewallRuleWithAccountParameters struct. 303func (cfrwap *CreateFirewallRuleWithAccountParameters) UnmarshalJSON(body []byte) error { 304 var m map[string]*json.RawMessage 305 err := json.Unmarshal(body, &m) 306 if err != nil { 307 return err 308 } 309 for k, v := range m { 310 switch k { 311 case "name": 312 if v != nil { 313 var name string 314 err = json.Unmarshal(*v, &name) 315 if err != nil { 316 return err 317 } 318 cfrwap.Name = &name 319 } 320 case "properties": 321 if v != nil { 322 var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties 323 err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties) 324 if err != nil { 325 return err 326 } 327 cfrwap.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties 328 } 329 } 330 } 331 332 return nil 333} 334 335// CreateOrUpdateFirewallRuleParameters the parameters used to create a new firewall rule. 336type CreateOrUpdateFirewallRuleParameters struct { 337 // CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule. 338 *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"` 339} 340 341// MarshalJSON is the custom marshaler for CreateOrUpdateFirewallRuleParameters. 342func (coufrp CreateOrUpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) { 343 objectMap := make(map[string]interface{}) 344 if coufrp.CreateOrUpdateFirewallRuleProperties != nil { 345 objectMap["properties"] = coufrp.CreateOrUpdateFirewallRuleProperties 346 } 347 return json.Marshal(objectMap) 348} 349 350// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateFirewallRuleParameters struct. 351func (coufrp *CreateOrUpdateFirewallRuleParameters) UnmarshalJSON(body []byte) error { 352 var m map[string]*json.RawMessage 353 err := json.Unmarshal(body, &m) 354 if err != nil { 355 return err 356 } 357 for k, v := range m { 358 switch k { 359 case "properties": 360 if v != nil { 361 var createOrUpdateFirewallRuleProperties CreateOrUpdateFirewallRuleProperties 362 err = json.Unmarshal(*v, &createOrUpdateFirewallRuleProperties) 363 if err != nil { 364 return err 365 } 366 coufrp.CreateOrUpdateFirewallRuleProperties = &createOrUpdateFirewallRuleProperties 367 } 368 } 369 } 370 371 return nil 372} 373 374// CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall 375// rule. 376type CreateOrUpdateFirewallRuleProperties struct { 377 // StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. 378 StartIPAddress *string `json:"startIpAddress,omitempty"` 379 // EndIPAddress - The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. 380 EndIPAddress *string `json:"endIpAddress,omitempty"` 381} 382 383// CreateOrUpdateTrustedIDProviderParameters the parameters used to create a new trusted identity provider. 384type CreateOrUpdateTrustedIDProviderParameters struct { 385 // CreateOrUpdateTrustedIDProviderProperties - The trusted identity provider properties to use when creating a new trusted identity provider. 386 *CreateOrUpdateTrustedIDProviderProperties `json:"properties,omitempty"` 387} 388 389// MarshalJSON is the custom marshaler for CreateOrUpdateTrustedIDProviderParameters. 390func (coutipp CreateOrUpdateTrustedIDProviderParameters) MarshalJSON() ([]byte, error) { 391 objectMap := make(map[string]interface{}) 392 if coutipp.CreateOrUpdateTrustedIDProviderProperties != nil { 393 objectMap["properties"] = coutipp.CreateOrUpdateTrustedIDProviderProperties 394 } 395 return json.Marshal(objectMap) 396} 397 398// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateTrustedIDProviderParameters struct. 399func (coutipp *CreateOrUpdateTrustedIDProviderParameters) UnmarshalJSON(body []byte) error { 400 var m map[string]*json.RawMessage 401 err := json.Unmarshal(body, &m) 402 if err != nil { 403 return err 404 } 405 for k, v := range m { 406 switch k { 407 case "properties": 408 if v != nil { 409 var createOrUpdateTrustedIDProviderProperties CreateOrUpdateTrustedIDProviderProperties 410 err = json.Unmarshal(*v, &createOrUpdateTrustedIDProviderProperties) 411 if err != nil { 412 return err 413 } 414 coutipp.CreateOrUpdateTrustedIDProviderProperties = &createOrUpdateTrustedIDProviderProperties 415 } 416 } 417 } 418 419 return nil 420} 421 422// CreateOrUpdateTrustedIDProviderProperties the trusted identity provider properties to use when creating 423// a new trusted identity provider. 424type CreateOrUpdateTrustedIDProviderProperties struct { 425 // IDProvider - The URL of this trusted identity provider. 426 IDProvider *string `json:"idProvider,omitempty"` 427} 428 429// CreateOrUpdateVirtualNetworkRuleParameters the parameters used to create a new virtual network rule. 430type CreateOrUpdateVirtualNetworkRuleParameters struct { 431 // CreateOrUpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when creating a new virtual network rule. 432 *CreateOrUpdateVirtualNetworkRuleProperties `json:"properties,omitempty"` 433} 434 435// MarshalJSON is the custom marshaler for CreateOrUpdateVirtualNetworkRuleParameters. 436func (couvnrp CreateOrUpdateVirtualNetworkRuleParameters) MarshalJSON() ([]byte, error) { 437 objectMap := make(map[string]interface{}) 438 if couvnrp.CreateOrUpdateVirtualNetworkRuleProperties != nil { 439 objectMap["properties"] = couvnrp.CreateOrUpdateVirtualNetworkRuleProperties 440 } 441 return json.Marshal(objectMap) 442} 443 444// UnmarshalJSON is the custom unmarshaler for CreateOrUpdateVirtualNetworkRuleParameters struct. 445func (couvnrp *CreateOrUpdateVirtualNetworkRuleParameters) UnmarshalJSON(body []byte) error { 446 var m map[string]*json.RawMessage 447 err := json.Unmarshal(body, &m) 448 if err != nil { 449 return err 450 } 451 for k, v := range m { 452 switch k { 453 case "properties": 454 if v != nil { 455 var createOrUpdateVirtualNetworkRuleProperties CreateOrUpdateVirtualNetworkRuleProperties 456 err = json.Unmarshal(*v, &createOrUpdateVirtualNetworkRuleProperties) 457 if err != nil { 458 return err 459 } 460 couvnrp.CreateOrUpdateVirtualNetworkRuleProperties = &createOrUpdateVirtualNetworkRuleProperties 461 } 462 } 463 } 464 465 return nil 466} 467 468// CreateOrUpdateVirtualNetworkRuleProperties the virtual network rule properties to use when creating a 469// new virtual network rule. 470type CreateOrUpdateVirtualNetworkRuleProperties struct { 471 // SubnetID - The resource identifier for the subnet. 472 SubnetID *string `json:"subnetId,omitempty"` 473} 474 475// CreateTrustedIDProviderWithAccountParameters the parameters used to create a new trusted identity 476// provider while creating a new Data Lake Store account. 477type CreateTrustedIDProviderWithAccountParameters struct { 478 // Name - The unique name of the trusted identity provider to create. 479 Name *string `json:"name,omitempty"` 480 // CreateOrUpdateTrustedIDProviderProperties - The trusted identity provider properties to use when creating a new trusted identity provider. 481 *CreateOrUpdateTrustedIDProviderProperties `json:"properties,omitempty"` 482} 483 484// MarshalJSON is the custom marshaler for CreateTrustedIDProviderWithAccountParameters. 485func (ctipwap CreateTrustedIDProviderWithAccountParameters) MarshalJSON() ([]byte, error) { 486 objectMap := make(map[string]interface{}) 487 if ctipwap.Name != nil { 488 objectMap["name"] = ctipwap.Name 489 } 490 if ctipwap.CreateOrUpdateTrustedIDProviderProperties != nil { 491 objectMap["properties"] = ctipwap.CreateOrUpdateTrustedIDProviderProperties 492 } 493 return json.Marshal(objectMap) 494} 495 496// UnmarshalJSON is the custom unmarshaler for CreateTrustedIDProviderWithAccountParameters struct. 497func (ctipwap *CreateTrustedIDProviderWithAccountParameters) UnmarshalJSON(body []byte) error { 498 var m map[string]*json.RawMessage 499 err := json.Unmarshal(body, &m) 500 if err != nil { 501 return err 502 } 503 for k, v := range m { 504 switch k { 505 case "name": 506 if v != nil { 507 var name string 508 err = json.Unmarshal(*v, &name) 509 if err != nil { 510 return err 511 } 512 ctipwap.Name = &name 513 } 514 case "properties": 515 if v != nil { 516 var createOrUpdateTrustedIDProviderProperties CreateOrUpdateTrustedIDProviderProperties 517 err = json.Unmarshal(*v, &createOrUpdateTrustedIDProviderProperties) 518 if err != nil { 519 return err 520 } 521 ctipwap.CreateOrUpdateTrustedIDProviderProperties = &createOrUpdateTrustedIDProviderProperties 522 } 523 } 524 } 525 526 return nil 527} 528 529// CreateVirtualNetworkRuleWithAccountParameters the parameters used to create a new virtual network rule 530// while creating a new Data Lake Store account. 531type CreateVirtualNetworkRuleWithAccountParameters struct { 532 // Name - The unique name of the virtual network rule to create. 533 Name *string `json:"name,omitempty"` 534 // CreateOrUpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when creating a new virtual network rule. 535 *CreateOrUpdateVirtualNetworkRuleProperties `json:"properties,omitempty"` 536} 537 538// MarshalJSON is the custom marshaler for CreateVirtualNetworkRuleWithAccountParameters. 539func (cvnrwap CreateVirtualNetworkRuleWithAccountParameters) MarshalJSON() ([]byte, error) { 540 objectMap := make(map[string]interface{}) 541 if cvnrwap.Name != nil { 542 objectMap["name"] = cvnrwap.Name 543 } 544 if cvnrwap.CreateOrUpdateVirtualNetworkRuleProperties != nil { 545 objectMap["properties"] = cvnrwap.CreateOrUpdateVirtualNetworkRuleProperties 546 } 547 return json.Marshal(objectMap) 548} 549 550// UnmarshalJSON is the custom unmarshaler for CreateVirtualNetworkRuleWithAccountParameters struct. 551func (cvnrwap *CreateVirtualNetworkRuleWithAccountParameters) UnmarshalJSON(body []byte) error { 552 var m map[string]*json.RawMessage 553 err := json.Unmarshal(body, &m) 554 if err != nil { 555 return err 556 } 557 for k, v := range m { 558 switch k { 559 case "name": 560 if v != nil { 561 var name string 562 err = json.Unmarshal(*v, &name) 563 if err != nil { 564 return err 565 } 566 cvnrwap.Name = &name 567 } 568 case "properties": 569 if v != nil { 570 var createOrUpdateVirtualNetworkRuleProperties CreateOrUpdateVirtualNetworkRuleProperties 571 err = json.Unmarshal(*v, &createOrUpdateVirtualNetworkRuleProperties) 572 if err != nil { 573 return err 574 } 575 cvnrwap.CreateOrUpdateVirtualNetworkRuleProperties = &createOrUpdateVirtualNetworkRuleProperties 576 } 577 } 578 } 579 580 return nil 581} 582 583// DataLakeStoreAccount data Lake Store account information. 584type DataLakeStoreAccount struct { 585 autorest.Response `json:"-"` 586 // Identity - READ-ONLY; The Key Vault encryption identity, if any. 587 Identity *EncryptionIdentity `json:"identity,omitempty"` 588 // DataLakeStoreAccountProperties - READ-ONLY; The Data Lake Store account properties. 589 *DataLakeStoreAccountProperties `json:"properties,omitempty"` 590 // ID - READ-ONLY; The resource identifier. 591 ID *string `json:"id,omitempty"` 592 // Name - READ-ONLY; The resource name. 593 Name *string `json:"name,omitempty"` 594 // Type - READ-ONLY; The resource type. 595 Type *string `json:"type,omitempty"` 596 // Location - READ-ONLY; The resource location. 597 Location *string `json:"location,omitempty"` 598 // Tags - READ-ONLY; The resource tags. 599 Tags map[string]*string `json:"tags"` 600} 601 602// MarshalJSON is the custom marshaler for DataLakeStoreAccount. 603func (dlsa DataLakeStoreAccount) MarshalJSON() ([]byte, error) { 604 objectMap := make(map[string]interface{}) 605 return json.Marshal(objectMap) 606} 607 608// UnmarshalJSON is the custom unmarshaler for DataLakeStoreAccount struct. 609func (dlsa *DataLakeStoreAccount) UnmarshalJSON(body []byte) error { 610 var m map[string]*json.RawMessage 611 err := json.Unmarshal(body, &m) 612 if err != nil { 613 return err 614 } 615 for k, v := range m { 616 switch k { 617 case "identity": 618 if v != nil { 619 var identity EncryptionIdentity 620 err = json.Unmarshal(*v, &identity) 621 if err != nil { 622 return err 623 } 624 dlsa.Identity = &identity 625 } 626 case "properties": 627 if v != nil { 628 var dataLakeStoreAccountProperties DataLakeStoreAccountProperties 629 err = json.Unmarshal(*v, &dataLakeStoreAccountProperties) 630 if err != nil { 631 return err 632 } 633 dlsa.DataLakeStoreAccountProperties = &dataLakeStoreAccountProperties 634 } 635 case "id": 636 if v != nil { 637 var ID string 638 err = json.Unmarshal(*v, &ID) 639 if err != nil { 640 return err 641 } 642 dlsa.ID = &ID 643 } 644 case "name": 645 if v != nil { 646 var name string 647 err = json.Unmarshal(*v, &name) 648 if err != nil { 649 return err 650 } 651 dlsa.Name = &name 652 } 653 case "type": 654 if v != nil { 655 var typeVar string 656 err = json.Unmarshal(*v, &typeVar) 657 if err != nil { 658 return err 659 } 660 dlsa.Type = &typeVar 661 } 662 case "location": 663 if v != nil { 664 var location string 665 err = json.Unmarshal(*v, &location) 666 if err != nil { 667 return err 668 } 669 dlsa.Location = &location 670 } 671 case "tags": 672 if v != nil { 673 var tags map[string]*string 674 err = json.Unmarshal(*v, &tags) 675 if err != nil { 676 return err 677 } 678 dlsa.Tags = tags 679 } 680 } 681 } 682 683 return nil 684} 685 686// DataLakeStoreAccountBasic basic Data Lake Store account information, returned on list calls. 687type DataLakeStoreAccountBasic struct { 688 // DataLakeStoreAccountPropertiesBasic - READ-ONLY; The basic Data Lake Store account properties. 689 *DataLakeStoreAccountPropertiesBasic `json:"properties,omitempty"` 690 // ID - READ-ONLY; The resource identifier. 691 ID *string `json:"id,omitempty"` 692 // Name - READ-ONLY; The resource name. 693 Name *string `json:"name,omitempty"` 694 // Type - READ-ONLY; The resource type. 695 Type *string `json:"type,omitempty"` 696 // Location - READ-ONLY; The resource location. 697 Location *string `json:"location,omitempty"` 698 // Tags - READ-ONLY; The resource tags. 699 Tags map[string]*string `json:"tags"` 700} 701 702// MarshalJSON is the custom marshaler for DataLakeStoreAccountBasic. 703func (dlsab DataLakeStoreAccountBasic) MarshalJSON() ([]byte, error) { 704 objectMap := make(map[string]interface{}) 705 return json.Marshal(objectMap) 706} 707 708// UnmarshalJSON is the custom unmarshaler for DataLakeStoreAccountBasic struct. 709func (dlsab *DataLakeStoreAccountBasic) UnmarshalJSON(body []byte) error { 710 var m map[string]*json.RawMessage 711 err := json.Unmarshal(body, &m) 712 if err != nil { 713 return err 714 } 715 for k, v := range m { 716 switch k { 717 case "properties": 718 if v != nil { 719 var dataLakeStoreAccountPropertiesBasic DataLakeStoreAccountPropertiesBasic 720 err = json.Unmarshal(*v, &dataLakeStoreAccountPropertiesBasic) 721 if err != nil { 722 return err 723 } 724 dlsab.DataLakeStoreAccountPropertiesBasic = &dataLakeStoreAccountPropertiesBasic 725 } 726 case "id": 727 if v != nil { 728 var ID string 729 err = json.Unmarshal(*v, &ID) 730 if err != nil { 731 return err 732 } 733 dlsab.ID = &ID 734 } 735 case "name": 736 if v != nil { 737 var name string 738 err = json.Unmarshal(*v, &name) 739 if err != nil { 740 return err 741 } 742 dlsab.Name = &name 743 } 744 case "type": 745 if v != nil { 746 var typeVar string 747 err = json.Unmarshal(*v, &typeVar) 748 if err != nil { 749 return err 750 } 751 dlsab.Type = &typeVar 752 } 753 case "location": 754 if v != nil { 755 var location string 756 err = json.Unmarshal(*v, &location) 757 if err != nil { 758 return err 759 } 760 dlsab.Location = &location 761 } 762 case "tags": 763 if v != nil { 764 var tags map[string]*string 765 err = json.Unmarshal(*v, &tags) 766 if err != nil { 767 return err 768 } 769 dlsab.Tags = tags 770 } 771 } 772 } 773 774 return nil 775} 776 777// DataLakeStoreAccountListResult data Lake Store account list information response. 778type DataLakeStoreAccountListResult struct { 779 autorest.Response `json:"-"` 780 // Value - READ-ONLY; The results of the list operation. 781 Value *[]DataLakeStoreAccountBasic `json:"value,omitempty"` 782 // NextLink - READ-ONLY; The link (url) to the next page of results. 783 NextLink *string `json:"nextLink,omitempty"` 784} 785 786// MarshalJSON is the custom marshaler for DataLakeStoreAccountListResult. 787func (dlsalr DataLakeStoreAccountListResult) MarshalJSON() ([]byte, error) { 788 objectMap := make(map[string]interface{}) 789 return json.Marshal(objectMap) 790} 791 792// DataLakeStoreAccountListResultIterator provides access to a complete listing of 793// DataLakeStoreAccountBasic values. 794type DataLakeStoreAccountListResultIterator struct { 795 i int 796 page DataLakeStoreAccountListResultPage 797} 798 799// NextWithContext advances to the next value. If there was an error making 800// the request the iterator does not advance and the error is returned. 801func (iter *DataLakeStoreAccountListResultIterator) NextWithContext(ctx context.Context) (err error) { 802 if tracing.IsEnabled() { 803 ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountListResultIterator.NextWithContext") 804 defer func() { 805 sc := -1 806 if iter.Response().Response.Response != nil { 807 sc = iter.Response().Response.Response.StatusCode 808 } 809 tracing.EndSpan(ctx, sc, err) 810 }() 811 } 812 iter.i++ 813 if iter.i < len(iter.page.Values()) { 814 return nil 815 } 816 err = iter.page.NextWithContext(ctx) 817 if err != nil { 818 iter.i-- 819 return err 820 } 821 iter.i = 0 822 return nil 823} 824 825// Next advances to the next value. If there was an error making 826// the request the iterator does not advance and the error is returned. 827// Deprecated: Use NextWithContext() instead. 828func (iter *DataLakeStoreAccountListResultIterator) Next() error { 829 return iter.NextWithContext(context.Background()) 830} 831 832// NotDone returns true if the enumeration should be started or is not yet complete. 833func (iter DataLakeStoreAccountListResultIterator) NotDone() bool { 834 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 835} 836 837// Response returns the raw server response from the last page request. 838func (iter DataLakeStoreAccountListResultIterator) Response() DataLakeStoreAccountListResult { 839 return iter.page.Response() 840} 841 842// Value returns the current value or a zero-initialized value if the 843// iterator has advanced beyond the end of the collection. 844func (iter DataLakeStoreAccountListResultIterator) Value() DataLakeStoreAccountBasic { 845 if !iter.page.NotDone() { 846 return DataLakeStoreAccountBasic{} 847 } 848 return iter.page.Values()[iter.i] 849} 850 851// Creates a new instance of the DataLakeStoreAccountListResultIterator type. 852func NewDataLakeStoreAccountListResultIterator(page DataLakeStoreAccountListResultPage) DataLakeStoreAccountListResultIterator { 853 return DataLakeStoreAccountListResultIterator{page: page} 854} 855 856// IsEmpty returns true if the ListResult contains no values. 857func (dlsalr DataLakeStoreAccountListResult) IsEmpty() bool { 858 return dlsalr.Value == nil || len(*dlsalr.Value) == 0 859} 860 861// hasNextLink returns true if the NextLink is not empty. 862func (dlsalr DataLakeStoreAccountListResult) hasNextLink() bool { 863 return dlsalr.NextLink != nil && len(*dlsalr.NextLink) != 0 864} 865 866// dataLakeStoreAccountListResultPreparer prepares a request to retrieve the next set of results. 867// It returns nil if no more results exist. 868func (dlsalr DataLakeStoreAccountListResult) dataLakeStoreAccountListResultPreparer(ctx context.Context) (*http.Request, error) { 869 if !dlsalr.hasNextLink() { 870 return nil, nil 871 } 872 return autorest.Prepare((&http.Request{}).WithContext(ctx), 873 autorest.AsJSON(), 874 autorest.AsGet(), 875 autorest.WithBaseURL(to.String(dlsalr.NextLink))) 876} 877 878// DataLakeStoreAccountListResultPage contains a page of DataLakeStoreAccountBasic values. 879type DataLakeStoreAccountListResultPage struct { 880 fn func(context.Context, DataLakeStoreAccountListResult) (DataLakeStoreAccountListResult, error) 881 dlsalr DataLakeStoreAccountListResult 882} 883 884// NextWithContext advances to the next page of values. If there was an error making 885// the request the page does not advance and the error is returned. 886func (page *DataLakeStoreAccountListResultPage) NextWithContext(ctx context.Context) (err error) { 887 if tracing.IsEnabled() { 888 ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountListResultPage.NextWithContext") 889 defer func() { 890 sc := -1 891 if page.Response().Response.Response != nil { 892 sc = page.Response().Response.Response.StatusCode 893 } 894 tracing.EndSpan(ctx, sc, err) 895 }() 896 } 897 for { 898 next, err := page.fn(ctx, page.dlsalr) 899 if err != nil { 900 return err 901 } 902 page.dlsalr = next 903 if !next.hasNextLink() || !next.IsEmpty() { 904 break 905 } 906 } 907 return nil 908} 909 910// Next advances to the next page of values. If there was an error making 911// the request the page does not advance and the error is returned. 912// Deprecated: Use NextWithContext() instead. 913func (page *DataLakeStoreAccountListResultPage) Next() error { 914 return page.NextWithContext(context.Background()) 915} 916 917// NotDone returns true if the page enumeration should be started or is not yet complete. 918func (page DataLakeStoreAccountListResultPage) NotDone() bool { 919 return !page.dlsalr.IsEmpty() 920} 921 922// Response returns the raw server response from the last page request. 923func (page DataLakeStoreAccountListResultPage) Response() DataLakeStoreAccountListResult { 924 return page.dlsalr 925} 926 927// Values returns the slice of values for the current page or nil if there are no values. 928func (page DataLakeStoreAccountListResultPage) Values() []DataLakeStoreAccountBasic { 929 if page.dlsalr.IsEmpty() { 930 return nil 931 } 932 return *page.dlsalr.Value 933} 934 935// Creates a new instance of the DataLakeStoreAccountListResultPage type. 936func NewDataLakeStoreAccountListResultPage(cur DataLakeStoreAccountListResult, getNextPage func(context.Context, DataLakeStoreAccountListResult) (DataLakeStoreAccountListResult, error)) DataLakeStoreAccountListResultPage { 937 return DataLakeStoreAccountListResultPage{ 938 fn: getNextPage, 939 dlsalr: cur, 940 } 941} 942 943// DataLakeStoreAccountProperties data Lake Store account properties information. 944type DataLakeStoreAccountProperties struct { 945 // DefaultGroup - READ-ONLY; The default owner group for all new folders and files created in the Data Lake Store account. 946 DefaultGroup *string `json:"defaultGroup,omitempty"` 947 // EncryptionConfig - READ-ONLY; The Key Vault encryption configuration. 948 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` 949 // EncryptionState - READ-ONLY; The current state of encryption for this Data Lake Store account. Possible values include: 'Enabled', 'Disabled' 950 EncryptionState EncryptionState `json:"encryptionState,omitempty"` 951 // EncryptionProvisioningState - READ-ONLY; The current state of encryption provisioning for this Data Lake Store account. Possible values include: 'EncryptionProvisioningStateCreating', 'EncryptionProvisioningStateSucceeded' 952 EncryptionProvisioningState EncryptionProvisioningState `json:"encryptionProvisioningState,omitempty"` 953 // FirewallRules - READ-ONLY; The list of firewall rules associated with this Data Lake Store account. 954 FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` 955 // VirtualNetworkRules - READ-ONLY; The list of virtual network rules associated with this Data Lake Store account. 956 VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` 957 // FirewallState - READ-ONLY; The current state of the IP address firewall for this Data Lake Store account. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' 958 FirewallState FirewallState `json:"firewallState,omitempty"` 959 // FirewallAllowAzureIps - READ-ONLY; The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'FirewallAllowAzureIpsStateEnabled', 'FirewallAllowAzureIpsStateDisabled' 960 FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` 961 // TrustedIDProviders - READ-ONLY; The list of trusted identity providers associated with this Data Lake Store account. 962 TrustedIDProviders *[]TrustedIDProvider `json:"trustedIdProviders,omitempty"` 963 // TrustedIDProviderState - READ-ONLY; The current state of the trusted identity provider feature for this Data Lake Store account. Possible values include: 'TrustedIDProviderStateEnabled', 'TrustedIDProviderStateDisabled' 964 TrustedIDProviderState TrustedIDProviderState `json:"trustedIdProviderState,omitempty"` 965 // NewTier - READ-ONLY; The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment1TB', 'Commitment10TB', 'Commitment100TB', 'Commitment500TB', 'Commitment1PB', 'Commitment5PB' 966 NewTier TierType `json:"newTier,omitempty"` 967 // CurrentTier - READ-ONLY; The commitment tier in use for the current month. Possible values include: 'Consumption', 'Commitment1TB', 'Commitment10TB', 'Commitment100TB', 'Commitment500TB', 'Commitment1PB', 'Commitment5PB' 968 CurrentTier TierType `json:"currentTier,omitempty"` 969 // AccountID - READ-ONLY; The unique identifier associated with this Data Lake Store account. 970 AccountID *uuid.UUID `json:"accountId,omitempty"` 971 // ProvisioningState - READ-ONLY; The provisioning status of the Data Lake Store account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' 972 ProvisioningState DataLakeStoreAccountStatus `json:"provisioningState,omitempty"` 973 // State - READ-ONLY; The state of the Data Lake Store account. Possible values include: 'Active', 'Suspended' 974 State DataLakeStoreAccountState `json:"state,omitempty"` 975 // CreationTime - READ-ONLY; The account creation time. 976 CreationTime *date.Time `json:"creationTime,omitempty"` 977 // LastModifiedTime - READ-ONLY; The account last modified time. 978 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` 979 // Endpoint - READ-ONLY; The full CName endpoint for this account. 980 Endpoint *string `json:"endpoint,omitempty"` 981} 982 983// MarshalJSON is the custom marshaler for DataLakeStoreAccountProperties. 984func (dlsap DataLakeStoreAccountProperties) MarshalJSON() ([]byte, error) { 985 objectMap := make(map[string]interface{}) 986 return json.Marshal(objectMap) 987} 988 989// DataLakeStoreAccountPropertiesBasic the basic account specific properties that are associated with an 990// underlying Data Lake Store account. 991type DataLakeStoreAccountPropertiesBasic struct { 992 // AccountID - READ-ONLY; The unique identifier associated with this Data Lake Store account. 993 AccountID *uuid.UUID `json:"accountId,omitempty"` 994 // ProvisioningState - READ-ONLY; The provisioning status of the Data Lake Store account. Possible values include: 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' 995 ProvisioningState DataLakeStoreAccountStatus `json:"provisioningState,omitempty"` 996 // State - READ-ONLY; The state of the Data Lake Store account. Possible values include: 'Active', 'Suspended' 997 State DataLakeStoreAccountState `json:"state,omitempty"` 998 // CreationTime - READ-ONLY; The account creation time. 999 CreationTime *date.Time `json:"creationTime,omitempty"` 1000 // LastModifiedTime - READ-ONLY; The account last modified time. 1001 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` 1002 // Endpoint - READ-ONLY; The full CName endpoint for this account. 1003 Endpoint *string `json:"endpoint,omitempty"` 1004} 1005 1006// MarshalJSON is the custom marshaler for DataLakeStoreAccountPropertiesBasic. 1007func (dlsapb DataLakeStoreAccountPropertiesBasic) MarshalJSON() ([]byte, error) { 1008 objectMap := make(map[string]interface{}) 1009 return json.Marshal(objectMap) 1010} 1011 1012// EncryptionConfig the encryption configuration for the account. 1013type EncryptionConfig struct { 1014 // Type - The type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'. Possible values include: 'UserManaged', 'ServiceManaged' 1015 Type EncryptionConfigType `json:"type,omitempty"` 1016 // KeyVaultMetaInfo - The Key Vault information for connecting to user managed encryption keys. 1017 KeyVaultMetaInfo *KeyVaultMetaInfo `json:"keyVaultMetaInfo,omitempty"` 1018} 1019 1020// EncryptionIdentity the encryption identity properties. 1021type EncryptionIdentity struct { 1022 // Type - The type of encryption being used. Currently the only supported type is 'SystemAssigned'. 1023 Type *string `json:"type,omitempty"` 1024 // PrincipalID - READ-ONLY; The principal identifier associated with the encryption. 1025 PrincipalID *uuid.UUID `json:"principalId,omitempty"` 1026 // TenantID - READ-ONLY; The tenant identifier associated with the encryption. 1027 TenantID *uuid.UUID `json:"tenantId,omitempty"` 1028} 1029 1030// MarshalJSON is the custom marshaler for EncryptionIdentity. 1031func (ei EncryptionIdentity) MarshalJSON() ([]byte, error) { 1032 objectMap := make(map[string]interface{}) 1033 if ei.Type != nil { 1034 objectMap["type"] = ei.Type 1035 } 1036 return json.Marshal(objectMap) 1037} 1038 1039// FirewallRule data Lake Store firewall rule information. 1040type FirewallRule struct { 1041 autorest.Response `json:"-"` 1042 // FirewallRuleProperties - READ-ONLY; The firewall rule properties. 1043 *FirewallRuleProperties `json:"properties,omitempty"` 1044 // ID - READ-ONLY; The resource identifier. 1045 ID *string `json:"id,omitempty"` 1046 // Name - READ-ONLY; The resource name. 1047 Name *string `json:"name,omitempty"` 1048 // Type - READ-ONLY; The resource type. 1049 Type *string `json:"type,omitempty"` 1050} 1051 1052// MarshalJSON is the custom marshaler for FirewallRule. 1053func (fr FirewallRule) MarshalJSON() ([]byte, error) { 1054 objectMap := make(map[string]interface{}) 1055 return json.Marshal(objectMap) 1056} 1057 1058// UnmarshalJSON is the custom unmarshaler for FirewallRule struct. 1059func (fr *FirewallRule) UnmarshalJSON(body []byte) error { 1060 var m map[string]*json.RawMessage 1061 err := json.Unmarshal(body, &m) 1062 if err != nil { 1063 return err 1064 } 1065 for k, v := range m { 1066 switch k { 1067 case "properties": 1068 if v != nil { 1069 var firewallRuleProperties FirewallRuleProperties 1070 err = json.Unmarshal(*v, &firewallRuleProperties) 1071 if err != nil { 1072 return err 1073 } 1074 fr.FirewallRuleProperties = &firewallRuleProperties 1075 } 1076 case "id": 1077 if v != nil { 1078 var ID string 1079 err = json.Unmarshal(*v, &ID) 1080 if err != nil { 1081 return err 1082 } 1083 fr.ID = &ID 1084 } 1085 case "name": 1086 if v != nil { 1087 var name string 1088 err = json.Unmarshal(*v, &name) 1089 if err != nil { 1090 return err 1091 } 1092 fr.Name = &name 1093 } 1094 case "type": 1095 if v != nil { 1096 var typeVar string 1097 err = json.Unmarshal(*v, &typeVar) 1098 if err != nil { 1099 return err 1100 } 1101 fr.Type = &typeVar 1102 } 1103 } 1104 } 1105 1106 return nil 1107} 1108 1109// FirewallRuleListResult data Lake Store firewall rule list information. 1110type FirewallRuleListResult struct { 1111 autorest.Response `json:"-"` 1112 // Value - READ-ONLY; The results of the list operation. 1113 Value *[]FirewallRule `json:"value,omitempty"` 1114 // NextLink - READ-ONLY; The link (url) to the next page of results. 1115 NextLink *string `json:"nextLink,omitempty"` 1116} 1117 1118// MarshalJSON is the custom marshaler for FirewallRuleListResult. 1119func (frlr FirewallRuleListResult) MarshalJSON() ([]byte, error) { 1120 objectMap := make(map[string]interface{}) 1121 return json.Marshal(objectMap) 1122} 1123 1124// FirewallRuleListResultIterator provides access to a complete listing of FirewallRule values. 1125type FirewallRuleListResultIterator struct { 1126 i int 1127 page FirewallRuleListResultPage 1128} 1129 1130// NextWithContext advances to the next value. If there was an error making 1131// the request the iterator does not advance and the error is returned. 1132func (iter *FirewallRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 1133 if tracing.IsEnabled() { 1134 ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultIterator.NextWithContext") 1135 defer func() { 1136 sc := -1 1137 if iter.Response().Response.Response != nil { 1138 sc = iter.Response().Response.Response.StatusCode 1139 } 1140 tracing.EndSpan(ctx, sc, err) 1141 }() 1142 } 1143 iter.i++ 1144 if iter.i < len(iter.page.Values()) { 1145 return nil 1146 } 1147 err = iter.page.NextWithContext(ctx) 1148 if err != nil { 1149 iter.i-- 1150 return err 1151 } 1152 iter.i = 0 1153 return nil 1154} 1155 1156// Next advances to the next value. If there was an error making 1157// the request the iterator does not advance and the error is returned. 1158// Deprecated: Use NextWithContext() instead. 1159func (iter *FirewallRuleListResultIterator) Next() error { 1160 return iter.NextWithContext(context.Background()) 1161} 1162 1163// NotDone returns true if the enumeration should be started or is not yet complete. 1164func (iter FirewallRuleListResultIterator) NotDone() bool { 1165 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1166} 1167 1168// Response returns the raw server response from the last page request. 1169func (iter FirewallRuleListResultIterator) Response() FirewallRuleListResult { 1170 return iter.page.Response() 1171} 1172 1173// Value returns the current value or a zero-initialized value if the 1174// iterator has advanced beyond the end of the collection. 1175func (iter FirewallRuleListResultIterator) Value() FirewallRule { 1176 if !iter.page.NotDone() { 1177 return FirewallRule{} 1178 } 1179 return iter.page.Values()[iter.i] 1180} 1181 1182// Creates a new instance of the FirewallRuleListResultIterator type. 1183func NewFirewallRuleListResultIterator(page FirewallRuleListResultPage) FirewallRuleListResultIterator { 1184 return FirewallRuleListResultIterator{page: page} 1185} 1186 1187// IsEmpty returns true if the ListResult contains no values. 1188func (frlr FirewallRuleListResult) IsEmpty() bool { 1189 return frlr.Value == nil || len(*frlr.Value) == 0 1190} 1191 1192// hasNextLink returns true if the NextLink is not empty. 1193func (frlr FirewallRuleListResult) hasNextLink() bool { 1194 return frlr.NextLink != nil && len(*frlr.NextLink) != 0 1195} 1196 1197// firewallRuleListResultPreparer prepares a request to retrieve the next set of results. 1198// It returns nil if no more results exist. 1199func (frlr FirewallRuleListResult) firewallRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 1200 if !frlr.hasNextLink() { 1201 return nil, nil 1202 } 1203 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1204 autorest.AsJSON(), 1205 autorest.AsGet(), 1206 autorest.WithBaseURL(to.String(frlr.NextLink))) 1207} 1208 1209// FirewallRuleListResultPage contains a page of FirewallRule values. 1210type FirewallRuleListResultPage struct { 1211 fn func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error) 1212 frlr FirewallRuleListResult 1213} 1214 1215// NextWithContext advances to the next page of values. If there was an error making 1216// the request the page does not advance and the error is returned. 1217func (page *FirewallRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 1218 if tracing.IsEnabled() { 1219 ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultPage.NextWithContext") 1220 defer func() { 1221 sc := -1 1222 if page.Response().Response.Response != nil { 1223 sc = page.Response().Response.Response.StatusCode 1224 } 1225 tracing.EndSpan(ctx, sc, err) 1226 }() 1227 } 1228 for { 1229 next, err := page.fn(ctx, page.frlr) 1230 if err != nil { 1231 return err 1232 } 1233 page.frlr = next 1234 if !next.hasNextLink() || !next.IsEmpty() { 1235 break 1236 } 1237 } 1238 return nil 1239} 1240 1241// Next advances to the next page of values. If there was an error making 1242// the request the page does not advance and the error is returned. 1243// Deprecated: Use NextWithContext() instead. 1244func (page *FirewallRuleListResultPage) Next() error { 1245 return page.NextWithContext(context.Background()) 1246} 1247 1248// NotDone returns true if the page enumeration should be started or is not yet complete. 1249func (page FirewallRuleListResultPage) NotDone() bool { 1250 return !page.frlr.IsEmpty() 1251} 1252 1253// Response returns the raw server response from the last page request. 1254func (page FirewallRuleListResultPage) Response() FirewallRuleListResult { 1255 return page.frlr 1256} 1257 1258// Values returns the slice of values for the current page or nil if there are no values. 1259func (page FirewallRuleListResultPage) Values() []FirewallRule { 1260 if page.frlr.IsEmpty() { 1261 return nil 1262 } 1263 return *page.frlr.Value 1264} 1265 1266// Creates a new instance of the FirewallRuleListResultPage type. 1267func NewFirewallRuleListResultPage(cur FirewallRuleListResult, getNextPage func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage { 1268 return FirewallRuleListResultPage{ 1269 fn: getNextPage, 1270 frlr: cur, 1271 } 1272} 1273 1274// FirewallRuleProperties the firewall rule properties. 1275type FirewallRuleProperties struct { 1276 // StartIPAddress - READ-ONLY; The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. 1277 StartIPAddress *string `json:"startIpAddress,omitempty"` 1278 // EndIPAddress - READ-ONLY; The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. 1279 EndIPAddress *string `json:"endIpAddress,omitempty"` 1280} 1281 1282// MarshalJSON is the custom marshaler for FirewallRuleProperties. 1283func (frp FirewallRuleProperties) MarshalJSON() ([]byte, error) { 1284 objectMap := make(map[string]interface{}) 1285 return json.Marshal(objectMap) 1286} 1287 1288// KeyVaultMetaInfo metadata information used by account encryption. 1289type KeyVaultMetaInfo struct { 1290 // KeyVaultResourceID - The resource identifier for the user managed Key Vault being used to encrypt. 1291 KeyVaultResourceID *string `json:"keyVaultResourceId,omitempty"` 1292 // EncryptionKeyName - The name of the user managed encryption key. 1293 EncryptionKeyName *string `json:"encryptionKeyName,omitempty"` 1294 // EncryptionKeyVersion - The version of the user managed encryption key. 1295 EncryptionKeyVersion *string `json:"encryptionKeyVersion,omitempty"` 1296} 1297 1298// NameAvailabilityInformation data Lake Store account name availability result information. 1299type NameAvailabilityInformation struct { 1300 autorest.Response `json:"-"` 1301 // NameAvailable - READ-ONLY; The Boolean value of true or false to indicate whether the Data Lake Store account name is available or not. 1302 NameAvailable *bool `json:"nameAvailable,omitempty"` 1303 // Reason - READ-ONLY; The reason why the Data Lake Store account name is not available, if nameAvailable is false. 1304 Reason *string `json:"reason,omitempty"` 1305 // Message - READ-ONLY; The message describing why the Data Lake Store account name is not available, if nameAvailable is false. 1306 Message *string `json:"message,omitempty"` 1307} 1308 1309// MarshalJSON is the custom marshaler for NameAvailabilityInformation. 1310func (nai NameAvailabilityInformation) MarshalJSON() ([]byte, error) { 1311 objectMap := make(map[string]interface{}) 1312 return json.Marshal(objectMap) 1313} 1314 1315// Operation an available operation for Data Lake Store. 1316type Operation struct { 1317 // Name - READ-ONLY; The name of the operation. 1318 Name *string `json:"name,omitempty"` 1319 // Display - The display information for the operation. 1320 Display *OperationDisplay `json:"display,omitempty"` 1321 // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'User', 'System', 'Usersystem' 1322 Origin OperationOrigin `json:"origin,omitempty"` 1323} 1324 1325// MarshalJSON is the custom marshaler for Operation. 1326func (o Operation) MarshalJSON() ([]byte, error) { 1327 objectMap := make(map[string]interface{}) 1328 if o.Display != nil { 1329 objectMap["display"] = o.Display 1330 } 1331 return json.Marshal(objectMap) 1332} 1333 1334// OperationDisplay the display information for a particular operation. 1335type OperationDisplay struct { 1336 // Provider - READ-ONLY; The resource provider of the operation. 1337 Provider *string `json:"provider,omitempty"` 1338 // Resource - READ-ONLY; The resource type of the operation. 1339 Resource *string `json:"resource,omitempty"` 1340 // Operation - READ-ONLY; A friendly name of the operation. 1341 Operation *string `json:"operation,omitempty"` 1342 // Description - READ-ONLY; A friendly description of the operation. 1343 Description *string `json:"description,omitempty"` 1344} 1345 1346// MarshalJSON is the custom marshaler for OperationDisplay. 1347func (od OperationDisplay) MarshalJSON() ([]byte, error) { 1348 objectMap := make(map[string]interface{}) 1349 return json.Marshal(objectMap) 1350} 1351 1352// OperationListResult the list of available operations for Data Lake Store. 1353type OperationListResult struct { 1354 autorest.Response `json:"-"` 1355 // Value - READ-ONLY; The results of the list operation. 1356 Value *[]Operation `json:"value,omitempty"` 1357 // NextLink - READ-ONLY; The link (url) to the next page of results. 1358 NextLink *string `json:"nextLink,omitempty"` 1359} 1360 1361// MarshalJSON is the custom marshaler for OperationListResult. 1362func (olr OperationListResult) MarshalJSON() ([]byte, error) { 1363 objectMap := make(map[string]interface{}) 1364 return json.Marshal(objectMap) 1365} 1366 1367// Resource the resource model definition. 1368type Resource struct { 1369 // ID - READ-ONLY; The resource identifier. 1370 ID *string `json:"id,omitempty"` 1371 // Name - READ-ONLY; The resource name. 1372 Name *string `json:"name,omitempty"` 1373 // Type - READ-ONLY; The resource type. 1374 Type *string `json:"type,omitempty"` 1375 // Location - READ-ONLY; The resource location. 1376 Location *string `json:"location,omitempty"` 1377 // Tags - READ-ONLY; The resource tags. 1378 Tags map[string]*string `json:"tags"` 1379} 1380 1381// MarshalJSON is the custom marshaler for Resource. 1382func (r Resource) MarshalJSON() ([]byte, error) { 1383 objectMap := make(map[string]interface{}) 1384 return json.Marshal(objectMap) 1385} 1386 1387// SubResource the resource model definition for a nested resource. 1388type SubResource struct { 1389 // ID - READ-ONLY; The resource identifier. 1390 ID *string `json:"id,omitempty"` 1391 // Name - READ-ONLY; The resource name. 1392 Name *string `json:"name,omitempty"` 1393 // Type - READ-ONLY; The resource type. 1394 Type *string `json:"type,omitempty"` 1395} 1396 1397// MarshalJSON is the custom marshaler for SubResource. 1398func (sr SubResource) MarshalJSON() ([]byte, error) { 1399 objectMap := make(map[string]interface{}) 1400 return json.Marshal(objectMap) 1401} 1402 1403// TrustedIDProvider data Lake Store trusted identity provider information. 1404type TrustedIDProvider struct { 1405 autorest.Response `json:"-"` 1406 // TrustedIDProviderProperties - READ-ONLY; The trusted identity provider properties. 1407 *TrustedIDProviderProperties `json:"properties,omitempty"` 1408 // ID - READ-ONLY; The resource identifier. 1409 ID *string `json:"id,omitempty"` 1410 // Name - READ-ONLY; The resource name. 1411 Name *string `json:"name,omitempty"` 1412 // Type - READ-ONLY; The resource type. 1413 Type *string `json:"type,omitempty"` 1414} 1415 1416// MarshalJSON is the custom marshaler for TrustedIDProvider. 1417func (tip TrustedIDProvider) MarshalJSON() ([]byte, error) { 1418 objectMap := make(map[string]interface{}) 1419 return json.Marshal(objectMap) 1420} 1421 1422// UnmarshalJSON is the custom unmarshaler for TrustedIDProvider struct. 1423func (tip *TrustedIDProvider) UnmarshalJSON(body []byte) error { 1424 var m map[string]*json.RawMessage 1425 err := json.Unmarshal(body, &m) 1426 if err != nil { 1427 return err 1428 } 1429 for k, v := range m { 1430 switch k { 1431 case "properties": 1432 if v != nil { 1433 var trustedIDProviderProperties TrustedIDProviderProperties 1434 err = json.Unmarshal(*v, &trustedIDProviderProperties) 1435 if err != nil { 1436 return err 1437 } 1438 tip.TrustedIDProviderProperties = &trustedIDProviderProperties 1439 } 1440 case "id": 1441 if v != nil { 1442 var ID string 1443 err = json.Unmarshal(*v, &ID) 1444 if err != nil { 1445 return err 1446 } 1447 tip.ID = &ID 1448 } 1449 case "name": 1450 if v != nil { 1451 var name string 1452 err = json.Unmarshal(*v, &name) 1453 if err != nil { 1454 return err 1455 } 1456 tip.Name = &name 1457 } 1458 case "type": 1459 if v != nil { 1460 var typeVar string 1461 err = json.Unmarshal(*v, &typeVar) 1462 if err != nil { 1463 return err 1464 } 1465 tip.Type = &typeVar 1466 } 1467 } 1468 } 1469 1470 return nil 1471} 1472 1473// TrustedIDProviderListResult data Lake Store trusted identity provider list information. 1474type TrustedIDProviderListResult struct { 1475 autorest.Response `json:"-"` 1476 // Value - READ-ONLY; The results of the list operation. 1477 Value *[]TrustedIDProvider `json:"value,omitempty"` 1478 // NextLink - READ-ONLY; The link (url) to the next page of results. 1479 NextLink *string `json:"nextLink,omitempty"` 1480} 1481 1482// MarshalJSON is the custom marshaler for TrustedIDProviderListResult. 1483func (tiplr TrustedIDProviderListResult) MarshalJSON() ([]byte, error) { 1484 objectMap := make(map[string]interface{}) 1485 return json.Marshal(objectMap) 1486} 1487 1488// TrustedIDProviderListResultIterator provides access to a complete listing of TrustedIDProvider values. 1489type TrustedIDProviderListResultIterator struct { 1490 i int 1491 page TrustedIDProviderListResultPage 1492} 1493 1494// NextWithContext advances to the next value. If there was an error making 1495// the request the iterator does not advance and the error is returned. 1496func (iter *TrustedIDProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { 1497 if tracing.IsEnabled() { 1498 ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProviderListResultIterator.NextWithContext") 1499 defer func() { 1500 sc := -1 1501 if iter.Response().Response.Response != nil { 1502 sc = iter.Response().Response.Response.StatusCode 1503 } 1504 tracing.EndSpan(ctx, sc, err) 1505 }() 1506 } 1507 iter.i++ 1508 if iter.i < len(iter.page.Values()) { 1509 return nil 1510 } 1511 err = iter.page.NextWithContext(ctx) 1512 if err != nil { 1513 iter.i-- 1514 return err 1515 } 1516 iter.i = 0 1517 return nil 1518} 1519 1520// Next advances to the next value. If there was an error making 1521// the request the iterator does not advance and the error is returned. 1522// Deprecated: Use NextWithContext() instead. 1523func (iter *TrustedIDProviderListResultIterator) Next() error { 1524 return iter.NextWithContext(context.Background()) 1525} 1526 1527// NotDone returns true if the enumeration should be started or is not yet complete. 1528func (iter TrustedIDProviderListResultIterator) NotDone() bool { 1529 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1530} 1531 1532// Response returns the raw server response from the last page request. 1533func (iter TrustedIDProviderListResultIterator) Response() TrustedIDProviderListResult { 1534 return iter.page.Response() 1535} 1536 1537// Value returns the current value or a zero-initialized value if the 1538// iterator has advanced beyond the end of the collection. 1539func (iter TrustedIDProviderListResultIterator) Value() TrustedIDProvider { 1540 if !iter.page.NotDone() { 1541 return TrustedIDProvider{} 1542 } 1543 return iter.page.Values()[iter.i] 1544} 1545 1546// Creates a new instance of the TrustedIDProviderListResultIterator type. 1547func NewTrustedIDProviderListResultIterator(page TrustedIDProviderListResultPage) TrustedIDProviderListResultIterator { 1548 return TrustedIDProviderListResultIterator{page: page} 1549} 1550 1551// IsEmpty returns true if the ListResult contains no values. 1552func (tiplr TrustedIDProviderListResult) IsEmpty() bool { 1553 return tiplr.Value == nil || len(*tiplr.Value) == 0 1554} 1555 1556// hasNextLink returns true if the NextLink is not empty. 1557func (tiplr TrustedIDProviderListResult) hasNextLink() bool { 1558 return tiplr.NextLink != nil && len(*tiplr.NextLink) != 0 1559} 1560 1561// trustedIDProviderListResultPreparer prepares a request to retrieve the next set of results. 1562// It returns nil if no more results exist. 1563func (tiplr TrustedIDProviderListResult) trustedIDProviderListResultPreparer(ctx context.Context) (*http.Request, error) { 1564 if !tiplr.hasNextLink() { 1565 return nil, nil 1566 } 1567 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1568 autorest.AsJSON(), 1569 autorest.AsGet(), 1570 autorest.WithBaseURL(to.String(tiplr.NextLink))) 1571} 1572 1573// TrustedIDProviderListResultPage contains a page of TrustedIDProvider values. 1574type TrustedIDProviderListResultPage struct { 1575 fn func(context.Context, TrustedIDProviderListResult) (TrustedIDProviderListResult, error) 1576 tiplr TrustedIDProviderListResult 1577} 1578 1579// NextWithContext advances to the next page of values. If there was an error making 1580// the request the page does not advance and the error is returned. 1581func (page *TrustedIDProviderListResultPage) NextWithContext(ctx context.Context) (err error) { 1582 if tracing.IsEnabled() { 1583 ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProviderListResultPage.NextWithContext") 1584 defer func() { 1585 sc := -1 1586 if page.Response().Response.Response != nil { 1587 sc = page.Response().Response.Response.StatusCode 1588 } 1589 tracing.EndSpan(ctx, sc, err) 1590 }() 1591 } 1592 for { 1593 next, err := page.fn(ctx, page.tiplr) 1594 if err != nil { 1595 return err 1596 } 1597 page.tiplr = next 1598 if !next.hasNextLink() || !next.IsEmpty() { 1599 break 1600 } 1601 } 1602 return nil 1603} 1604 1605// Next advances to the next page of values. If there was an error making 1606// the request the page does not advance and the error is returned. 1607// Deprecated: Use NextWithContext() instead. 1608func (page *TrustedIDProviderListResultPage) Next() error { 1609 return page.NextWithContext(context.Background()) 1610} 1611 1612// NotDone returns true if the page enumeration should be started or is not yet complete. 1613func (page TrustedIDProviderListResultPage) NotDone() bool { 1614 return !page.tiplr.IsEmpty() 1615} 1616 1617// Response returns the raw server response from the last page request. 1618func (page TrustedIDProviderListResultPage) Response() TrustedIDProviderListResult { 1619 return page.tiplr 1620} 1621 1622// Values returns the slice of values for the current page or nil if there are no values. 1623func (page TrustedIDProviderListResultPage) Values() []TrustedIDProvider { 1624 if page.tiplr.IsEmpty() { 1625 return nil 1626 } 1627 return *page.tiplr.Value 1628} 1629 1630// Creates a new instance of the TrustedIDProviderListResultPage type. 1631func NewTrustedIDProviderListResultPage(cur TrustedIDProviderListResult, getNextPage func(context.Context, TrustedIDProviderListResult) (TrustedIDProviderListResult, error)) TrustedIDProviderListResultPage { 1632 return TrustedIDProviderListResultPage{ 1633 fn: getNextPage, 1634 tiplr: cur, 1635 } 1636} 1637 1638// TrustedIDProviderProperties the trusted identity provider properties. 1639type TrustedIDProviderProperties struct { 1640 // IDProvider - READ-ONLY; The URL of this trusted identity provider. 1641 IDProvider *string `json:"idProvider,omitempty"` 1642} 1643 1644// MarshalJSON is the custom marshaler for TrustedIDProviderProperties. 1645func (tipp TrustedIDProviderProperties) MarshalJSON() ([]byte, error) { 1646 objectMap := make(map[string]interface{}) 1647 return json.Marshal(objectMap) 1648} 1649 1650// UpdateDataLakeStoreAccountParameters data Lake Store account information to update. 1651type UpdateDataLakeStoreAccountParameters struct { 1652 // Tags - Resource tags 1653 Tags map[string]*string `json:"tags"` 1654 // UpdateDataLakeStoreAccountProperties - The Data Lake Store account properties to update. 1655 *UpdateDataLakeStoreAccountProperties `json:"properties,omitempty"` 1656} 1657 1658// MarshalJSON is the custom marshaler for UpdateDataLakeStoreAccountParameters. 1659func (udlsap UpdateDataLakeStoreAccountParameters) MarshalJSON() ([]byte, error) { 1660 objectMap := make(map[string]interface{}) 1661 if udlsap.Tags != nil { 1662 objectMap["tags"] = udlsap.Tags 1663 } 1664 if udlsap.UpdateDataLakeStoreAccountProperties != nil { 1665 objectMap["properties"] = udlsap.UpdateDataLakeStoreAccountProperties 1666 } 1667 return json.Marshal(objectMap) 1668} 1669 1670// UnmarshalJSON is the custom unmarshaler for UpdateDataLakeStoreAccountParameters struct. 1671func (udlsap *UpdateDataLakeStoreAccountParameters) UnmarshalJSON(body []byte) error { 1672 var m map[string]*json.RawMessage 1673 err := json.Unmarshal(body, &m) 1674 if err != nil { 1675 return err 1676 } 1677 for k, v := range m { 1678 switch k { 1679 case "tags": 1680 if v != nil { 1681 var tags map[string]*string 1682 err = json.Unmarshal(*v, &tags) 1683 if err != nil { 1684 return err 1685 } 1686 udlsap.Tags = tags 1687 } 1688 case "properties": 1689 if v != nil { 1690 var updateDataLakeStoreAccountProperties UpdateDataLakeStoreAccountProperties 1691 err = json.Unmarshal(*v, &updateDataLakeStoreAccountProperties) 1692 if err != nil { 1693 return err 1694 } 1695 udlsap.UpdateDataLakeStoreAccountProperties = &updateDataLakeStoreAccountProperties 1696 } 1697 } 1698 } 1699 1700 return nil 1701} 1702 1703// UpdateDataLakeStoreAccountProperties data Lake Store account properties information to be updated. 1704type UpdateDataLakeStoreAccountProperties struct { 1705 // DefaultGroup - The default owner group for all new folders and files created in the Data Lake Store account. 1706 DefaultGroup *string `json:"defaultGroup,omitempty"` 1707 // EncryptionConfig - Used for rotation of user managed Key Vault keys. Can only be used to rotate a user managed encryption Key Vault key. 1708 EncryptionConfig *UpdateEncryptionConfig `json:"encryptionConfig,omitempty"` 1709 // FirewallRules - The list of firewall rules associated with this Data Lake Store account. 1710 FirewallRules *[]UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"` 1711 // VirtualNetworkRules - The list of virtual network rules associated with this Data Lake Store account. 1712 VirtualNetworkRules *[]UpdateVirtualNetworkRuleWithAccountParameters `json:"virtualNetworkRules,omitempty"` 1713 // FirewallState - The current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled. Possible values include: 'FirewallStateEnabled', 'FirewallStateDisabled' 1714 FirewallState FirewallState `json:"firewallState,omitempty"` 1715 // FirewallAllowAzureIps - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced. Possible values include: 'FirewallAllowAzureIpsStateEnabled', 'FirewallAllowAzureIpsStateDisabled' 1716 FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` 1717 // TrustedIDProviders - The list of trusted identity providers associated with this Data Lake Store account. 1718 TrustedIDProviders *[]UpdateTrustedIDProviderWithAccountParameters `json:"trustedIdProviders,omitempty"` 1719 // TrustedIDProviderState - The current state of the trusted identity provider feature for this Data Lake Store account. Disabling trusted identity provider functionality does not remove the providers, they will just be ignored until this feature is re-enabled. Possible values include: 'TrustedIDProviderStateEnabled', 'TrustedIDProviderStateDisabled' 1720 TrustedIDProviderState TrustedIDProviderState `json:"trustedIdProviderState,omitempty"` 1721 // NewTier - The commitment tier to use for next month. Possible values include: 'Consumption', 'Commitment1TB', 'Commitment10TB', 'Commitment100TB', 'Commitment500TB', 'Commitment1PB', 'Commitment5PB' 1722 NewTier TierType `json:"newTier,omitempty"` 1723} 1724 1725// UpdateEncryptionConfig the encryption configuration used to update a user managed Key Vault key. 1726type UpdateEncryptionConfig struct { 1727 // KeyVaultMetaInfo - The updated Key Vault key to use in user managed key rotation. 1728 KeyVaultMetaInfo *UpdateKeyVaultMetaInfo `json:"keyVaultMetaInfo,omitempty"` 1729} 1730 1731// UpdateFirewallRuleParameters the parameters used to update a firewall rule. 1732type UpdateFirewallRuleParameters struct { 1733 // UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule. 1734 *UpdateFirewallRuleProperties `json:"properties,omitempty"` 1735} 1736 1737// MarshalJSON is the custom marshaler for UpdateFirewallRuleParameters. 1738func (ufrp UpdateFirewallRuleParameters) MarshalJSON() ([]byte, error) { 1739 objectMap := make(map[string]interface{}) 1740 if ufrp.UpdateFirewallRuleProperties != nil { 1741 objectMap["properties"] = ufrp.UpdateFirewallRuleProperties 1742 } 1743 return json.Marshal(objectMap) 1744} 1745 1746// UnmarshalJSON is the custom unmarshaler for UpdateFirewallRuleParameters struct. 1747func (ufrp *UpdateFirewallRuleParameters) UnmarshalJSON(body []byte) error { 1748 var m map[string]*json.RawMessage 1749 err := json.Unmarshal(body, &m) 1750 if err != nil { 1751 return err 1752 } 1753 for k, v := range m { 1754 switch k { 1755 case "properties": 1756 if v != nil { 1757 var updateFirewallRuleProperties UpdateFirewallRuleProperties 1758 err = json.Unmarshal(*v, &updateFirewallRuleProperties) 1759 if err != nil { 1760 return err 1761 } 1762 ufrp.UpdateFirewallRuleProperties = &updateFirewallRuleProperties 1763 } 1764 } 1765 } 1766 1767 return nil 1768} 1769 1770// UpdateFirewallRuleProperties the firewall rule properties to use when updating a firewall rule. 1771type UpdateFirewallRuleProperties struct { 1772 // StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. 1773 StartIPAddress *string `json:"startIpAddress,omitempty"` 1774 // EndIPAddress - The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. 1775 EndIPAddress *string `json:"endIpAddress,omitempty"` 1776} 1777 1778// UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a 1779// Data Lake Store account. 1780type UpdateFirewallRuleWithAccountParameters struct { 1781 // Name - The unique name of the firewall rule to update. 1782 Name *string `json:"name,omitempty"` 1783 // UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule. 1784 *UpdateFirewallRuleProperties `json:"properties,omitempty"` 1785} 1786 1787// MarshalJSON is the custom marshaler for UpdateFirewallRuleWithAccountParameters. 1788func (ufrwap UpdateFirewallRuleWithAccountParameters) MarshalJSON() ([]byte, error) { 1789 objectMap := make(map[string]interface{}) 1790 if ufrwap.Name != nil { 1791 objectMap["name"] = ufrwap.Name 1792 } 1793 if ufrwap.UpdateFirewallRuleProperties != nil { 1794 objectMap["properties"] = ufrwap.UpdateFirewallRuleProperties 1795 } 1796 return json.Marshal(objectMap) 1797} 1798 1799// UnmarshalJSON is the custom unmarshaler for UpdateFirewallRuleWithAccountParameters struct. 1800func (ufrwap *UpdateFirewallRuleWithAccountParameters) UnmarshalJSON(body []byte) error { 1801 var m map[string]*json.RawMessage 1802 err := json.Unmarshal(body, &m) 1803 if err != nil { 1804 return err 1805 } 1806 for k, v := range m { 1807 switch k { 1808 case "name": 1809 if v != nil { 1810 var name string 1811 err = json.Unmarshal(*v, &name) 1812 if err != nil { 1813 return err 1814 } 1815 ufrwap.Name = &name 1816 } 1817 case "properties": 1818 if v != nil { 1819 var updateFirewallRuleProperties UpdateFirewallRuleProperties 1820 err = json.Unmarshal(*v, &updateFirewallRuleProperties) 1821 if err != nil { 1822 return err 1823 } 1824 ufrwap.UpdateFirewallRuleProperties = &updateFirewallRuleProperties 1825 } 1826 } 1827 } 1828 1829 return nil 1830} 1831 1832// UpdateKeyVaultMetaInfo the Key Vault update information used for user managed key rotation. 1833type UpdateKeyVaultMetaInfo struct { 1834 // EncryptionKeyVersion - The version of the user managed encryption key to update through a key rotation. 1835 EncryptionKeyVersion *string `json:"encryptionKeyVersion,omitempty"` 1836} 1837 1838// UpdateTrustedIDProviderParameters the parameters used to update a trusted identity provider. 1839type UpdateTrustedIDProviderParameters struct { 1840 // UpdateTrustedIDProviderProperties - The trusted identity provider properties to use when updating a trusted identity provider. 1841 *UpdateTrustedIDProviderProperties `json:"properties,omitempty"` 1842} 1843 1844// MarshalJSON is the custom marshaler for UpdateTrustedIDProviderParameters. 1845func (utipp UpdateTrustedIDProviderParameters) MarshalJSON() ([]byte, error) { 1846 objectMap := make(map[string]interface{}) 1847 if utipp.UpdateTrustedIDProviderProperties != nil { 1848 objectMap["properties"] = utipp.UpdateTrustedIDProviderProperties 1849 } 1850 return json.Marshal(objectMap) 1851} 1852 1853// UnmarshalJSON is the custom unmarshaler for UpdateTrustedIDProviderParameters struct. 1854func (utipp *UpdateTrustedIDProviderParameters) UnmarshalJSON(body []byte) error { 1855 var m map[string]*json.RawMessage 1856 err := json.Unmarshal(body, &m) 1857 if err != nil { 1858 return err 1859 } 1860 for k, v := range m { 1861 switch k { 1862 case "properties": 1863 if v != nil { 1864 var updateTrustedIDProviderProperties UpdateTrustedIDProviderProperties 1865 err = json.Unmarshal(*v, &updateTrustedIDProviderProperties) 1866 if err != nil { 1867 return err 1868 } 1869 utipp.UpdateTrustedIDProviderProperties = &updateTrustedIDProviderProperties 1870 } 1871 } 1872 } 1873 1874 return nil 1875} 1876 1877// UpdateTrustedIDProviderProperties the trusted identity provider properties to use when updating a 1878// trusted identity provider. 1879type UpdateTrustedIDProviderProperties struct { 1880 // IDProvider - The URL of this trusted identity provider. 1881 IDProvider *string `json:"idProvider,omitempty"` 1882} 1883 1884// UpdateTrustedIDProviderWithAccountParameters the parameters used to update a trusted identity provider 1885// while updating a Data Lake Store account. 1886type UpdateTrustedIDProviderWithAccountParameters struct { 1887 // Name - The unique name of the trusted identity provider to update. 1888 Name *string `json:"name,omitempty"` 1889 // UpdateTrustedIDProviderProperties - The trusted identity provider properties to use when updating a trusted identity provider. 1890 *UpdateTrustedIDProviderProperties `json:"properties,omitempty"` 1891} 1892 1893// MarshalJSON is the custom marshaler for UpdateTrustedIDProviderWithAccountParameters. 1894func (utipwap UpdateTrustedIDProviderWithAccountParameters) MarshalJSON() ([]byte, error) { 1895 objectMap := make(map[string]interface{}) 1896 if utipwap.Name != nil { 1897 objectMap["name"] = utipwap.Name 1898 } 1899 if utipwap.UpdateTrustedIDProviderProperties != nil { 1900 objectMap["properties"] = utipwap.UpdateTrustedIDProviderProperties 1901 } 1902 return json.Marshal(objectMap) 1903} 1904 1905// UnmarshalJSON is the custom unmarshaler for UpdateTrustedIDProviderWithAccountParameters struct. 1906func (utipwap *UpdateTrustedIDProviderWithAccountParameters) UnmarshalJSON(body []byte) error { 1907 var m map[string]*json.RawMessage 1908 err := json.Unmarshal(body, &m) 1909 if err != nil { 1910 return err 1911 } 1912 for k, v := range m { 1913 switch k { 1914 case "name": 1915 if v != nil { 1916 var name string 1917 err = json.Unmarshal(*v, &name) 1918 if err != nil { 1919 return err 1920 } 1921 utipwap.Name = &name 1922 } 1923 case "properties": 1924 if v != nil { 1925 var updateTrustedIDProviderProperties UpdateTrustedIDProviderProperties 1926 err = json.Unmarshal(*v, &updateTrustedIDProviderProperties) 1927 if err != nil { 1928 return err 1929 } 1930 utipwap.UpdateTrustedIDProviderProperties = &updateTrustedIDProviderProperties 1931 } 1932 } 1933 } 1934 1935 return nil 1936} 1937 1938// UpdateVirtualNetworkRuleParameters the parameters used to update a virtual network rule. 1939type UpdateVirtualNetworkRuleParameters struct { 1940 // UpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when updating a virtual network rule. 1941 *UpdateVirtualNetworkRuleProperties `json:"properties,omitempty"` 1942} 1943 1944// MarshalJSON is the custom marshaler for UpdateVirtualNetworkRuleParameters. 1945func (uvnrp UpdateVirtualNetworkRuleParameters) MarshalJSON() ([]byte, error) { 1946 objectMap := make(map[string]interface{}) 1947 if uvnrp.UpdateVirtualNetworkRuleProperties != nil { 1948 objectMap["properties"] = uvnrp.UpdateVirtualNetworkRuleProperties 1949 } 1950 return json.Marshal(objectMap) 1951} 1952 1953// UnmarshalJSON is the custom unmarshaler for UpdateVirtualNetworkRuleParameters struct. 1954func (uvnrp *UpdateVirtualNetworkRuleParameters) UnmarshalJSON(body []byte) error { 1955 var m map[string]*json.RawMessage 1956 err := json.Unmarshal(body, &m) 1957 if err != nil { 1958 return err 1959 } 1960 for k, v := range m { 1961 switch k { 1962 case "properties": 1963 if v != nil { 1964 var updateVirtualNetworkRuleProperties UpdateVirtualNetworkRuleProperties 1965 err = json.Unmarshal(*v, &updateVirtualNetworkRuleProperties) 1966 if err != nil { 1967 return err 1968 } 1969 uvnrp.UpdateVirtualNetworkRuleProperties = &updateVirtualNetworkRuleProperties 1970 } 1971 } 1972 } 1973 1974 return nil 1975} 1976 1977// UpdateVirtualNetworkRuleProperties the virtual network rule properties to use when updating a virtual 1978// network rule. 1979type UpdateVirtualNetworkRuleProperties struct { 1980 // SubnetID - The resource identifier for the subnet. 1981 SubnetID *string `json:"subnetId,omitempty"` 1982} 1983 1984// UpdateVirtualNetworkRuleWithAccountParameters the parameters used to update a virtual network rule while 1985// updating a Data Lake Store account. 1986type UpdateVirtualNetworkRuleWithAccountParameters struct { 1987 // Name - The unique name of the virtual network rule to update. 1988 Name *string `json:"name,omitempty"` 1989 // UpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when updating a virtual network rule. 1990 *UpdateVirtualNetworkRuleProperties `json:"properties,omitempty"` 1991} 1992 1993// MarshalJSON is the custom marshaler for UpdateVirtualNetworkRuleWithAccountParameters. 1994func (uvnrwap UpdateVirtualNetworkRuleWithAccountParameters) MarshalJSON() ([]byte, error) { 1995 objectMap := make(map[string]interface{}) 1996 if uvnrwap.Name != nil { 1997 objectMap["name"] = uvnrwap.Name 1998 } 1999 if uvnrwap.UpdateVirtualNetworkRuleProperties != nil { 2000 objectMap["properties"] = uvnrwap.UpdateVirtualNetworkRuleProperties 2001 } 2002 return json.Marshal(objectMap) 2003} 2004 2005// UnmarshalJSON is the custom unmarshaler for UpdateVirtualNetworkRuleWithAccountParameters struct. 2006func (uvnrwap *UpdateVirtualNetworkRuleWithAccountParameters) UnmarshalJSON(body []byte) error { 2007 var m map[string]*json.RawMessage 2008 err := json.Unmarshal(body, &m) 2009 if err != nil { 2010 return err 2011 } 2012 for k, v := range m { 2013 switch k { 2014 case "name": 2015 if v != nil { 2016 var name string 2017 err = json.Unmarshal(*v, &name) 2018 if err != nil { 2019 return err 2020 } 2021 uvnrwap.Name = &name 2022 } 2023 case "properties": 2024 if v != nil { 2025 var updateVirtualNetworkRuleProperties UpdateVirtualNetworkRuleProperties 2026 err = json.Unmarshal(*v, &updateVirtualNetworkRuleProperties) 2027 if err != nil { 2028 return err 2029 } 2030 uvnrwap.UpdateVirtualNetworkRuleProperties = &updateVirtualNetworkRuleProperties 2031 } 2032 } 2033 } 2034 2035 return nil 2036} 2037 2038// Usage describes the Resource Usage. 2039type Usage struct { 2040 // Unit - READ-ONLY; Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond' 2041 Unit UsageUnit `json:"unit,omitempty"` 2042 // ID - READ-ONLY; Resource identifier. 2043 ID *string `json:"id,omitempty"` 2044 // CurrentValue - READ-ONLY; Gets the current count of the allocated resources in the subscription. 2045 CurrentValue *int32 `json:"currentValue,omitempty"` 2046 // Limit - READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription. 2047 Limit *int32 `json:"limit,omitempty"` 2048 // Name - READ-ONLY; Gets the name of the type of usage. 2049 Name *UsageName `json:"name,omitempty"` 2050} 2051 2052// MarshalJSON is the custom marshaler for Usage. 2053func (u Usage) MarshalJSON() ([]byte, error) { 2054 objectMap := make(map[string]interface{}) 2055 return json.Marshal(objectMap) 2056} 2057 2058// UsageListResult the response from the List Usages operation. 2059type UsageListResult struct { 2060 autorest.Response `json:"-"` 2061 // Value - Gets or sets the list of Storage Resource Usages. 2062 Value *[]Usage `json:"value,omitempty"` 2063} 2064 2065// UsageName the usage names that can be used. 2066type UsageName struct { 2067 // Value - READ-ONLY; Gets a string describing the resource name. 2068 Value *string `json:"value,omitempty"` 2069 // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. 2070 LocalizedValue *string `json:"localizedValue,omitempty"` 2071} 2072 2073// MarshalJSON is the custom marshaler for UsageName. 2074func (un UsageName) MarshalJSON() ([]byte, error) { 2075 objectMap := make(map[string]interface{}) 2076 return json.Marshal(objectMap) 2077} 2078 2079// VirtualNetworkRule data Lake Store virtual network rule information. 2080type VirtualNetworkRule struct { 2081 autorest.Response `json:"-"` 2082 // VirtualNetworkRuleProperties - READ-ONLY; The virtual network rule properties. 2083 *VirtualNetworkRuleProperties `json:"properties,omitempty"` 2084 // ID - READ-ONLY; The resource identifier. 2085 ID *string `json:"id,omitempty"` 2086 // Name - READ-ONLY; The resource name. 2087 Name *string `json:"name,omitempty"` 2088 // Type - READ-ONLY; The resource type. 2089 Type *string `json:"type,omitempty"` 2090} 2091 2092// MarshalJSON is the custom marshaler for VirtualNetworkRule. 2093func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) { 2094 objectMap := make(map[string]interface{}) 2095 return json.Marshal(objectMap) 2096} 2097 2098// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct. 2099func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error { 2100 var m map[string]*json.RawMessage 2101 err := json.Unmarshal(body, &m) 2102 if err != nil { 2103 return err 2104 } 2105 for k, v := range m { 2106 switch k { 2107 case "properties": 2108 if v != nil { 2109 var virtualNetworkRuleProperties VirtualNetworkRuleProperties 2110 err = json.Unmarshal(*v, &virtualNetworkRuleProperties) 2111 if err != nil { 2112 return err 2113 } 2114 vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties 2115 } 2116 case "id": 2117 if v != nil { 2118 var ID string 2119 err = json.Unmarshal(*v, &ID) 2120 if err != nil { 2121 return err 2122 } 2123 vnr.ID = &ID 2124 } 2125 case "name": 2126 if v != nil { 2127 var name string 2128 err = json.Unmarshal(*v, &name) 2129 if err != nil { 2130 return err 2131 } 2132 vnr.Name = &name 2133 } 2134 case "type": 2135 if v != nil { 2136 var typeVar string 2137 err = json.Unmarshal(*v, &typeVar) 2138 if err != nil { 2139 return err 2140 } 2141 vnr.Type = &typeVar 2142 } 2143 } 2144 } 2145 2146 return nil 2147} 2148 2149// VirtualNetworkRuleListResult data Lake Store virtual network rule list information. 2150type VirtualNetworkRuleListResult struct { 2151 autorest.Response `json:"-"` 2152 // Value - READ-ONLY; The results of the list operation. 2153 Value *[]VirtualNetworkRule `json:"value,omitempty"` 2154 // NextLink - READ-ONLY; The link (url) to the next page of results. 2155 NextLink *string `json:"nextLink,omitempty"` 2156} 2157 2158// MarshalJSON is the custom marshaler for VirtualNetworkRuleListResult. 2159func (vnrlr VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { 2160 objectMap := make(map[string]interface{}) 2161 return json.Marshal(objectMap) 2162} 2163 2164// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values. 2165type VirtualNetworkRuleListResultIterator struct { 2166 i int 2167 page VirtualNetworkRuleListResultPage 2168} 2169 2170// NextWithContext advances to the next value. If there was an error making 2171// the request the iterator does not advance and the error is returned. 2172func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { 2173 if tracing.IsEnabled() { 2174 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext") 2175 defer func() { 2176 sc := -1 2177 if iter.Response().Response.Response != nil { 2178 sc = iter.Response().Response.Response.StatusCode 2179 } 2180 tracing.EndSpan(ctx, sc, err) 2181 }() 2182 } 2183 iter.i++ 2184 if iter.i < len(iter.page.Values()) { 2185 return nil 2186 } 2187 err = iter.page.NextWithContext(ctx) 2188 if err != nil { 2189 iter.i-- 2190 return err 2191 } 2192 iter.i = 0 2193 return nil 2194} 2195 2196// Next advances to the next value. If there was an error making 2197// the request the iterator does not advance and the error is returned. 2198// Deprecated: Use NextWithContext() instead. 2199func (iter *VirtualNetworkRuleListResultIterator) Next() error { 2200 return iter.NextWithContext(context.Background()) 2201} 2202 2203// NotDone returns true if the enumeration should be started or is not yet complete. 2204func (iter VirtualNetworkRuleListResultIterator) NotDone() bool { 2205 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2206} 2207 2208// Response returns the raw server response from the last page request. 2209func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult { 2210 return iter.page.Response() 2211} 2212 2213// Value returns the current value or a zero-initialized value if the 2214// iterator has advanced beyond the end of the collection. 2215func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule { 2216 if !iter.page.NotDone() { 2217 return VirtualNetworkRule{} 2218 } 2219 return iter.page.Values()[iter.i] 2220} 2221 2222// Creates a new instance of the VirtualNetworkRuleListResultIterator type. 2223func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator { 2224 return VirtualNetworkRuleListResultIterator{page: page} 2225} 2226 2227// IsEmpty returns true if the ListResult contains no values. 2228func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool { 2229 return vnrlr.Value == nil || len(*vnrlr.Value) == 0 2230} 2231 2232// hasNextLink returns true if the NextLink is not empty. 2233func (vnrlr VirtualNetworkRuleListResult) hasNextLink() bool { 2234 return vnrlr.NextLink != nil && len(*vnrlr.NextLink) != 0 2235} 2236 2237// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results. 2238// It returns nil if no more results exist. 2239func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) { 2240 if !vnrlr.hasNextLink() { 2241 return nil, nil 2242 } 2243 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2244 autorest.AsJSON(), 2245 autorest.AsGet(), 2246 autorest.WithBaseURL(to.String(vnrlr.NextLink))) 2247} 2248 2249// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values. 2250type VirtualNetworkRuleListResultPage struct { 2251 fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error) 2252 vnrlr VirtualNetworkRuleListResult 2253} 2254 2255// NextWithContext advances to the next page of values. If there was an error making 2256// the request the page does not advance and the error is returned. 2257func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) { 2258 if tracing.IsEnabled() { 2259 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext") 2260 defer func() { 2261 sc := -1 2262 if page.Response().Response.Response != nil { 2263 sc = page.Response().Response.Response.StatusCode 2264 } 2265 tracing.EndSpan(ctx, sc, err) 2266 }() 2267 } 2268 for { 2269 next, err := page.fn(ctx, page.vnrlr) 2270 if err != nil { 2271 return err 2272 } 2273 page.vnrlr = next 2274 if !next.hasNextLink() || !next.IsEmpty() { 2275 break 2276 } 2277 } 2278 return nil 2279} 2280 2281// Next advances to the next page of values. If there was an error making 2282// the request the page does not advance and the error is returned. 2283// Deprecated: Use NextWithContext() instead. 2284func (page *VirtualNetworkRuleListResultPage) Next() error { 2285 return page.NextWithContext(context.Background()) 2286} 2287 2288// NotDone returns true if the page enumeration should be started or is not yet complete. 2289func (page VirtualNetworkRuleListResultPage) NotDone() bool { 2290 return !page.vnrlr.IsEmpty() 2291} 2292 2293// Response returns the raw server response from the last page request. 2294func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult { 2295 return page.vnrlr 2296} 2297 2298// Values returns the slice of values for the current page or nil if there are no values. 2299func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule { 2300 if page.vnrlr.IsEmpty() { 2301 return nil 2302 } 2303 return *page.vnrlr.Value 2304} 2305 2306// Creates a new instance of the VirtualNetworkRuleListResultPage type. 2307func NewVirtualNetworkRuleListResultPage(cur VirtualNetworkRuleListResult, getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage { 2308 return VirtualNetworkRuleListResultPage{ 2309 fn: getNextPage, 2310 vnrlr: cur, 2311 } 2312} 2313 2314// VirtualNetworkRuleProperties the virtual network rule properties. 2315type VirtualNetworkRuleProperties struct { 2316 // SubnetID - READ-ONLY; The resource identifier for the subnet. 2317 SubnetID *string `json:"subnetId,omitempty"` 2318} 2319 2320// MarshalJSON is the custom marshaler for VirtualNetworkRuleProperties. 2321func (vnrp VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error) { 2322 objectMap := make(map[string]interface{}) 2323 return json.Marshal(objectMap) 2324} 2325