1package storage 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 10 "context" 11 "encoding/json" 12 "github.com/Azure/go-autorest/autorest" 13 "github.com/Azure/go-autorest/autorest/azure" 14 "github.com/Azure/go-autorest/autorest/date" 15 "github.com/Azure/go-autorest/autorest/to" 16 "github.com/Azure/go-autorest/tracing" 17 "net/http" 18) 19 20// The package's fully qualified name. 21const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" 22 23// Account the storage account. 24type Account struct { 25 autorest.Response `json:"-"` 26 // Sku - READ-ONLY; Gets the SKU. 27 Sku *Sku `json:"sku,omitempty"` 28 // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' 29 Kind Kind `json:"kind,omitempty"` 30 // Identity - The identity of the resource. 31 Identity *Identity `json:"identity,omitempty"` 32 // AccountProperties - Properties of the storage account. 33 *AccountProperties `json:"properties,omitempty"` 34 // Tags - Resource tags. 35 Tags map[string]*string `json:"tags"` 36 // Location - The geo-location where the resource lives 37 Location *string `json:"location,omitempty"` 38 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 39 ID *string `json:"id,omitempty"` 40 // Name - READ-ONLY; The name of the resource 41 Name *string `json:"name,omitempty"` 42 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 43 Type *string `json:"type,omitempty"` 44} 45 46// MarshalJSON is the custom marshaler for Account. 47func (a Account) MarshalJSON() ([]byte, error) { 48 objectMap := make(map[string]interface{}) 49 if a.Identity != nil { 50 objectMap["identity"] = a.Identity 51 } 52 if a.AccountProperties != nil { 53 objectMap["properties"] = a.AccountProperties 54 } 55 if a.Tags != nil { 56 objectMap["tags"] = a.Tags 57 } 58 if a.Location != nil { 59 objectMap["location"] = a.Location 60 } 61 return json.Marshal(objectMap) 62} 63 64// UnmarshalJSON is the custom unmarshaler for Account struct. 65func (a *Account) UnmarshalJSON(body []byte) error { 66 var m map[string]*json.RawMessage 67 err := json.Unmarshal(body, &m) 68 if err != nil { 69 return err 70 } 71 for k, v := range m { 72 switch k { 73 case "sku": 74 if v != nil { 75 var sku Sku 76 err = json.Unmarshal(*v, &sku) 77 if err != nil { 78 return err 79 } 80 a.Sku = &sku 81 } 82 case "kind": 83 if v != nil { 84 var kind Kind 85 err = json.Unmarshal(*v, &kind) 86 if err != nil { 87 return err 88 } 89 a.Kind = kind 90 } 91 case "identity": 92 if v != nil { 93 var identity Identity 94 err = json.Unmarshal(*v, &identity) 95 if err != nil { 96 return err 97 } 98 a.Identity = &identity 99 } 100 case "properties": 101 if v != nil { 102 var accountProperties AccountProperties 103 err = json.Unmarshal(*v, &accountProperties) 104 if err != nil { 105 return err 106 } 107 a.AccountProperties = &accountProperties 108 } 109 case "tags": 110 if v != nil { 111 var tags map[string]*string 112 err = json.Unmarshal(*v, &tags) 113 if err != nil { 114 return err 115 } 116 a.Tags = tags 117 } 118 case "location": 119 if v != nil { 120 var location string 121 err = json.Unmarshal(*v, &location) 122 if err != nil { 123 return err 124 } 125 a.Location = &location 126 } 127 case "id": 128 if v != nil { 129 var ID string 130 err = json.Unmarshal(*v, &ID) 131 if err != nil { 132 return err 133 } 134 a.ID = &ID 135 } 136 case "name": 137 if v != nil { 138 var name string 139 err = json.Unmarshal(*v, &name) 140 if err != nil { 141 return err 142 } 143 a.Name = &name 144 } 145 case "type": 146 if v != nil { 147 var typeVar string 148 err = json.Unmarshal(*v, &typeVar) 149 if err != nil { 150 return err 151 } 152 a.Type = &typeVar 153 } 154 } 155 } 156 157 return nil 158} 159 160// AccountCheckNameAvailabilityParameters the parameters used to check the availability of the storage 161// account name. 162type AccountCheckNameAvailabilityParameters struct { 163 // Name - The storage account name. 164 Name *string `json:"name,omitempty"` 165 // Type - The type of resource, Microsoft.Storage/storageAccounts 166 Type *string `json:"type,omitempty"` 167} 168 169// AccountCreateParameters the parameters used when creating a storage account. 170type AccountCreateParameters struct { 171 // Sku - Required. Gets or sets the SKU name. 172 Sku *Sku `json:"sku,omitempty"` 173 // Kind - Required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' 174 Kind Kind `json:"kind,omitempty"` 175 // Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. 176 Location *string `json:"location,omitempty"` 177 // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. 178 Tags map[string]*string `json:"tags"` 179 // Identity - The identity of the resource. 180 Identity *Identity `json:"identity,omitempty"` 181 // AccountPropertiesCreateParameters - The parameters used to create the storage account. 182 *AccountPropertiesCreateParameters `json:"properties,omitempty"` 183} 184 185// MarshalJSON is the custom marshaler for AccountCreateParameters. 186func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) { 187 objectMap := make(map[string]interface{}) 188 if acp.Sku != nil { 189 objectMap["sku"] = acp.Sku 190 } 191 if acp.Kind != "" { 192 objectMap["kind"] = acp.Kind 193 } 194 if acp.Location != nil { 195 objectMap["location"] = acp.Location 196 } 197 if acp.Tags != nil { 198 objectMap["tags"] = acp.Tags 199 } 200 if acp.Identity != nil { 201 objectMap["identity"] = acp.Identity 202 } 203 if acp.AccountPropertiesCreateParameters != nil { 204 objectMap["properties"] = acp.AccountPropertiesCreateParameters 205 } 206 return json.Marshal(objectMap) 207} 208 209// UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct. 210func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { 211 var m map[string]*json.RawMessage 212 err := json.Unmarshal(body, &m) 213 if err != nil { 214 return err 215 } 216 for k, v := range m { 217 switch k { 218 case "sku": 219 if v != nil { 220 var sku Sku 221 err = json.Unmarshal(*v, &sku) 222 if err != nil { 223 return err 224 } 225 acp.Sku = &sku 226 } 227 case "kind": 228 if v != nil { 229 var kind Kind 230 err = json.Unmarshal(*v, &kind) 231 if err != nil { 232 return err 233 } 234 acp.Kind = kind 235 } 236 case "location": 237 if v != nil { 238 var location string 239 err = json.Unmarshal(*v, &location) 240 if err != nil { 241 return err 242 } 243 acp.Location = &location 244 } 245 case "tags": 246 if v != nil { 247 var tags map[string]*string 248 err = json.Unmarshal(*v, &tags) 249 if err != nil { 250 return err 251 } 252 acp.Tags = tags 253 } 254 case "identity": 255 if v != nil { 256 var identity Identity 257 err = json.Unmarshal(*v, &identity) 258 if err != nil { 259 return err 260 } 261 acp.Identity = &identity 262 } 263 case "properties": 264 if v != nil { 265 var accountPropertiesCreateParameters AccountPropertiesCreateParameters 266 err = json.Unmarshal(*v, &accountPropertiesCreateParameters) 267 if err != nil { 268 return err 269 } 270 acp.AccountPropertiesCreateParameters = &accountPropertiesCreateParameters 271 } 272 } 273 } 274 275 return nil 276} 277 278// AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or 279// dfs object via a internet routing endpoint. 280type AccountInternetEndpoints struct { 281 // Blob - READ-ONLY; Gets the blob endpoint. 282 Blob *string `json:"blob,omitempty"` 283 // File - READ-ONLY; Gets the file endpoint. 284 File *string `json:"file,omitempty"` 285 // Web - READ-ONLY; Gets the web endpoint. 286 Web *string `json:"web,omitempty"` 287 // Dfs - READ-ONLY; Gets the dfs endpoint. 288 Dfs *string `json:"dfs,omitempty"` 289} 290 291// MarshalJSON is the custom marshaler for AccountInternetEndpoints. 292func (aie AccountInternetEndpoints) MarshalJSON() ([]byte, error) { 293 objectMap := make(map[string]interface{}) 294 return json.Marshal(objectMap) 295} 296 297// AccountKey an access key for the storage account. 298type AccountKey struct { 299 // KeyName - READ-ONLY; Name of the key. 300 KeyName *string `json:"keyName,omitempty"` 301 // Value - READ-ONLY; Base 64-encoded value of the key. 302 Value *string `json:"value,omitempty"` 303 // Permissions - READ-ONLY; Permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full' 304 Permissions KeyPermission `json:"permissions,omitempty"` 305} 306 307// MarshalJSON is the custom marshaler for AccountKey. 308func (ak AccountKey) MarshalJSON() ([]byte, error) { 309 objectMap := make(map[string]interface{}) 310 return json.Marshal(objectMap) 311} 312 313// AccountListKeysResult the response from the ListKeys operation. 314type AccountListKeysResult struct { 315 autorest.Response `json:"-"` 316 // Keys - READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account. 317 Keys *[]AccountKey `json:"keys,omitempty"` 318} 319 320// MarshalJSON is the custom marshaler for AccountListKeysResult. 321func (alkr AccountListKeysResult) MarshalJSON() ([]byte, error) { 322 objectMap := make(map[string]interface{}) 323 return json.Marshal(objectMap) 324} 325 326// AccountListResult the response from the List Storage Accounts operation. 327type AccountListResult struct { 328 autorest.Response `json:"-"` 329 // Value - READ-ONLY; Gets the list of storage accounts and their properties. 330 Value *[]Account `json:"value,omitempty"` 331 // NextLink - READ-ONLY; Request URL that can be used to query next page of storage accounts. Returned when total number of requested storage accounts exceed maximum page size. 332 NextLink *string `json:"nextLink,omitempty"` 333} 334 335// MarshalJSON is the custom marshaler for AccountListResult. 336func (alr AccountListResult) MarshalJSON() ([]byte, error) { 337 objectMap := make(map[string]interface{}) 338 return json.Marshal(objectMap) 339} 340 341// AccountListResultIterator provides access to a complete listing of Account values. 342type AccountListResultIterator struct { 343 i int 344 page AccountListResultPage 345} 346 347// NextWithContext advances to the next value. If there was an error making 348// the request the iterator does not advance and the error is returned. 349func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) { 350 if tracing.IsEnabled() { 351 ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext") 352 defer func() { 353 sc := -1 354 if iter.Response().Response.Response != nil { 355 sc = iter.Response().Response.Response.StatusCode 356 } 357 tracing.EndSpan(ctx, sc, err) 358 }() 359 } 360 iter.i++ 361 if iter.i < len(iter.page.Values()) { 362 return nil 363 } 364 err = iter.page.NextWithContext(ctx) 365 if err != nil { 366 iter.i-- 367 return err 368 } 369 iter.i = 0 370 return nil 371} 372 373// Next advances to the next value. If there was an error making 374// the request the iterator does not advance and the error is returned. 375// Deprecated: Use NextWithContext() instead. 376func (iter *AccountListResultIterator) Next() error { 377 return iter.NextWithContext(context.Background()) 378} 379 380// NotDone returns true if the enumeration should be started or is not yet complete. 381func (iter AccountListResultIterator) NotDone() bool { 382 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 383} 384 385// Response returns the raw server response from the last page request. 386func (iter AccountListResultIterator) Response() AccountListResult { 387 return iter.page.Response() 388} 389 390// Value returns the current value or a zero-initialized value if the 391// iterator has advanced beyond the end of the collection. 392func (iter AccountListResultIterator) Value() Account { 393 if !iter.page.NotDone() { 394 return Account{} 395 } 396 return iter.page.Values()[iter.i] 397} 398 399// Creates a new instance of the AccountListResultIterator type. 400func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator { 401 return AccountListResultIterator{page: page} 402} 403 404// IsEmpty returns true if the ListResult contains no values. 405func (alr AccountListResult) IsEmpty() bool { 406 return alr.Value == nil || len(*alr.Value) == 0 407} 408 409// hasNextLink returns true if the NextLink is not empty. 410func (alr AccountListResult) hasNextLink() bool { 411 return alr.NextLink != nil && len(*alr.NextLink) != 0 412} 413 414// accountListResultPreparer prepares a request to retrieve the next set of results. 415// It returns nil if no more results exist. 416func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) { 417 if !alr.hasNextLink() { 418 return nil, nil 419 } 420 return autorest.Prepare((&http.Request{}).WithContext(ctx), 421 autorest.AsJSON(), 422 autorest.AsGet(), 423 autorest.WithBaseURL(to.String(alr.NextLink))) 424} 425 426// AccountListResultPage contains a page of Account values. 427type AccountListResultPage struct { 428 fn func(context.Context, AccountListResult) (AccountListResult, error) 429 alr AccountListResult 430} 431 432// NextWithContext advances to the next page of values. If there was an error making 433// the request the page does not advance and the error is returned. 434func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) { 435 if tracing.IsEnabled() { 436 ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext") 437 defer func() { 438 sc := -1 439 if page.Response().Response.Response != nil { 440 sc = page.Response().Response.Response.StatusCode 441 } 442 tracing.EndSpan(ctx, sc, err) 443 }() 444 } 445 for { 446 next, err := page.fn(ctx, page.alr) 447 if err != nil { 448 return err 449 } 450 page.alr = next 451 if !next.hasNextLink() || !next.IsEmpty() { 452 break 453 } 454 } 455 return nil 456} 457 458// Next advances to the next page of values. If there was an error making 459// the request the page does not advance and the error is returned. 460// Deprecated: Use NextWithContext() instead. 461func (page *AccountListResultPage) Next() error { 462 return page.NextWithContext(context.Background()) 463} 464 465// NotDone returns true if the page enumeration should be started or is not yet complete. 466func (page AccountListResultPage) NotDone() bool { 467 return !page.alr.IsEmpty() 468} 469 470// Response returns the raw server response from the last page request. 471func (page AccountListResultPage) Response() AccountListResult { 472 return page.alr 473} 474 475// Values returns the slice of values for the current page or nil if there are no values. 476func (page AccountListResultPage) Values() []Account { 477 if page.alr.IsEmpty() { 478 return nil 479 } 480 return *page.alr.Value 481} 482 483// Creates a new instance of the AccountListResultPage type. 484func NewAccountListResultPage(cur AccountListResult, getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage { 485 return AccountListResultPage{ 486 fn: getNextPage, 487 alr: cur, 488 } 489} 490 491// AccountMicrosoftEndpoints the URIs that are used to perform a retrieval of a public blob, queue, table, 492// web or dfs object via a microsoft routing endpoint. 493type AccountMicrosoftEndpoints struct { 494 // Blob - READ-ONLY; Gets the blob endpoint. 495 Blob *string `json:"blob,omitempty"` 496 // Queue - READ-ONLY; Gets the queue endpoint. 497 Queue *string `json:"queue,omitempty"` 498 // Table - READ-ONLY; Gets the table endpoint. 499 Table *string `json:"table,omitempty"` 500 // File - READ-ONLY; Gets the file endpoint. 501 File *string `json:"file,omitempty"` 502 // Web - READ-ONLY; Gets the web endpoint. 503 Web *string `json:"web,omitempty"` 504 // Dfs - READ-ONLY; Gets the dfs endpoint. 505 Dfs *string `json:"dfs,omitempty"` 506} 507 508// MarshalJSON is the custom marshaler for AccountMicrosoftEndpoints. 509func (ame AccountMicrosoftEndpoints) MarshalJSON() ([]byte, error) { 510 objectMap := make(map[string]interface{}) 511 return json.Marshal(objectMap) 512} 513 514// AccountProperties properties of the storage account. 515type AccountProperties struct { 516 // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded' 517 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 518 // PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. 519 PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"` 520 // PrimaryLocation - READ-ONLY; Gets the location of the primary data center for the storage account. 521 PrimaryLocation *string `json:"primaryLocation,omitempty"` 522 // StatusOfPrimary - READ-ONLY; Gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'Available', 'Unavailable' 523 StatusOfPrimary AccountStatus `json:"statusOfPrimary,omitempty"` 524 // LastGeoFailoverTime - READ-ONLY; Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS. 525 LastGeoFailoverTime *date.Time `json:"lastGeoFailoverTime,omitempty"` 526 // SecondaryLocation - READ-ONLY; Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS. 527 SecondaryLocation *string `json:"secondaryLocation,omitempty"` 528 // StatusOfSecondary - READ-ONLY; Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible values include: 'Available', 'Unavailable' 529 StatusOfSecondary AccountStatus `json:"statusOfSecondary,omitempty"` 530 // CreationTime - READ-ONLY; Gets the creation date and time of the storage account in UTC. 531 CreationTime *date.Time `json:"creationTime,omitempty"` 532 // CustomDomain - READ-ONLY; Gets the custom domain the user assigned to this storage account. 533 CustomDomain *CustomDomain `json:"customDomain,omitempty"` 534 // SecondaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. 535 SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"` 536 // Encryption - READ-ONLY; Gets the encryption settings on the account. If unspecified, the account is unencrypted. 537 Encryption *Encryption `json:"encryption,omitempty"` 538 // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' 539 AccessTier AccessTier `json:"accessTier,omitempty"` 540 // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. 541 AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` 542 // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. 543 EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` 544 // NetworkRuleSet - READ-ONLY; Network rule set 545 NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` 546 // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. 547 IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` 548 // GeoReplicationStats - READ-ONLY; Geo Replication Stats 549 GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"` 550 // FailoverInProgress - READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. 551 FailoverInProgress *bool `json:"failoverInProgress,omitempty"` 552 // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' 553 LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` 554 // PrivateEndpointConnections - READ-ONLY; List of private endpoint connection associated with the specified storage account 555 PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` 556 // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer 557 RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` 558 // BlobRestoreStatus - READ-ONLY; Blob restore status 559 BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty"` 560 // AllowBlobPublicAccess - Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. 561 AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` 562 // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS10', 'TLS11', 'TLS12' 563 MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` 564} 565 566// MarshalJSON is the custom marshaler for AccountProperties. 567func (ap AccountProperties) MarshalJSON() ([]byte, error) { 568 objectMap := make(map[string]interface{}) 569 if ap.AzureFilesIdentityBasedAuthentication != nil { 570 objectMap["azureFilesIdentityBasedAuthentication"] = ap.AzureFilesIdentityBasedAuthentication 571 } 572 if ap.EnableHTTPSTrafficOnly != nil { 573 objectMap["supportsHttpsTrafficOnly"] = ap.EnableHTTPSTrafficOnly 574 } 575 if ap.IsHnsEnabled != nil { 576 objectMap["isHnsEnabled"] = ap.IsHnsEnabled 577 } 578 if ap.LargeFileSharesState != "" { 579 objectMap["largeFileSharesState"] = ap.LargeFileSharesState 580 } 581 if ap.RoutingPreference != nil { 582 objectMap["routingPreference"] = ap.RoutingPreference 583 } 584 if ap.AllowBlobPublicAccess != nil { 585 objectMap["allowBlobPublicAccess"] = ap.AllowBlobPublicAccess 586 } 587 if ap.MinimumTLSVersion != "" { 588 objectMap["minimumTlsVersion"] = ap.MinimumTLSVersion 589 } 590 return json.Marshal(objectMap) 591} 592 593// AccountPropertiesCreateParameters the parameters used to create the storage account. 594type AccountPropertiesCreateParameters struct { 595 // CustomDomain - User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. 596 CustomDomain *CustomDomain `json:"customDomain,omitempty"` 597 // Encryption - Not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled. 598 Encryption *Encryption `json:"encryption,omitempty"` 599 // NetworkRuleSet - Network rule set 600 NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` 601 // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' 602 AccessTier AccessTier `json:"accessTier,omitempty"` 603 // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. 604 AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` 605 // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. 606 EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` 607 // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. 608 IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` 609 // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' 610 LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` 611 // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer 612 RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` 613 // AllowBlobPublicAccess - Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. 614 AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` 615 // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS10', 'TLS11', 'TLS12' 616 MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` 617} 618 619// AccountPropertiesUpdateParameters the parameters used when updating a storage account. 620type AccountPropertiesUpdateParameters struct { 621 // CustomDomain - Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. 622 CustomDomain *CustomDomain `json:"customDomain,omitempty"` 623 // Encryption - Provides the encryption settings on the account. The default setting is unencrypted. 624 Encryption *Encryption `json:"encryption,omitempty"` 625 // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' 626 AccessTier AccessTier `json:"accessTier,omitempty"` 627 // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. 628 AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` 629 // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. 630 EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` 631 // NetworkRuleSet - Network rule set 632 NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` 633 // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' 634 LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` 635 // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer 636 RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` 637 // AllowBlobPublicAccess - Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. 638 AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` 639 // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS10', 'TLS11', 'TLS12' 640 MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` 641} 642 643// AccountRegenerateKeyParameters the parameters used to regenerate the storage account key. 644type AccountRegenerateKeyParameters struct { 645 // KeyName - The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. 646 KeyName *string `json:"keyName,omitempty"` 647} 648 649// AccountSasParameters the parameters to list SAS credentials of a storage account. 650type AccountSasParameters struct { 651 // Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'B', 'Q', 'T', 'F' 652 Services Services `json:"signedServices,omitempty"` 653 // ResourceTypes - The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 'SignedResourceTypesS', 'SignedResourceTypesC', 'SignedResourceTypesO' 654 ResourceTypes SignedResourceTypes `json:"signedResourceTypes,omitempty"` 655 // Permissions - The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P' 656 Permissions Permissions `json:"signedPermission,omitempty"` 657 // IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests. 658 IPAddressOrRange *string `json:"signedIp,omitempty"` 659 // Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS' 660 Protocols HTTPProtocol `json:"signedProtocol,omitempty"` 661 // SharedAccessStartTime - The time at which the SAS becomes valid. 662 SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` 663 // SharedAccessExpiryTime - The time at which the shared access signature becomes invalid. 664 SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` 665 // KeyToSign - The key to sign the account SAS token with. 666 KeyToSign *string `json:"keyToSign,omitempty"` 667} 668 669// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running 670// operation. 671type AccountsCreateFuture struct { 672 azure.FutureAPI 673 // Result returns the result of the asynchronous operation. 674 // If the operation has not completed it will return an error. 675 Result func(AccountsClient) (Account, error) 676} 677 678// UnmarshalJSON is the custom unmarshaller for CreateFuture. 679func (future *AccountsCreateFuture) UnmarshalJSON(body []byte) error { 680 var azFuture azure.Future 681 if err := json.Unmarshal(body, &azFuture); err != nil { 682 return err 683 } 684 future.FutureAPI = &azFuture 685 future.Result = future.result 686 return nil 687} 688 689// result is the default implementation for AccountsCreateFuture.Result. 690func (future *AccountsCreateFuture) result(client AccountsClient) (a Account, err error) { 691 var done bool 692 done, err = future.DoneWithContext(context.Background(), client) 693 if err != nil { 694 err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") 695 return 696 } 697 if !done { 698 a.Response.Response = future.Response() 699 err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture") 700 return 701 } 702 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 703 if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent { 704 a, err = client.CreateResponder(a.Response.Response) 705 if err != nil { 706 err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request") 707 } 708 } 709 return 710} 711 712// AccountsFailoverFuture an abstraction for monitoring and retrieving the results of a long-running 713// operation. 714type AccountsFailoverFuture struct { 715 azure.FutureAPI 716 // Result returns the result of the asynchronous operation. 717 // If the operation has not completed it will return an error. 718 Result func(AccountsClient) (autorest.Response, error) 719} 720 721// UnmarshalJSON is the custom unmarshaller for CreateFuture. 722func (future *AccountsFailoverFuture) UnmarshalJSON(body []byte) error { 723 var azFuture azure.Future 724 if err := json.Unmarshal(body, &azFuture); err != nil { 725 return err 726 } 727 future.FutureAPI = &azFuture 728 future.Result = future.result 729 return nil 730} 731 732// result is the default implementation for AccountsFailoverFuture.Result. 733func (future *AccountsFailoverFuture) result(client AccountsClient) (ar autorest.Response, err error) { 734 var done bool 735 done, err = future.DoneWithContext(context.Background(), client) 736 if err != nil { 737 err = autorest.NewErrorWithError(err, "storage.AccountsFailoverFuture", "Result", future.Response(), "Polling failure") 738 return 739 } 740 if !done { 741 ar.Response = future.Response() 742 err = azure.NewAsyncOpIncompleteError("storage.AccountsFailoverFuture") 743 return 744 } 745 ar.Response = future.Response() 746 return 747} 748 749// AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a 750// long-running operation. 751type AccountsRestoreBlobRangesFuture struct { 752 azure.FutureAPI 753 // Result returns the result of the asynchronous operation. 754 // If the operation has not completed it will return an error. 755 Result func(AccountsClient) (BlobRestoreStatus, error) 756} 757 758// UnmarshalJSON is the custom unmarshaller for CreateFuture. 759func (future *AccountsRestoreBlobRangesFuture) UnmarshalJSON(body []byte) error { 760 var azFuture azure.Future 761 if err := json.Unmarshal(body, &azFuture); err != nil { 762 return err 763 } 764 future.FutureAPI = &azFuture 765 future.Result = future.result 766 return nil 767} 768 769// result is the default implementation for AccountsRestoreBlobRangesFuture.Result. 770func (future *AccountsRestoreBlobRangesFuture) result(client AccountsClient) (brs BlobRestoreStatus, err error) { 771 var done bool 772 done, err = future.DoneWithContext(context.Background(), client) 773 if err != nil { 774 err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", future.Response(), "Polling failure") 775 return 776 } 777 if !done { 778 brs.Response.Response = future.Response() 779 err = azure.NewAsyncOpIncompleteError("storage.AccountsRestoreBlobRangesFuture") 780 return 781 } 782 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 783 if brs.Response.Response, err = future.GetResult(sender); err == nil && brs.Response.Response.StatusCode != http.StatusNoContent { 784 brs, err = client.RestoreBlobRangesResponder(brs.Response.Response) 785 if err != nil { 786 err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", brs.Response.Response, "Failure responding to request") 787 } 788 } 789 return 790} 791 792// AccountUpdateParameters the parameters that can be provided when updating the storage account 793// properties. 794type AccountUpdateParameters struct { 795 // Sku - Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value. 796 Sku *Sku `json:"sku,omitempty"` 797 // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. 798 Tags map[string]*string `json:"tags"` 799 // Identity - The identity of the resource. 800 Identity *Identity `json:"identity,omitempty"` 801 // AccountPropertiesUpdateParameters - The parameters used when updating a storage account. 802 *AccountPropertiesUpdateParameters `json:"properties,omitempty"` 803 // Kind - Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' 804 Kind Kind `json:"kind,omitempty"` 805} 806 807// MarshalJSON is the custom marshaler for AccountUpdateParameters. 808func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) { 809 objectMap := make(map[string]interface{}) 810 if aup.Sku != nil { 811 objectMap["sku"] = aup.Sku 812 } 813 if aup.Tags != nil { 814 objectMap["tags"] = aup.Tags 815 } 816 if aup.Identity != nil { 817 objectMap["identity"] = aup.Identity 818 } 819 if aup.AccountPropertiesUpdateParameters != nil { 820 objectMap["properties"] = aup.AccountPropertiesUpdateParameters 821 } 822 if aup.Kind != "" { 823 objectMap["kind"] = aup.Kind 824 } 825 return json.Marshal(objectMap) 826} 827 828// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct. 829func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { 830 var m map[string]*json.RawMessage 831 err := json.Unmarshal(body, &m) 832 if err != nil { 833 return err 834 } 835 for k, v := range m { 836 switch k { 837 case "sku": 838 if v != nil { 839 var sku Sku 840 err = json.Unmarshal(*v, &sku) 841 if err != nil { 842 return err 843 } 844 aup.Sku = &sku 845 } 846 case "tags": 847 if v != nil { 848 var tags map[string]*string 849 err = json.Unmarshal(*v, &tags) 850 if err != nil { 851 return err 852 } 853 aup.Tags = tags 854 } 855 case "identity": 856 if v != nil { 857 var identity Identity 858 err = json.Unmarshal(*v, &identity) 859 if err != nil { 860 return err 861 } 862 aup.Identity = &identity 863 } 864 case "properties": 865 if v != nil { 866 var accountPropertiesUpdateParameters AccountPropertiesUpdateParameters 867 err = json.Unmarshal(*v, &accountPropertiesUpdateParameters) 868 if err != nil { 869 return err 870 } 871 aup.AccountPropertiesUpdateParameters = &accountPropertiesUpdateParameters 872 } 873 case "kind": 874 if v != nil { 875 var kind Kind 876 err = json.Unmarshal(*v, &kind) 877 if err != nil { 878 return err 879 } 880 aup.Kind = kind 881 } 882 } 883 } 884 885 return nil 886} 887 888// ActiveDirectoryProperties settings properties for Active Directory (AD). 889type ActiveDirectoryProperties struct { 890 // DomainName - Specifies the primary domain that the AD DNS server is authoritative for. 891 DomainName *string `json:"domainName,omitempty"` 892 // NetBiosDomainName - Specifies the NetBIOS domain name. 893 NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` 894 // ForestName - Specifies the Active Directory forest to get. 895 ForestName *string `json:"forestName,omitempty"` 896 // DomainGUID - Specifies the domain GUID. 897 DomainGUID *string `json:"domainGuid,omitempty"` 898 // DomainSid - Specifies the security identifier (SID). 899 DomainSid *string `json:"domainSid,omitempty"` 900 // AzureStorageSid - Specifies the security identifier (SID) for Azure Storage. 901 AzureStorageSid *string `json:"azureStorageSid,omitempty"` 902} 903 904// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. 905type AzureEntityResource struct { 906 // Etag - READ-ONLY; Resource Etag. 907 Etag *string `json:"etag,omitempty"` 908 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 909 ID *string `json:"id,omitempty"` 910 // Name - READ-ONLY; The name of the resource 911 Name *string `json:"name,omitempty"` 912 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 913 Type *string `json:"type,omitempty"` 914} 915 916// MarshalJSON is the custom marshaler for AzureEntityResource. 917func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { 918 objectMap := make(map[string]interface{}) 919 return json.Marshal(objectMap) 920} 921 922// AzureFilesIdentityBasedAuthentication settings for Azure Files identity based authentication. 923type AzureFilesIdentityBasedAuthentication struct { 924 // DirectoryServiceOptions - Indicates the directory service used. Possible values include: 'DirectoryServiceOptionsNone', 'DirectoryServiceOptionsAADDS', 'DirectoryServiceOptionsAD' 925 DirectoryServiceOptions DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` 926 // ActiveDirectoryProperties - Required if choose AD. 927 ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` 928} 929 930// BlobContainer properties of the blob container, including Id, resource name, resource type, Etag. 931type BlobContainer struct { 932 autorest.Response `json:"-"` 933 // ContainerProperties - Properties of the blob container. 934 *ContainerProperties `json:"properties,omitempty"` 935 // Etag - READ-ONLY; Resource Etag. 936 Etag *string `json:"etag,omitempty"` 937 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 938 ID *string `json:"id,omitempty"` 939 // Name - READ-ONLY; The name of the resource 940 Name *string `json:"name,omitempty"` 941 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 942 Type *string `json:"type,omitempty"` 943} 944 945// MarshalJSON is the custom marshaler for BlobContainer. 946func (bc BlobContainer) MarshalJSON() ([]byte, error) { 947 objectMap := make(map[string]interface{}) 948 if bc.ContainerProperties != nil { 949 objectMap["properties"] = bc.ContainerProperties 950 } 951 return json.Marshal(objectMap) 952} 953 954// UnmarshalJSON is the custom unmarshaler for BlobContainer struct. 955func (bc *BlobContainer) UnmarshalJSON(body []byte) error { 956 var m map[string]*json.RawMessage 957 err := json.Unmarshal(body, &m) 958 if err != nil { 959 return err 960 } 961 for k, v := range m { 962 switch k { 963 case "properties": 964 if v != nil { 965 var containerProperties ContainerProperties 966 err = json.Unmarshal(*v, &containerProperties) 967 if err != nil { 968 return err 969 } 970 bc.ContainerProperties = &containerProperties 971 } 972 case "etag": 973 if v != nil { 974 var etag string 975 err = json.Unmarshal(*v, &etag) 976 if err != nil { 977 return err 978 } 979 bc.Etag = &etag 980 } 981 case "id": 982 if v != nil { 983 var ID string 984 err = json.Unmarshal(*v, &ID) 985 if err != nil { 986 return err 987 } 988 bc.ID = &ID 989 } 990 case "name": 991 if v != nil { 992 var name string 993 err = json.Unmarshal(*v, &name) 994 if err != nil { 995 return err 996 } 997 bc.Name = &name 998 } 999 case "type": 1000 if v != nil { 1001 var typeVar string 1002 err = json.Unmarshal(*v, &typeVar) 1003 if err != nil { 1004 return err 1005 } 1006 bc.Type = &typeVar 1007 } 1008 } 1009 } 1010 1011 return nil 1012} 1013 1014// BlobRestoreParameters blob restore parameters 1015type BlobRestoreParameters struct { 1016 // TimeToRestore - Restore blob to the specified time. 1017 TimeToRestore *date.Time `json:"timeToRestore,omitempty"` 1018 // BlobRanges - Blob ranges to restore. 1019 BlobRanges *[]BlobRestoreRange `json:"blobRanges,omitempty"` 1020} 1021 1022// BlobRestoreRange blob range 1023type BlobRestoreRange struct { 1024 // StartRange - Blob start range. This is inclusive. Empty means account start. 1025 StartRange *string `json:"startRange,omitempty"` 1026 // EndRange - Blob end range. This is exclusive. Empty means account end. 1027 EndRange *string `json:"endRange,omitempty"` 1028} 1029 1030// BlobRestoreStatus blob restore status. 1031type BlobRestoreStatus struct { 1032 autorest.Response `json:"-"` 1033 // Status - READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. Possible values include: 'InProgress', 'Complete', 'Failed' 1034 Status BlobRestoreProgressStatus `json:"status,omitempty"` 1035 // FailureReason - READ-ONLY; Failure reason when blob restore is failed. 1036 FailureReason *string `json:"failureReason,omitempty"` 1037 // RestoreID - READ-ONLY; Id for tracking blob restore request. 1038 RestoreID *string `json:"restoreId,omitempty"` 1039 // Parameters - READ-ONLY; Blob restore request parameters. 1040 Parameters *BlobRestoreParameters `json:"parameters,omitempty"` 1041} 1042 1043// MarshalJSON is the custom marshaler for BlobRestoreStatus. 1044func (brs BlobRestoreStatus) MarshalJSON() ([]byte, error) { 1045 objectMap := make(map[string]interface{}) 1046 return json.Marshal(objectMap) 1047} 1048 1049// BlobServiceItems ... 1050type BlobServiceItems struct { 1051 autorest.Response `json:"-"` 1052 // Value - READ-ONLY; List of blob services returned. 1053 Value *[]BlobServiceProperties `json:"value,omitempty"` 1054} 1055 1056// MarshalJSON is the custom marshaler for BlobServiceItems. 1057func (bsi BlobServiceItems) MarshalJSON() ([]byte, error) { 1058 objectMap := make(map[string]interface{}) 1059 return json.Marshal(objectMap) 1060} 1061 1062// BlobServiceProperties the properties of a storage account’s Blob service. 1063type BlobServiceProperties struct { 1064 autorest.Response `json:"-"` 1065 // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. 1066 *BlobServicePropertiesProperties `json:"properties,omitempty"` 1067 // Sku - READ-ONLY; Sku name and tier. 1068 Sku *Sku `json:"sku,omitempty"` 1069 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1070 ID *string `json:"id,omitempty"` 1071 // Name - READ-ONLY; The name of the resource 1072 Name *string `json:"name,omitempty"` 1073 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1074 Type *string `json:"type,omitempty"` 1075} 1076 1077// MarshalJSON is the custom marshaler for BlobServiceProperties. 1078func (bsp BlobServiceProperties) MarshalJSON() ([]byte, error) { 1079 objectMap := make(map[string]interface{}) 1080 if bsp.BlobServicePropertiesProperties != nil { 1081 objectMap["properties"] = bsp.BlobServicePropertiesProperties 1082 } 1083 return json.Marshal(objectMap) 1084} 1085 1086// UnmarshalJSON is the custom unmarshaler for BlobServiceProperties struct. 1087func (bsp *BlobServiceProperties) UnmarshalJSON(body []byte) error { 1088 var m map[string]*json.RawMessage 1089 err := json.Unmarshal(body, &m) 1090 if err != nil { 1091 return err 1092 } 1093 for k, v := range m { 1094 switch k { 1095 case "properties": 1096 if v != nil { 1097 var blobServiceProperties BlobServicePropertiesProperties 1098 err = json.Unmarshal(*v, &blobServiceProperties) 1099 if err != nil { 1100 return err 1101 } 1102 bsp.BlobServicePropertiesProperties = &blobServiceProperties 1103 } 1104 case "sku": 1105 if v != nil { 1106 var sku Sku 1107 err = json.Unmarshal(*v, &sku) 1108 if err != nil { 1109 return err 1110 } 1111 bsp.Sku = &sku 1112 } 1113 case "id": 1114 if v != nil { 1115 var ID string 1116 err = json.Unmarshal(*v, &ID) 1117 if err != nil { 1118 return err 1119 } 1120 bsp.ID = &ID 1121 } 1122 case "name": 1123 if v != nil { 1124 var name string 1125 err = json.Unmarshal(*v, &name) 1126 if err != nil { 1127 return err 1128 } 1129 bsp.Name = &name 1130 } 1131 case "type": 1132 if v != nil { 1133 var typeVar string 1134 err = json.Unmarshal(*v, &typeVar) 1135 if err != nil { 1136 return err 1137 } 1138 bsp.Type = &typeVar 1139 } 1140 } 1141 } 1142 1143 return nil 1144} 1145 1146// BlobServicePropertiesProperties the properties of a storage account’s Blob service. 1147type BlobServicePropertiesProperties struct { 1148 // Cors - Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. 1149 Cors *CorsRules `json:"cors,omitempty"` 1150 // DefaultServiceVersion - DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. 1151 DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` 1152 // DeleteRetentionPolicy - The blob service properties for blob soft delete. 1153 DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` 1154 // IsVersioningEnabled - Versioning is enabled if set to true. 1155 IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` 1156 // AutomaticSnapshotPolicyEnabled - Deprecated in favor of isVersioningEnabled property. 1157 AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` 1158 // ChangeFeed - The blob service properties for change feed events. 1159 ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` 1160 // RestorePolicy - The blob service properties for blob restore policy. 1161 RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` 1162 // ContainerDeleteRetentionPolicy - The blob service properties for container soft delete. 1163 ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` 1164} 1165 1166// ChangeFeed the blob service properties for change feed events. 1167type ChangeFeed struct { 1168 // Enabled - Indicates whether change feed event logging is enabled for the Blob service. 1169 Enabled *bool `json:"enabled,omitempty"` 1170} 1171 1172// CheckNameAvailabilityResult the CheckNameAvailability operation response. 1173type CheckNameAvailabilityResult struct { 1174 autorest.Response `json:"-"` 1175 // NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. 1176 NameAvailable *bool `json:"nameAvailable,omitempty"` 1177 // Reason - READ-ONLY; Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists' 1178 Reason Reason `json:"reason,omitempty"` 1179 // Message - READ-ONLY; Gets an error message explaining the Reason value in more detail. 1180 Message *string `json:"message,omitempty"` 1181} 1182 1183// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult. 1184func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { 1185 objectMap := make(map[string]interface{}) 1186 return json.Marshal(objectMap) 1187} 1188 1189// CloudError an error response from the Storage service. 1190type CloudError struct { 1191 Error *CloudErrorBody `json:"error,omitempty"` 1192} 1193 1194// CloudErrorBody an error response from the Storage service. 1195type CloudErrorBody struct { 1196 // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. 1197 Code *string `json:"code,omitempty"` 1198 // Message - A message describing the error, intended to be suitable for display in a user interface. 1199 Message *string `json:"message,omitempty"` 1200 // Target - The target of the particular error. For example, the name of the property in error. 1201 Target *string `json:"target,omitempty"` 1202 // Details - A list of additional details about the error. 1203 Details *[]CloudErrorBody `json:"details,omitempty"` 1204} 1205 1206// ContainerProperties the properties of a container. 1207type ContainerProperties struct { 1208 // Version - READ-ONLY; The version of the deleted blob container. 1209 Version *string `json:"version,omitempty"` 1210 // Deleted - READ-ONLY; Indicates whether the blob container was deleted. 1211 Deleted *bool `json:"deleted,omitempty"` 1212 // DeletedTime - READ-ONLY; Blob container deletion time. 1213 DeletedTime *date.Time `json:"deletedTime,omitempty"` 1214 // RemainingRetentionDays - READ-ONLY; Remaining retention days for soft deleted blob container. 1215 RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"` 1216 // DefaultEncryptionScope - Default the container to use specified encryption scope for all writes. 1217 DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` 1218 // DenyEncryptionScopeOverride - Block override of encryption scope from the container default. 1219 DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` 1220 // PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone' 1221 PublicAccess PublicAccess `json:"publicAccess,omitempty"` 1222 // LastModifiedTime - READ-ONLY; Returns the date and time the container was last modified. 1223 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` 1224 // LeaseStatus - READ-ONLY; The lease status of the container. Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked' 1225 LeaseStatus LeaseStatus `json:"leaseStatus,omitempty"` 1226 // LeaseState - READ-ONLY; Lease state of the container. Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken' 1227 LeaseState LeaseState `json:"leaseState,omitempty"` 1228 // LeaseDuration - READ-ONLY; Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed' 1229 LeaseDuration LeaseDuration `json:"leaseDuration,omitempty"` 1230 // Metadata - A name-value pair to associate with the container as metadata. 1231 Metadata map[string]*string `json:"metadata"` 1232 // ImmutabilityPolicy - READ-ONLY; The ImmutabilityPolicy property of the container. 1233 ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` 1234 // LegalHold - READ-ONLY; The LegalHold property of the container. 1235 LegalHold *LegalHoldProperties `json:"legalHold,omitempty"` 1236 // HasLegalHold - READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. 1237 HasLegalHold *bool `json:"hasLegalHold,omitempty"` 1238 // HasImmutabilityPolicy - READ-ONLY; The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. 1239 HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` 1240} 1241 1242// MarshalJSON is the custom marshaler for ContainerProperties. 1243func (cp ContainerProperties) MarshalJSON() ([]byte, error) { 1244 objectMap := make(map[string]interface{}) 1245 if cp.DefaultEncryptionScope != nil { 1246 objectMap["defaultEncryptionScope"] = cp.DefaultEncryptionScope 1247 } 1248 if cp.DenyEncryptionScopeOverride != nil { 1249 objectMap["denyEncryptionScopeOverride"] = cp.DenyEncryptionScopeOverride 1250 } 1251 if cp.PublicAccess != "" { 1252 objectMap["publicAccess"] = cp.PublicAccess 1253 } 1254 if cp.Metadata != nil { 1255 objectMap["metadata"] = cp.Metadata 1256 } 1257 return json.Marshal(objectMap) 1258} 1259 1260// CorsRule specifies a CORS rule for the Blob service. 1261type CorsRule struct { 1262 // AllowedOrigins - Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains 1263 AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` 1264 // AllowedMethods - Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. 1265 AllowedMethods *[]string `json:"allowedMethods,omitempty"` 1266 // MaxAgeInSeconds - Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response. 1267 MaxAgeInSeconds *int32 `json:"maxAgeInSeconds,omitempty"` 1268 // ExposedHeaders - Required if CorsRule element is present. A list of response headers to expose to CORS clients. 1269 ExposedHeaders *[]string `json:"exposedHeaders,omitempty"` 1270 // AllowedHeaders - Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. 1271 AllowedHeaders *[]string `json:"allowedHeaders,omitempty"` 1272} 1273 1274// CorsRules sets the CORS rules. You can include up to five CorsRule elements in the request. 1275type CorsRules struct { 1276 // CorsRules - The List of CORS rules. You can include up to five CorsRule elements in the request. 1277 CorsRules *[]CorsRule `json:"corsRules,omitempty"` 1278} 1279 1280// CustomDomain the custom domain assigned to this storage account. This can be set via Update. 1281type CustomDomain struct { 1282 // Name - Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. 1283 Name *string `json:"name,omitempty"` 1284 // UseSubDomainName - Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. 1285 UseSubDomainName *bool `json:"useSubDomainName,omitempty"` 1286} 1287 1288// DateAfterCreation object to define the number of days after creation. 1289type DateAfterCreation struct { 1290 // DaysAfterCreationGreaterThan - Value indicating the age in days after creation 1291 DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` 1292} 1293 1294// DateAfterModification object to define the number of days after last modification. 1295type DateAfterModification struct { 1296 // DaysAfterModificationGreaterThan - Value indicating the age in days after last modification 1297 DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` 1298} 1299 1300// DeletedShare the deleted share to be restored. 1301type DeletedShare struct { 1302 // DeletedShareName - Required. Identify the name of the deleted share that will be restored. 1303 DeletedShareName *string `json:"deletedShareName,omitempty"` 1304 // DeletedShareVersion - Required. Identify the version of the deleted share that will be restored. 1305 DeletedShareVersion *string `json:"deletedShareVersion,omitempty"` 1306} 1307 1308// DeleteRetentionPolicy the service properties for soft delete. 1309type DeleteRetentionPolicy struct { 1310 // Enabled - Indicates whether DeleteRetentionPolicy is enabled. 1311 Enabled *bool `json:"enabled,omitempty"` 1312 // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. 1313 Days *int32 `json:"days,omitempty"` 1314} 1315 1316// Dimension dimension of blobs, possibly be blob type or access tier. 1317type Dimension struct { 1318 // Name - Display name of dimension. 1319 Name *string `json:"name,omitempty"` 1320 // DisplayName - Display name of dimension. 1321 DisplayName *string `json:"displayName,omitempty"` 1322} 1323 1324// Encryption the encryption settings on the storage account. 1325type Encryption struct { 1326 // Services - List of services which support encryption. 1327 Services *EncryptionServices `json:"services,omitempty"` 1328 // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'KeySourceMicrosoftStorage', 'KeySourceMicrosoftKeyvault' 1329 KeySource KeySource `json:"keySource,omitempty"` 1330 // RequireInfrastructureEncryption - A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. 1331 RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` 1332 // KeyVaultProperties - Properties provided by key vault. 1333 KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` 1334} 1335 1336// EncryptionScope the Encryption Scope resource. 1337type EncryptionScope struct { 1338 autorest.Response `json:"-"` 1339 // EncryptionScopeProperties - Properties of the encryption scope. 1340 *EncryptionScopeProperties `json:"properties,omitempty"` 1341 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1342 ID *string `json:"id,omitempty"` 1343 // Name - READ-ONLY; The name of the resource 1344 Name *string `json:"name,omitempty"` 1345 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1346 Type *string `json:"type,omitempty"` 1347} 1348 1349// MarshalJSON is the custom marshaler for EncryptionScope. 1350func (es EncryptionScope) MarshalJSON() ([]byte, error) { 1351 objectMap := make(map[string]interface{}) 1352 if es.EncryptionScopeProperties != nil { 1353 objectMap["properties"] = es.EncryptionScopeProperties 1354 } 1355 return json.Marshal(objectMap) 1356} 1357 1358// UnmarshalJSON is the custom unmarshaler for EncryptionScope struct. 1359func (es *EncryptionScope) UnmarshalJSON(body []byte) error { 1360 var m map[string]*json.RawMessage 1361 err := json.Unmarshal(body, &m) 1362 if err != nil { 1363 return err 1364 } 1365 for k, v := range m { 1366 switch k { 1367 case "properties": 1368 if v != nil { 1369 var encryptionScopeProperties EncryptionScopeProperties 1370 err = json.Unmarshal(*v, &encryptionScopeProperties) 1371 if err != nil { 1372 return err 1373 } 1374 es.EncryptionScopeProperties = &encryptionScopeProperties 1375 } 1376 case "id": 1377 if v != nil { 1378 var ID string 1379 err = json.Unmarshal(*v, &ID) 1380 if err != nil { 1381 return err 1382 } 1383 es.ID = &ID 1384 } 1385 case "name": 1386 if v != nil { 1387 var name string 1388 err = json.Unmarshal(*v, &name) 1389 if err != nil { 1390 return err 1391 } 1392 es.Name = &name 1393 } 1394 case "type": 1395 if v != nil { 1396 var typeVar string 1397 err = json.Unmarshal(*v, &typeVar) 1398 if err != nil { 1399 return err 1400 } 1401 es.Type = &typeVar 1402 } 1403 } 1404 } 1405 1406 return nil 1407} 1408 1409// EncryptionScopeKeyVaultProperties the key vault properties for the encryption scope. This is a required 1410// field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. 1411type EncryptionScopeKeyVaultProperties struct { 1412 // KeyURI - The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope. 1413 KeyURI *string `json:"keyUri,omitempty"` 1414} 1415 1416// EncryptionScopeListResult list of encryption scopes requested, and if paging is required, a URL to the 1417// next page of encryption scopes. 1418type EncryptionScopeListResult struct { 1419 autorest.Response `json:"-"` 1420 // Value - READ-ONLY; List of encryption scopes requested. 1421 Value *[]EncryptionScope `json:"value,omitempty"` 1422 // NextLink - READ-ONLY; Request URL that can be used to query next page of encryption scopes. Returned when total number of requested encryption scopes exceeds the maximum page size. 1423 NextLink *string `json:"nextLink,omitempty"` 1424} 1425 1426// MarshalJSON is the custom marshaler for EncryptionScopeListResult. 1427func (eslr EncryptionScopeListResult) MarshalJSON() ([]byte, error) { 1428 objectMap := make(map[string]interface{}) 1429 return json.Marshal(objectMap) 1430} 1431 1432// EncryptionScopeListResultIterator provides access to a complete listing of EncryptionScope values. 1433type EncryptionScopeListResultIterator struct { 1434 i int 1435 page EncryptionScopeListResultPage 1436} 1437 1438// NextWithContext advances to the next value. If there was an error making 1439// the request the iterator does not advance and the error is returned. 1440func (iter *EncryptionScopeListResultIterator) NextWithContext(ctx context.Context) (err error) { 1441 if tracing.IsEnabled() { 1442 ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultIterator.NextWithContext") 1443 defer func() { 1444 sc := -1 1445 if iter.Response().Response.Response != nil { 1446 sc = iter.Response().Response.Response.StatusCode 1447 } 1448 tracing.EndSpan(ctx, sc, err) 1449 }() 1450 } 1451 iter.i++ 1452 if iter.i < len(iter.page.Values()) { 1453 return nil 1454 } 1455 err = iter.page.NextWithContext(ctx) 1456 if err != nil { 1457 iter.i-- 1458 return err 1459 } 1460 iter.i = 0 1461 return nil 1462} 1463 1464// Next advances to the next value. If there was an error making 1465// the request the iterator does not advance and the error is returned. 1466// Deprecated: Use NextWithContext() instead. 1467func (iter *EncryptionScopeListResultIterator) Next() error { 1468 return iter.NextWithContext(context.Background()) 1469} 1470 1471// NotDone returns true if the enumeration should be started or is not yet complete. 1472func (iter EncryptionScopeListResultIterator) NotDone() bool { 1473 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1474} 1475 1476// Response returns the raw server response from the last page request. 1477func (iter EncryptionScopeListResultIterator) Response() EncryptionScopeListResult { 1478 return iter.page.Response() 1479} 1480 1481// Value returns the current value or a zero-initialized value if the 1482// iterator has advanced beyond the end of the collection. 1483func (iter EncryptionScopeListResultIterator) Value() EncryptionScope { 1484 if !iter.page.NotDone() { 1485 return EncryptionScope{} 1486 } 1487 return iter.page.Values()[iter.i] 1488} 1489 1490// Creates a new instance of the EncryptionScopeListResultIterator type. 1491func NewEncryptionScopeListResultIterator(page EncryptionScopeListResultPage) EncryptionScopeListResultIterator { 1492 return EncryptionScopeListResultIterator{page: page} 1493} 1494 1495// IsEmpty returns true if the ListResult contains no values. 1496func (eslr EncryptionScopeListResult) IsEmpty() bool { 1497 return eslr.Value == nil || len(*eslr.Value) == 0 1498} 1499 1500// hasNextLink returns true if the NextLink is not empty. 1501func (eslr EncryptionScopeListResult) hasNextLink() bool { 1502 return eslr.NextLink != nil && len(*eslr.NextLink) != 0 1503} 1504 1505// encryptionScopeListResultPreparer prepares a request to retrieve the next set of results. 1506// It returns nil if no more results exist. 1507func (eslr EncryptionScopeListResult) encryptionScopeListResultPreparer(ctx context.Context) (*http.Request, error) { 1508 if !eslr.hasNextLink() { 1509 return nil, nil 1510 } 1511 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1512 autorest.AsJSON(), 1513 autorest.AsGet(), 1514 autorest.WithBaseURL(to.String(eslr.NextLink))) 1515} 1516 1517// EncryptionScopeListResultPage contains a page of EncryptionScope values. 1518type EncryptionScopeListResultPage struct { 1519 fn func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error) 1520 eslr EncryptionScopeListResult 1521} 1522 1523// NextWithContext advances to the next page of values. If there was an error making 1524// the request the page does not advance and the error is returned. 1525func (page *EncryptionScopeListResultPage) NextWithContext(ctx context.Context) (err error) { 1526 if tracing.IsEnabled() { 1527 ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultPage.NextWithContext") 1528 defer func() { 1529 sc := -1 1530 if page.Response().Response.Response != nil { 1531 sc = page.Response().Response.Response.StatusCode 1532 } 1533 tracing.EndSpan(ctx, sc, err) 1534 }() 1535 } 1536 for { 1537 next, err := page.fn(ctx, page.eslr) 1538 if err != nil { 1539 return err 1540 } 1541 page.eslr = next 1542 if !next.hasNextLink() || !next.IsEmpty() { 1543 break 1544 } 1545 } 1546 return nil 1547} 1548 1549// Next advances to the next page of values. If there was an error making 1550// the request the page does not advance and the error is returned. 1551// Deprecated: Use NextWithContext() instead. 1552func (page *EncryptionScopeListResultPage) Next() error { 1553 return page.NextWithContext(context.Background()) 1554} 1555 1556// NotDone returns true if the page enumeration should be started or is not yet complete. 1557func (page EncryptionScopeListResultPage) NotDone() bool { 1558 return !page.eslr.IsEmpty() 1559} 1560 1561// Response returns the raw server response from the last page request. 1562func (page EncryptionScopeListResultPage) Response() EncryptionScopeListResult { 1563 return page.eslr 1564} 1565 1566// Values returns the slice of values for the current page or nil if there are no values. 1567func (page EncryptionScopeListResultPage) Values() []EncryptionScope { 1568 if page.eslr.IsEmpty() { 1569 return nil 1570 } 1571 return *page.eslr.Value 1572} 1573 1574// Creates a new instance of the EncryptionScopeListResultPage type. 1575func NewEncryptionScopeListResultPage(cur EncryptionScopeListResult, getNextPage func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error)) EncryptionScopeListResultPage { 1576 return EncryptionScopeListResultPage{ 1577 fn: getNextPage, 1578 eslr: cur, 1579 } 1580} 1581 1582// EncryptionScopeProperties properties of the encryption scope. 1583type EncryptionScopeProperties struct { 1584 // Source - The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyVault' 1585 Source EncryptionScopeSource `json:"source,omitempty"` 1586 // State - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled' 1587 State EncryptionScopeState `json:"state,omitempty"` 1588 // CreationTime - READ-ONLY; Gets the creation date and time of the encryption scope in UTC. 1589 CreationTime *date.Time `json:"creationTime,omitempty"` 1590 // LastModifiedTime - READ-ONLY; Gets the last modification date and time of the encryption scope in UTC. 1591 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` 1592 // KeyVaultProperties - The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. 1593 KeyVaultProperties *EncryptionScopeKeyVaultProperties `json:"keyVaultProperties,omitempty"` 1594} 1595 1596// MarshalJSON is the custom marshaler for EncryptionScopeProperties. 1597func (esp EncryptionScopeProperties) MarshalJSON() ([]byte, error) { 1598 objectMap := make(map[string]interface{}) 1599 if esp.Source != "" { 1600 objectMap["source"] = esp.Source 1601 } 1602 if esp.State != "" { 1603 objectMap["state"] = esp.State 1604 } 1605 if esp.KeyVaultProperties != nil { 1606 objectMap["keyVaultProperties"] = esp.KeyVaultProperties 1607 } 1608 return json.Marshal(objectMap) 1609} 1610 1611// EncryptionService a service that allows server-side encryption to be used. 1612type EncryptionService struct { 1613 // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. 1614 Enabled *bool `json:"enabled,omitempty"` 1615 // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. 1616 LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` 1617 // KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. Possible values include: 'KeyTypeService', 'KeyTypeAccount' 1618 KeyType KeyType `json:"keyType,omitempty"` 1619} 1620 1621// MarshalJSON is the custom marshaler for EncryptionService. 1622func (es EncryptionService) MarshalJSON() ([]byte, error) { 1623 objectMap := make(map[string]interface{}) 1624 if es.Enabled != nil { 1625 objectMap["enabled"] = es.Enabled 1626 } 1627 if es.KeyType != "" { 1628 objectMap["keyType"] = es.KeyType 1629 } 1630 return json.Marshal(objectMap) 1631} 1632 1633// EncryptionServices a list of services that support encryption. 1634type EncryptionServices struct { 1635 // Blob - The encryption function of the blob storage service. 1636 Blob *EncryptionService `json:"blob,omitempty"` 1637 // File - The encryption function of the file storage service. 1638 File *EncryptionService `json:"file,omitempty"` 1639 // Table - The encryption function of the table storage service. 1640 Table *EncryptionService `json:"table,omitempty"` 1641 // Queue - The encryption function of the queue storage service. 1642 Queue *EncryptionService `json:"queue,omitempty"` 1643} 1644 1645// Endpoints the URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs 1646// object. 1647type Endpoints struct { 1648 // Blob - READ-ONLY; Gets the blob endpoint. 1649 Blob *string `json:"blob,omitempty"` 1650 // Queue - READ-ONLY; Gets the queue endpoint. 1651 Queue *string `json:"queue,omitempty"` 1652 // Table - READ-ONLY; Gets the table endpoint. 1653 Table *string `json:"table,omitempty"` 1654 // File - READ-ONLY; Gets the file endpoint. 1655 File *string `json:"file,omitempty"` 1656 // Web - READ-ONLY; Gets the web endpoint. 1657 Web *string `json:"web,omitempty"` 1658 // Dfs - READ-ONLY; Gets the dfs endpoint. 1659 Dfs *string `json:"dfs,omitempty"` 1660 // MicrosoftEndpoints - Gets the microsoft routing storage endpoints. 1661 MicrosoftEndpoints *AccountMicrosoftEndpoints `json:"microsoftEndpoints,omitempty"` 1662 // InternetEndpoints - Gets the internet routing storage endpoints 1663 InternetEndpoints *AccountInternetEndpoints `json:"internetEndpoints,omitempty"` 1664} 1665 1666// MarshalJSON is the custom marshaler for Endpoints. 1667func (e Endpoints) MarshalJSON() ([]byte, error) { 1668 objectMap := make(map[string]interface{}) 1669 if e.MicrosoftEndpoints != nil { 1670 objectMap["microsoftEndpoints"] = e.MicrosoftEndpoints 1671 } 1672 if e.InternetEndpoints != nil { 1673 objectMap["internetEndpoints"] = e.InternetEndpoints 1674 } 1675 return json.Marshal(objectMap) 1676} 1677 1678// ErrorResponse an error response from the storage resource provider. 1679type ErrorResponse struct { 1680 // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. 1681 Code *string `json:"code,omitempty"` 1682 // Message - A message describing the error, intended to be suitable for display in a user interface. 1683 Message *string `json:"message,omitempty"` 1684} 1685 1686// FileServiceItems ... 1687type FileServiceItems struct { 1688 autorest.Response `json:"-"` 1689 // Value - READ-ONLY; List of file services returned. 1690 Value *[]FileServiceProperties `json:"value,omitempty"` 1691} 1692 1693// MarshalJSON is the custom marshaler for FileServiceItems. 1694func (fsi FileServiceItems) MarshalJSON() ([]byte, error) { 1695 objectMap := make(map[string]interface{}) 1696 return json.Marshal(objectMap) 1697} 1698 1699// FileServiceProperties the properties of File services in storage account. 1700type FileServiceProperties struct { 1701 autorest.Response `json:"-"` 1702 // FileServicePropertiesProperties - The properties of File services in storage account. 1703 *FileServicePropertiesProperties `json:"properties,omitempty"` 1704 // Sku - READ-ONLY; Sku name and tier. 1705 Sku *Sku `json:"sku,omitempty"` 1706 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1707 ID *string `json:"id,omitempty"` 1708 // Name - READ-ONLY; The name of the resource 1709 Name *string `json:"name,omitempty"` 1710 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1711 Type *string `json:"type,omitempty"` 1712} 1713 1714// MarshalJSON is the custom marshaler for FileServiceProperties. 1715func (fsp FileServiceProperties) MarshalJSON() ([]byte, error) { 1716 objectMap := make(map[string]interface{}) 1717 if fsp.FileServicePropertiesProperties != nil { 1718 objectMap["properties"] = fsp.FileServicePropertiesProperties 1719 } 1720 return json.Marshal(objectMap) 1721} 1722 1723// UnmarshalJSON is the custom unmarshaler for FileServiceProperties struct. 1724func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error { 1725 var m map[string]*json.RawMessage 1726 err := json.Unmarshal(body, &m) 1727 if err != nil { 1728 return err 1729 } 1730 for k, v := range m { 1731 switch k { 1732 case "properties": 1733 if v != nil { 1734 var fileServiceProperties FileServicePropertiesProperties 1735 err = json.Unmarshal(*v, &fileServiceProperties) 1736 if err != nil { 1737 return err 1738 } 1739 fsp.FileServicePropertiesProperties = &fileServiceProperties 1740 } 1741 case "sku": 1742 if v != nil { 1743 var sku Sku 1744 err = json.Unmarshal(*v, &sku) 1745 if err != nil { 1746 return err 1747 } 1748 fsp.Sku = &sku 1749 } 1750 case "id": 1751 if v != nil { 1752 var ID string 1753 err = json.Unmarshal(*v, &ID) 1754 if err != nil { 1755 return err 1756 } 1757 fsp.ID = &ID 1758 } 1759 case "name": 1760 if v != nil { 1761 var name string 1762 err = json.Unmarshal(*v, &name) 1763 if err != nil { 1764 return err 1765 } 1766 fsp.Name = &name 1767 } 1768 case "type": 1769 if v != nil { 1770 var typeVar string 1771 err = json.Unmarshal(*v, &typeVar) 1772 if err != nil { 1773 return err 1774 } 1775 fsp.Type = &typeVar 1776 } 1777 } 1778 } 1779 1780 return nil 1781} 1782 1783// FileServicePropertiesProperties the properties of File services in storage account. 1784type FileServicePropertiesProperties struct { 1785 // Cors - Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. 1786 Cors *CorsRules `json:"cors,omitempty"` 1787 // ShareDeleteRetentionPolicy - The file service properties for share soft delete. 1788 ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"` 1789} 1790 1791// FileShare properties of the file share, including Id, resource name, resource type, Etag. 1792type FileShare struct { 1793 autorest.Response `json:"-"` 1794 // FileShareProperties - Properties of the file share. 1795 *FileShareProperties `json:"properties,omitempty"` 1796 // Etag - READ-ONLY; Resource Etag. 1797 Etag *string `json:"etag,omitempty"` 1798 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1799 ID *string `json:"id,omitempty"` 1800 // Name - READ-ONLY; The name of the resource 1801 Name *string `json:"name,omitempty"` 1802 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1803 Type *string `json:"type,omitempty"` 1804} 1805 1806// MarshalJSON is the custom marshaler for FileShare. 1807func (fs FileShare) MarshalJSON() ([]byte, error) { 1808 objectMap := make(map[string]interface{}) 1809 if fs.FileShareProperties != nil { 1810 objectMap["properties"] = fs.FileShareProperties 1811 } 1812 return json.Marshal(objectMap) 1813} 1814 1815// UnmarshalJSON is the custom unmarshaler for FileShare struct. 1816func (fs *FileShare) UnmarshalJSON(body []byte) error { 1817 var m map[string]*json.RawMessage 1818 err := json.Unmarshal(body, &m) 1819 if err != nil { 1820 return err 1821 } 1822 for k, v := range m { 1823 switch k { 1824 case "properties": 1825 if v != nil { 1826 var fileShareProperties FileShareProperties 1827 err = json.Unmarshal(*v, &fileShareProperties) 1828 if err != nil { 1829 return err 1830 } 1831 fs.FileShareProperties = &fileShareProperties 1832 } 1833 case "etag": 1834 if v != nil { 1835 var etag string 1836 err = json.Unmarshal(*v, &etag) 1837 if err != nil { 1838 return err 1839 } 1840 fs.Etag = &etag 1841 } 1842 case "id": 1843 if v != nil { 1844 var ID string 1845 err = json.Unmarshal(*v, &ID) 1846 if err != nil { 1847 return err 1848 } 1849 fs.ID = &ID 1850 } 1851 case "name": 1852 if v != nil { 1853 var name string 1854 err = json.Unmarshal(*v, &name) 1855 if err != nil { 1856 return err 1857 } 1858 fs.Name = &name 1859 } 1860 case "type": 1861 if v != nil { 1862 var typeVar string 1863 err = json.Unmarshal(*v, &typeVar) 1864 if err != nil { 1865 return err 1866 } 1867 fs.Type = &typeVar 1868 } 1869 } 1870 } 1871 1872 return nil 1873} 1874 1875// FileShareItem the file share properties be listed out. 1876type FileShareItem struct { 1877 // FileShareProperties - The file share properties be listed out. 1878 *FileShareProperties `json:"properties,omitempty"` 1879 // Etag - READ-ONLY; Resource Etag. 1880 Etag *string `json:"etag,omitempty"` 1881 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 1882 ID *string `json:"id,omitempty"` 1883 // Name - READ-ONLY; The name of the resource 1884 Name *string `json:"name,omitempty"` 1885 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 1886 Type *string `json:"type,omitempty"` 1887} 1888 1889// MarshalJSON is the custom marshaler for FileShareItem. 1890func (fsi FileShareItem) MarshalJSON() ([]byte, error) { 1891 objectMap := make(map[string]interface{}) 1892 if fsi.FileShareProperties != nil { 1893 objectMap["properties"] = fsi.FileShareProperties 1894 } 1895 return json.Marshal(objectMap) 1896} 1897 1898// UnmarshalJSON is the custom unmarshaler for FileShareItem struct. 1899func (fsi *FileShareItem) UnmarshalJSON(body []byte) error { 1900 var m map[string]*json.RawMessage 1901 err := json.Unmarshal(body, &m) 1902 if err != nil { 1903 return err 1904 } 1905 for k, v := range m { 1906 switch k { 1907 case "properties": 1908 if v != nil { 1909 var fileShareProperties FileShareProperties 1910 err = json.Unmarshal(*v, &fileShareProperties) 1911 if err != nil { 1912 return err 1913 } 1914 fsi.FileShareProperties = &fileShareProperties 1915 } 1916 case "etag": 1917 if v != nil { 1918 var etag string 1919 err = json.Unmarshal(*v, &etag) 1920 if err != nil { 1921 return err 1922 } 1923 fsi.Etag = &etag 1924 } 1925 case "id": 1926 if v != nil { 1927 var ID string 1928 err = json.Unmarshal(*v, &ID) 1929 if err != nil { 1930 return err 1931 } 1932 fsi.ID = &ID 1933 } 1934 case "name": 1935 if v != nil { 1936 var name string 1937 err = json.Unmarshal(*v, &name) 1938 if err != nil { 1939 return err 1940 } 1941 fsi.Name = &name 1942 } 1943 case "type": 1944 if v != nil { 1945 var typeVar string 1946 err = json.Unmarshal(*v, &typeVar) 1947 if err != nil { 1948 return err 1949 } 1950 fsi.Type = &typeVar 1951 } 1952 } 1953 } 1954 1955 return nil 1956} 1957 1958// FileShareItems response schema. Contains list of shares returned, and if paging is requested or 1959// required, a URL to next page of shares. 1960type FileShareItems struct { 1961 autorest.Response `json:"-"` 1962 // Value - READ-ONLY; List of file shares returned. 1963 Value *[]FileShareItem `json:"value,omitempty"` 1964 // NextLink - READ-ONLY; Request URL that can be used to query next page of shares. Returned when total number of requested shares exceed maximum page size. 1965 NextLink *string `json:"nextLink,omitempty"` 1966} 1967 1968// MarshalJSON is the custom marshaler for FileShareItems. 1969func (fsi FileShareItems) MarshalJSON() ([]byte, error) { 1970 objectMap := make(map[string]interface{}) 1971 return json.Marshal(objectMap) 1972} 1973 1974// FileShareItemsIterator provides access to a complete listing of FileShareItem values. 1975type FileShareItemsIterator struct { 1976 i int 1977 page FileShareItemsPage 1978} 1979 1980// NextWithContext advances to the next value. If there was an error making 1981// the request the iterator does not advance and the error is returned. 1982func (iter *FileShareItemsIterator) NextWithContext(ctx context.Context) (err error) { 1983 if tracing.IsEnabled() { 1984 ctx = tracing.StartSpan(ctx, fqdn+"/FileShareItemsIterator.NextWithContext") 1985 defer func() { 1986 sc := -1 1987 if iter.Response().Response.Response != nil { 1988 sc = iter.Response().Response.Response.StatusCode 1989 } 1990 tracing.EndSpan(ctx, sc, err) 1991 }() 1992 } 1993 iter.i++ 1994 if iter.i < len(iter.page.Values()) { 1995 return nil 1996 } 1997 err = iter.page.NextWithContext(ctx) 1998 if err != nil { 1999 iter.i-- 2000 return err 2001 } 2002 iter.i = 0 2003 return nil 2004} 2005 2006// Next advances to the next value. If there was an error making 2007// the request the iterator does not advance and the error is returned. 2008// Deprecated: Use NextWithContext() instead. 2009func (iter *FileShareItemsIterator) Next() error { 2010 return iter.NextWithContext(context.Background()) 2011} 2012 2013// NotDone returns true if the enumeration should be started or is not yet complete. 2014func (iter FileShareItemsIterator) NotDone() bool { 2015 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2016} 2017 2018// Response returns the raw server response from the last page request. 2019func (iter FileShareItemsIterator) Response() FileShareItems { 2020 return iter.page.Response() 2021} 2022 2023// Value returns the current value or a zero-initialized value if the 2024// iterator has advanced beyond the end of the collection. 2025func (iter FileShareItemsIterator) Value() FileShareItem { 2026 if !iter.page.NotDone() { 2027 return FileShareItem{} 2028 } 2029 return iter.page.Values()[iter.i] 2030} 2031 2032// Creates a new instance of the FileShareItemsIterator type. 2033func NewFileShareItemsIterator(page FileShareItemsPage) FileShareItemsIterator { 2034 return FileShareItemsIterator{page: page} 2035} 2036 2037// IsEmpty returns true if the ListResult contains no values. 2038func (fsi FileShareItems) IsEmpty() bool { 2039 return fsi.Value == nil || len(*fsi.Value) == 0 2040} 2041 2042// hasNextLink returns true if the NextLink is not empty. 2043func (fsi FileShareItems) hasNextLink() bool { 2044 return fsi.NextLink != nil && len(*fsi.NextLink) != 0 2045} 2046 2047// fileShareItemsPreparer prepares a request to retrieve the next set of results. 2048// It returns nil if no more results exist. 2049func (fsi FileShareItems) fileShareItemsPreparer(ctx context.Context) (*http.Request, error) { 2050 if !fsi.hasNextLink() { 2051 return nil, nil 2052 } 2053 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2054 autorest.AsJSON(), 2055 autorest.AsGet(), 2056 autorest.WithBaseURL(to.String(fsi.NextLink))) 2057} 2058 2059// FileShareItemsPage contains a page of FileShareItem values. 2060type FileShareItemsPage struct { 2061 fn func(context.Context, FileShareItems) (FileShareItems, error) 2062 fsi FileShareItems 2063} 2064 2065// NextWithContext advances to the next page of values. If there was an error making 2066// the request the page does not advance and the error is returned. 2067func (page *FileShareItemsPage) NextWithContext(ctx context.Context) (err error) { 2068 if tracing.IsEnabled() { 2069 ctx = tracing.StartSpan(ctx, fqdn+"/FileShareItemsPage.NextWithContext") 2070 defer func() { 2071 sc := -1 2072 if page.Response().Response.Response != nil { 2073 sc = page.Response().Response.Response.StatusCode 2074 } 2075 tracing.EndSpan(ctx, sc, err) 2076 }() 2077 } 2078 for { 2079 next, err := page.fn(ctx, page.fsi) 2080 if err != nil { 2081 return err 2082 } 2083 page.fsi = next 2084 if !next.hasNextLink() || !next.IsEmpty() { 2085 break 2086 } 2087 } 2088 return nil 2089} 2090 2091// Next advances to the next page of values. If there was an error making 2092// the request the page does not advance and the error is returned. 2093// Deprecated: Use NextWithContext() instead. 2094func (page *FileShareItemsPage) Next() error { 2095 return page.NextWithContext(context.Background()) 2096} 2097 2098// NotDone returns true if the page enumeration should be started or is not yet complete. 2099func (page FileShareItemsPage) NotDone() bool { 2100 return !page.fsi.IsEmpty() 2101} 2102 2103// Response returns the raw server response from the last page request. 2104func (page FileShareItemsPage) Response() FileShareItems { 2105 return page.fsi 2106} 2107 2108// Values returns the slice of values for the current page or nil if there are no values. 2109func (page FileShareItemsPage) Values() []FileShareItem { 2110 if page.fsi.IsEmpty() { 2111 return nil 2112 } 2113 return *page.fsi.Value 2114} 2115 2116// Creates a new instance of the FileShareItemsPage type. 2117func NewFileShareItemsPage(cur FileShareItems, getNextPage func(context.Context, FileShareItems) (FileShareItems, error)) FileShareItemsPage { 2118 return FileShareItemsPage{ 2119 fn: getNextPage, 2120 fsi: cur, 2121 } 2122} 2123 2124// FileShareProperties the properties of the file share. 2125type FileShareProperties struct { 2126 // LastModifiedTime - READ-ONLY; Returns the date and time the share was last modified. 2127 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` 2128 // Metadata - A name-value pair to associate with the share as metadata. 2129 Metadata map[string]*string `json:"metadata"` 2130 // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. 2131 ShareQuota *int32 `json:"shareQuota,omitempty"` 2132 // EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share. Possible values include: 'SMB', 'NFS' 2133 EnabledProtocols EnabledProtocols `json:"enabledProtocols,omitempty"` 2134 // RootSquash - The property is for NFS share only. The default is NoRootSquash. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash' 2135 RootSquash RootSquashType `json:"rootSquash,omitempty"` 2136 // Version - READ-ONLY; The version of the share. 2137 Version *string `json:"version,omitempty"` 2138 // Deleted - READ-ONLY; Indicates whether the share was deleted. 2139 Deleted *bool `json:"deleted,omitempty"` 2140 // DeletedTime - READ-ONLY; The deleted time if the share was deleted. 2141 DeletedTime *date.Time `json:"deletedTime,omitempty"` 2142 // RemainingRetentionDays - READ-ONLY; Remaining retention days for share that was soft deleted. 2143 RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"` 2144 // AccessTier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Possible values include: 'ShareAccessTierTransactionOptimized', 'ShareAccessTierHot', 'ShareAccessTierCool', 'ShareAccessTierPremium' 2145 AccessTier ShareAccessTier `json:"accessTier,omitempty"` 2146 // AccessTierChangeTime - READ-ONLY; Indicates the last modification time for share access tier. 2147 AccessTierChangeTime *date.Time `json:"accessTierChangeTime,omitempty"` 2148 // AccessTierStatus - READ-ONLY; Indicates if there is a pending transition for access tier. 2149 AccessTierStatus *string `json:"accessTierStatus,omitempty"` 2150 // ShareUsageBytes - READ-ONLY; The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. 2151 ShareUsageBytes *int64 `json:"shareUsageBytes,omitempty"` 2152} 2153 2154// MarshalJSON is the custom marshaler for FileShareProperties. 2155func (fsp FileShareProperties) MarshalJSON() ([]byte, error) { 2156 objectMap := make(map[string]interface{}) 2157 if fsp.Metadata != nil { 2158 objectMap["metadata"] = fsp.Metadata 2159 } 2160 if fsp.ShareQuota != nil { 2161 objectMap["shareQuota"] = fsp.ShareQuota 2162 } 2163 if fsp.EnabledProtocols != "" { 2164 objectMap["enabledProtocols"] = fsp.EnabledProtocols 2165 } 2166 if fsp.RootSquash != "" { 2167 objectMap["rootSquash"] = fsp.RootSquash 2168 } 2169 if fsp.AccessTier != "" { 2170 objectMap["accessTier"] = fsp.AccessTier 2171 } 2172 return json.Marshal(objectMap) 2173} 2174 2175// GeoReplicationStats statistics related to replication for storage account's Blob, Table, Queue and File 2176// services. It is only available when geo-redundant replication is enabled for the storage account. 2177type GeoReplicationStats struct { 2178 // Status - READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable' 2179 Status GeoReplicationStatus `json:"status,omitempty"` 2180 // LastSyncTime - READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. 2181 LastSyncTime *date.Time `json:"lastSyncTime,omitempty"` 2182 // CanFailover - READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. 2183 CanFailover *bool `json:"canFailover,omitempty"` 2184} 2185 2186// MarshalJSON is the custom marshaler for GeoReplicationStats. 2187func (grs GeoReplicationStats) MarshalJSON() ([]byte, error) { 2188 objectMap := make(map[string]interface{}) 2189 return json.Marshal(objectMap) 2190} 2191 2192// Identity identity for the resource. 2193type Identity struct { 2194 // PrincipalID - READ-ONLY; The principal ID of resource identity. 2195 PrincipalID *string `json:"principalId,omitempty"` 2196 // TenantID - READ-ONLY; The tenant ID of resource. 2197 TenantID *string `json:"tenantId,omitempty"` 2198 // Type - The identity type. 2199 Type *string `json:"type,omitempty"` 2200} 2201 2202// MarshalJSON is the custom marshaler for Identity. 2203func (i Identity) MarshalJSON() ([]byte, error) { 2204 objectMap := make(map[string]interface{}) 2205 if i.Type != nil { 2206 objectMap["type"] = i.Type 2207 } 2208 return json.Marshal(objectMap) 2209} 2210 2211// ImmutabilityPolicy the ImmutabilityPolicy property of a blob container, including Id, resource name, 2212// resource type, Etag. 2213type ImmutabilityPolicy struct { 2214 autorest.Response `json:"-"` 2215 // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. 2216 *ImmutabilityPolicyProperty `json:"properties,omitempty"` 2217 // Etag - READ-ONLY; Resource Etag. 2218 Etag *string `json:"etag,omitempty"` 2219 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 2220 ID *string `json:"id,omitempty"` 2221 // Name - READ-ONLY; The name of the resource 2222 Name *string `json:"name,omitempty"` 2223 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 2224 Type *string `json:"type,omitempty"` 2225} 2226 2227// MarshalJSON is the custom marshaler for ImmutabilityPolicy. 2228func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) { 2229 objectMap := make(map[string]interface{}) 2230 if IP.ImmutabilityPolicyProperty != nil { 2231 objectMap["properties"] = IP.ImmutabilityPolicyProperty 2232 } 2233 return json.Marshal(objectMap) 2234} 2235 2236// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicy struct. 2237func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error { 2238 var m map[string]*json.RawMessage 2239 err := json.Unmarshal(body, &m) 2240 if err != nil { 2241 return err 2242 } 2243 for k, v := range m { 2244 switch k { 2245 case "properties": 2246 if v != nil { 2247 var immutabilityPolicyProperty ImmutabilityPolicyProperty 2248 err = json.Unmarshal(*v, &immutabilityPolicyProperty) 2249 if err != nil { 2250 return err 2251 } 2252 IP.ImmutabilityPolicyProperty = &immutabilityPolicyProperty 2253 } 2254 case "etag": 2255 if v != nil { 2256 var etag string 2257 err = json.Unmarshal(*v, &etag) 2258 if err != nil { 2259 return err 2260 } 2261 IP.Etag = &etag 2262 } 2263 case "id": 2264 if v != nil { 2265 var ID string 2266 err = json.Unmarshal(*v, &ID) 2267 if err != nil { 2268 return err 2269 } 2270 IP.ID = &ID 2271 } 2272 case "name": 2273 if v != nil { 2274 var name string 2275 err = json.Unmarshal(*v, &name) 2276 if err != nil { 2277 return err 2278 } 2279 IP.Name = &name 2280 } 2281 case "type": 2282 if v != nil { 2283 var typeVar string 2284 err = json.Unmarshal(*v, &typeVar) 2285 if err != nil { 2286 return err 2287 } 2288 IP.Type = &typeVar 2289 } 2290 } 2291 } 2292 2293 return nil 2294} 2295 2296// ImmutabilityPolicyProperties the properties of an ImmutabilityPolicy of a blob container. 2297type ImmutabilityPolicyProperties struct { 2298 // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. 2299 *ImmutabilityPolicyProperty `json:"properties,omitempty"` 2300 // Etag - READ-ONLY; ImmutabilityPolicy Etag. 2301 Etag *string `json:"etag,omitempty"` 2302 // UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container. 2303 UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"` 2304} 2305 2306// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperties. 2307func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) { 2308 objectMap := make(map[string]interface{}) 2309 if ipp.ImmutabilityPolicyProperty != nil { 2310 objectMap["properties"] = ipp.ImmutabilityPolicyProperty 2311 } 2312 return json.Marshal(objectMap) 2313} 2314 2315// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicyProperties struct. 2316func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error { 2317 var m map[string]*json.RawMessage 2318 err := json.Unmarshal(body, &m) 2319 if err != nil { 2320 return err 2321 } 2322 for k, v := range m { 2323 switch k { 2324 case "properties": 2325 if v != nil { 2326 var immutabilityPolicyProperty ImmutabilityPolicyProperty 2327 err = json.Unmarshal(*v, &immutabilityPolicyProperty) 2328 if err != nil { 2329 return err 2330 } 2331 ipp.ImmutabilityPolicyProperty = &immutabilityPolicyProperty 2332 } 2333 case "etag": 2334 if v != nil { 2335 var etag string 2336 err = json.Unmarshal(*v, &etag) 2337 if err != nil { 2338 return err 2339 } 2340 ipp.Etag = &etag 2341 } 2342 case "updateHistory": 2343 if v != nil { 2344 var updateHistory []UpdateHistoryProperty 2345 err = json.Unmarshal(*v, &updateHistory) 2346 if err != nil { 2347 return err 2348 } 2349 ipp.UpdateHistory = &updateHistory 2350 } 2351 } 2352 } 2353 2354 return nil 2355} 2356 2357// ImmutabilityPolicyProperty the properties of an ImmutabilityPolicy of a blob container. 2358type ImmutabilityPolicyProperty struct { 2359 // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days. 2360 ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` 2361 // State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' 2362 State ImmutabilityPolicyState `json:"state,omitempty"` 2363 // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API 2364 AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` 2365} 2366 2367// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperty. 2368func (ipp ImmutabilityPolicyProperty) MarshalJSON() ([]byte, error) { 2369 objectMap := make(map[string]interface{}) 2370 if ipp.ImmutabilityPeriodSinceCreationInDays != nil { 2371 objectMap["immutabilityPeriodSinceCreationInDays"] = ipp.ImmutabilityPeriodSinceCreationInDays 2372 } 2373 if ipp.AllowProtectedAppendWrites != nil { 2374 objectMap["allowProtectedAppendWrites"] = ipp.AllowProtectedAppendWrites 2375 } 2376 return json.Marshal(objectMap) 2377} 2378 2379// IPRule IP rule with specific IP or IP range in CIDR format. 2380type IPRule struct { 2381 // IPAddressOrRange - Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. 2382 IPAddressOrRange *string `json:"value,omitempty"` 2383 // Action - The action of IP ACL rule. Possible values include: 'Allow' 2384 Action Action `json:"action,omitempty"` 2385} 2386 2387// KeyVaultProperties properties of key vault. 2388type KeyVaultProperties struct { 2389 // KeyName - The name of KeyVault key. 2390 KeyName *string `json:"keyname,omitempty"` 2391 // KeyVersion - The version of KeyVault key. 2392 KeyVersion *string `json:"keyversion,omitempty"` 2393 // KeyVaultURI - The Uri of KeyVault. 2394 KeyVaultURI *string `json:"keyvaulturi,omitempty"` 2395 // CurrentVersionedKeyIdentifier - READ-ONLY; The object identifier of the current versioned Key Vault Key in use. 2396 CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` 2397 // LastKeyRotationTimestamp - READ-ONLY; Timestamp of last rotation of the Key Vault Key. 2398 LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` 2399} 2400 2401// MarshalJSON is the custom marshaler for KeyVaultProperties. 2402func (kvp KeyVaultProperties) MarshalJSON() ([]byte, error) { 2403 objectMap := make(map[string]interface{}) 2404 if kvp.KeyName != nil { 2405 objectMap["keyname"] = kvp.KeyName 2406 } 2407 if kvp.KeyVersion != nil { 2408 objectMap["keyversion"] = kvp.KeyVersion 2409 } 2410 if kvp.KeyVaultURI != nil { 2411 objectMap["keyvaulturi"] = kvp.KeyVaultURI 2412 } 2413 return json.Marshal(objectMap) 2414} 2415 2416// LeaseContainerRequest lease Container request schema. 2417type LeaseContainerRequest struct { 2418 // Action - Specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break' 2419 Action Action1 `json:"action,omitempty"` 2420 // LeaseID - Identifies the lease. Can be specified in any valid GUID string format. 2421 LeaseID *string `json:"leaseId,omitempty"` 2422 // BreakPeriod - Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. 2423 BreakPeriod *int32 `json:"breakPeriod,omitempty"` 2424 // LeaseDuration - Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. 2425 LeaseDuration *int32 `json:"leaseDuration,omitempty"` 2426 // ProposedLeaseID - Optional for acquire, required for change. Proposed lease ID, in a GUID string format. 2427 ProposedLeaseID *string `json:"proposedLeaseId,omitempty"` 2428} 2429 2430// LeaseContainerResponse lease Container response schema. 2431type LeaseContainerResponse struct { 2432 autorest.Response `json:"-"` 2433 // LeaseID - Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease. 2434 LeaseID *string `json:"leaseId,omitempty"` 2435 // LeaseTimeSeconds - Approximate time remaining in the lease period, in seconds. 2436 LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"` 2437} 2438 2439// LegalHold the LegalHold property of a blob container. 2440type LegalHold struct { 2441 autorest.Response `json:"-"` 2442 // HasLegalHold - READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. 2443 HasLegalHold *bool `json:"hasLegalHold,omitempty"` 2444 // Tags - Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. 2445 Tags *[]string `json:"tags,omitempty"` 2446} 2447 2448// MarshalJSON is the custom marshaler for LegalHold. 2449func (lh LegalHold) MarshalJSON() ([]byte, error) { 2450 objectMap := make(map[string]interface{}) 2451 if lh.Tags != nil { 2452 objectMap["tags"] = lh.Tags 2453 } 2454 return json.Marshal(objectMap) 2455} 2456 2457// LegalHoldProperties the LegalHold property of a blob container. 2458type LegalHoldProperties struct { 2459 // HasLegalHold - READ-ONLY; The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. 2460 HasLegalHold *bool `json:"hasLegalHold,omitempty"` 2461 // Tags - The list of LegalHold tags of a blob container. 2462 Tags *[]TagProperty `json:"tags,omitempty"` 2463} 2464 2465// MarshalJSON is the custom marshaler for LegalHoldProperties. 2466func (lhp LegalHoldProperties) MarshalJSON() ([]byte, error) { 2467 objectMap := make(map[string]interface{}) 2468 if lhp.Tags != nil { 2469 objectMap["tags"] = lhp.Tags 2470 } 2471 return json.Marshal(objectMap) 2472} 2473 2474// ListAccountSasResponse the List SAS credentials operation response. 2475type ListAccountSasResponse struct { 2476 autorest.Response `json:"-"` 2477 // AccountSasToken - READ-ONLY; List SAS credentials of storage account. 2478 AccountSasToken *string `json:"accountSasToken,omitempty"` 2479} 2480 2481// MarshalJSON is the custom marshaler for ListAccountSasResponse. 2482func (lasr ListAccountSasResponse) MarshalJSON() ([]byte, error) { 2483 objectMap := make(map[string]interface{}) 2484 return json.Marshal(objectMap) 2485} 2486 2487// ListContainerItem the blob container properties be listed out. 2488type ListContainerItem struct { 2489 // ContainerProperties - The blob container properties be listed out. 2490 *ContainerProperties `json:"properties,omitempty"` 2491 // Etag - READ-ONLY; Resource Etag. 2492 Etag *string `json:"etag,omitempty"` 2493 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 2494 ID *string `json:"id,omitempty"` 2495 // Name - READ-ONLY; The name of the resource 2496 Name *string `json:"name,omitempty"` 2497 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 2498 Type *string `json:"type,omitempty"` 2499} 2500 2501// MarshalJSON is the custom marshaler for ListContainerItem. 2502func (lci ListContainerItem) MarshalJSON() ([]byte, error) { 2503 objectMap := make(map[string]interface{}) 2504 if lci.ContainerProperties != nil { 2505 objectMap["properties"] = lci.ContainerProperties 2506 } 2507 return json.Marshal(objectMap) 2508} 2509 2510// UnmarshalJSON is the custom unmarshaler for ListContainerItem struct. 2511func (lci *ListContainerItem) UnmarshalJSON(body []byte) error { 2512 var m map[string]*json.RawMessage 2513 err := json.Unmarshal(body, &m) 2514 if err != nil { 2515 return err 2516 } 2517 for k, v := range m { 2518 switch k { 2519 case "properties": 2520 if v != nil { 2521 var containerProperties ContainerProperties 2522 err = json.Unmarshal(*v, &containerProperties) 2523 if err != nil { 2524 return err 2525 } 2526 lci.ContainerProperties = &containerProperties 2527 } 2528 case "etag": 2529 if v != nil { 2530 var etag string 2531 err = json.Unmarshal(*v, &etag) 2532 if err != nil { 2533 return err 2534 } 2535 lci.Etag = &etag 2536 } 2537 case "id": 2538 if v != nil { 2539 var ID string 2540 err = json.Unmarshal(*v, &ID) 2541 if err != nil { 2542 return err 2543 } 2544 lci.ID = &ID 2545 } 2546 case "name": 2547 if v != nil { 2548 var name string 2549 err = json.Unmarshal(*v, &name) 2550 if err != nil { 2551 return err 2552 } 2553 lci.Name = &name 2554 } 2555 case "type": 2556 if v != nil { 2557 var typeVar string 2558 err = json.Unmarshal(*v, &typeVar) 2559 if err != nil { 2560 return err 2561 } 2562 lci.Type = &typeVar 2563 } 2564 } 2565 } 2566 2567 return nil 2568} 2569 2570// ListContainerItems response schema. Contains list of blobs returned, and if paging is requested or 2571// required, a URL to next page of containers. 2572type ListContainerItems struct { 2573 autorest.Response `json:"-"` 2574 // Value - READ-ONLY; List of blobs containers returned. 2575 Value *[]ListContainerItem `json:"value,omitempty"` 2576 // NextLink - READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers exceed maximum page size. 2577 NextLink *string `json:"nextLink,omitempty"` 2578} 2579 2580// MarshalJSON is the custom marshaler for ListContainerItems. 2581func (lci ListContainerItems) MarshalJSON() ([]byte, error) { 2582 objectMap := make(map[string]interface{}) 2583 return json.Marshal(objectMap) 2584} 2585 2586// ListContainerItemsIterator provides access to a complete listing of ListContainerItem values. 2587type ListContainerItemsIterator struct { 2588 i int 2589 page ListContainerItemsPage 2590} 2591 2592// NextWithContext advances to the next value. If there was an error making 2593// the request the iterator does not advance and the error is returned. 2594func (iter *ListContainerItemsIterator) NextWithContext(ctx context.Context) (err error) { 2595 if tracing.IsEnabled() { 2596 ctx = tracing.StartSpan(ctx, fqdn+"/ListContainerItemsIterator.NextWithContext") 2597 defer func() { 2598 sc := -1 2599 if iter.Response().Response.Response != nil { 2600 sc = iter.Response().Response.Response.StatusCode 2601 } 2602 tracing.EndSpan(ctx, sc, err) 2603 }() 2604 } 2605 iter.i++ 2606 if iter.i < len(iter.page.Values()) { 2607 return nil 2608 } 2609 err = iter.page.NextWithContext(ctx) 2610 if err != nil { 2611 iter.i-- 2612 return err 2613 } 2614 iter.i = 0 2615 return nil 2616} 2617 2618// Next advances to the next value. If there was an error making 2619// the request the iterator does not advance and the error is returned. 2620// Deprecated: Use NextWithContext() instead. 2621func (iter *ListContainerItemsIterator) Next() error { 2622 return iter.NextWithContext(context.Background()) 2623} 2624 2625// NotDone returns true if the enumeration should be started or is not yet complete. 2626func (iter ListContainerItemsIterator) NotDone() bool { 2627 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2628} 2629 2630// Response returns the raw server response from the last page request. 2631func (iter ListContainerItemsIterator) Response() ListContainerItems { 2632 return iter.page.Response() 2633} 2634 2635// Value returns the current value or a zero-initialized value if the 2636// iterator has advanced beyond the end of the collection. 2637func (iter ListContainerItemsIterator) Value() ListContainerItem { 2638 if !iter.page.NotDone() { 2639 return ListContainerItem{} 2640 } 2641 return iter.page.Values()[iter.i] 2642} 2643 2644// Creates a new instance of the ListContainerItemsIterator type. 2645func NewListContainerItemsIterator(page ListContainerItemsPage) ListContainerItemsIterator { 2646 return ListContainerItemsIterator{page: page} 2647} 2648 2649// IsEmpty returns true if the ListResult contains no values. 2650func (lci ListContainerItems) IsEmpty() bool { 2651 return lci.Value == nil || len(*lci.Value) == 0 2652} 2653 2654// hasNextLink returns true if the NextLink is not empty. 2655func (lci ListContainerItems) hasNextLink() bool { 2656 return lci.NextLink != nil && len(*lci.NextLink) != 0 2657} 2658 2659// listContainerItemsPreparer prepares a request to retrieve the next set of results. 2660// It returns nil if no more results exist. 2661func (lci ListContainerItems) listContainerItemsPreparer(ctx context.Context) (*http.Request, error) { 2662 if !lci.hasNextLink() { 2663 return nil, nil 2664 } 2665 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2666 autorest.AsJSON(), 2667 autorest.AsGet(), 2668 autorest.WithBaseURL(to.String(lci.NextLink))) 2669} 2670 2671// ListContainerItemsPage contains a page of ListContainerItem values. 2672type ListContainerItemsPage struct { 2673 fn func(context.Context, ListContainerItems) (ListContainerItems, error) 2674 lci ListContainerItems 2675} 2676 2677// NextWithContext advances to the next page of values. If there was an error making 2678// the request the page does not advance and the error is returned. 2679func (page *ListContainerItemsPage) NextWithContext(ctx context.Context) (err error) { 2680 if tracing.IsEnabled() { 2681 ctx = tracing.StartSpan(ctx, fqdn+"/ListContainerItemsPage.NextWithContext") 2682 defer func() { 2683 sc := -1 2684 if page.Response().Response.Response != nil { 2685 sc = page.Response().Response.Response.StatusCode 2686 } 2687 tracing.EndSpan(ctx, sc, err) 2688 }() 2689 } 2690 for { 2691 next, err := page.fn(ctx, page.lci) 2692 if err != nil { 2693 return err 2694 } 2695 page.lci = next 2696 if !next.hasNextLink() || !next.IsEmpty() { 2697 break 2698 } 2699 } 2700 return nil 2701} 2702 2703// Next advances to the next page of values. If there was an error making 2704// the request the page does not advance and the error is returned. 2705// Deprecated: Use NextWithContext() instead. 2706func (page *ListContainerItemsPage) Next() error { 2707 return page.NextWithContext(context.Background()) 2708} 2709 2710// NotDone returns true if the page enumeration should be started or is not yet complete. 2711func (page ListContainerItemsPage) NotDone() bool { 2712 return !page.lci.IsEmpty() 2713} 2714 2715// Response returns the raw server response from the last page request. 2716func (page ListContainerItemsPage) Response() ListContainerItems { 2717 return page.lci 2718} 2719 2720// Values returns the slice of values for the current page or nil if there are no values. 2721func (page ListContainerItemsPage) Values() []ListContainerItem { 2722 if page.lci.IsEmpty() { 2723 return nil 2724 } 2725 return *page.lci.Value 2726} 2727 2728// Creates a new instance of the ListContainerItemsPage type. 2729func NewListContainerItemsPage(cur ListContainerItems, getNextPage func(context.Context, ListContainerItems) (ListContainerItems, error)) ListContainerItemsPage { 2730 return ListContainerItemsPage{ 2731 fn: getNextPage, 2732 lci: cur, 2733 } 2734} 2735 2736// ListQueue ... 2737type ListQueue struct { 2738 // ListQueueProperties - List Queue resource properties. 2739 *ListQueueProperties `json:"properties,omitempty"` 2740 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 2741 ID *string `json:"id,omitempty"` 2742 // Name - READ-ONLY; The name of the resource 2743 Name *string `json:"name,omitempty"` 2744 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 2745 Type *string `json:"type,omitempty"` 2746} 2747 2748// MarshalJSON is the custom marshaler for ListQueue. 2749func (lq ListQueue) MarshalJSON() ([]byte, error) { 2750 objectMap := make(map[string]interface{}) 2751 if lq.ListQueueProperties != nil { 2752 objectMap["properties"] = lq.ListQueueProperties 2753 } 2754 return json.Marshal(objectMap) 2755} 2756 2757// UnmarshalJSON is the custom unmarshaler for ListQueue struct. 2758func (lq *ListQueue) UnmarshalJSON(body []byte) error { 2759 var m map[string]*json.RawMessage 2760 err := json.Unmarshal(body, &m) 2761 if err != nil { 2762 return err 2763 } 2764 for k, v := range m { 2765 switch k { 2766 case "properties": 2767 if v != nil { 2768 var queueProperties ListQueueProperties 2769 err = json.Unmarshal(*v, &queueProperties) 2770 if err != nil { 2771 return err 2772 } 2773 lq.ListQueueProperties = &queueProperties 2774 } 2775 case "id": 2776 if v != nil { 2777 var ID string 2778 err = json.Unmarshal(*v, &ID) 2779 if err != nil { 2780 return err 2781 } 2782 lq.ID = &ID 2783 } 2784 case "name": 2785 if v != nil { 2786 var name string 2787 err = json.Unmarshal(*v, &name) 2788 if err != nil { 2789 return err 2790 } 2791 lq.Name = &name 2792 } 2793 case "type": 2794 if v != nil { 2795 var typeVar string 2796 err = json.Unmarshal(*v, &typeVar) 2797 if err != nil { 2798 return err 2799 } 2800 lq.Type = &typeVar 2801 } 2802 } 2803 } 2804 2805 return nil 2806} 2807 2808// ListQueueProperties ... 2809type ListQueueProperties struct { 2810 // Metadata - A name-value pair that represents queue metadata. 2811 Metadata map[string]*string `json:"metadata"` 2812} 2813 2814// MarshalJSON is the custom marshaler for ListQueueProperties. 2815func (lqp ListQueueProperties) MarshalJSON() ([]byte, error) { 2816 objectMap := make(map[string]interface{}) 2817 if lqp.Metadata != nil { 2818 objectMap["metadata"] = lqp.Metadata 2819 } 2820 return json.Marshal(objectMap) 2821} 2822 2823// ListQueueResource response schema. Contains list of queues returned 2824type ListQueueResource struct { 2825 autorest.Response `json:"-"` 2826 // Value - READ-ONLY; List of queues returned. 2827 Value *[]ListQueue `json:"value,omitempty"` 2828 // NextLink - READ-ONLY; Request URL that can be used to list next page of queues 2829 NextLink *string `json:"nextLink,omitempty"` 2830} 2831 2832// MarshalJSON is the custom marshaler for ListQueueResource. 2833func (lqr ListQueueResource) MarshalJSON() ([]byte, error) { 2834 objectMap := make(map[string]interface{}) 2835 return json.Marshal(objectMap) 2836} 2837 2838// ListQueueResourceIterator provides access to a complete listing of ListQueue values. 2839type ListQueueResourceIterator struct { 2840 i int 2841 page ListQueueResourcePage 2842} 2843 2844// NextWithContext advances to the next value. If there was an error making 2845// the request the iterator does not advance and the error is returned. 2846func (iter *ListQueueResourceIterator) NextWithContext(ctx context.Context) (err error) { 2847 if tracing.IsEnabled() { 2848 ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourceIterator.NextWithContext") 2849 defer func() { 2850 sc := -1 2851 if iter.Response().Response.Response != nil { 2852 sc = iter.Response().Response.Response.StatusCode 2853 } 2854 tracing.EndSpan(ctx, sc, err) 2855 }() 2856 } 2857 iter.i++ 2858 if iter.i < len(iter.page.Values()) { 2859 return nil 2860 } 2861 err = iter.page.NextWithContext(ctx) 2862 if err != nil { 2863 iter.i-- 2864 return err 2865 } 2866 iter.i = 0 2867 return nil 2868} 2869 2870// Next advances to the next value. If there was an error making 2871// the request the iterator does not advance and the error is returned. 2872// Deprecated: Use NextWithContext() instead. 2873func (iter *ListQueueResourceIterator) Next() error { 2874 return iter.NextWithContext(context.Background()) 2875} 2876 2877// NotDone returns true if the enumeration should be started or is not yet complete. 2878func (iter ListQueueResourceIterator) NotDone() bool { 2879 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2880} 2881 2882// Response returns the raw server response from the last page request. 2883func (iter ListQueueResourceIterator) Response() ListQueueResource { 2884 return iter.page.Response() 2885} 2886 2887// Value returns the current value or a zero-initialized value if the 2888// iterator has advanced beyond the end of the collection. 2889func (iter ListQueueResourceIterator) Value() ListQueue { 2890 if !iter.page.NotDone() { 2891 return ListQueue{} 2892 } 2893 return iter.page.Values()[iter.i] 2894} 2895 2896// Creates a new instance of the ListQueueResourceIterator type. 2897func NewListQueueResourceIterator(page ListQueueResourcePage) ListQueueResourceIterator { 2898 return ListQueueResourceIterator{page: page} 2899} 2900 2901// IsEmpty returns true if the ListResult contains no values. 2902func (lqr ListQueueResource) IsEmpty() bool { 2903 return lqr.Value == nil || len(*lqr.Value) == 0 2904} 2905 2906// hasNextLink returns true if the NextLink is not empty. 2907func (lqr ListQueueResource) hasNextLink() bool { 2908 return lqr.NextLink != nil && len(*lqr.NextLink) != 0 2909} 2910 2911// listQueueResourcePreparer prepares a request to retrieve the next set of results. 2912// It returns nil if no more results exist. 2913func (lqr ListQueueResource) listQueueResourcePreparer(ctx context.Context) (*http.Request, error) { 2914 if !lqr.hasNextLink() { 2915 return nil, nil 2916 } 2917 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2918 autorest.AsJSON(), 2919 autorest.AsGet(), 2920 autorest.WithBaseURL(to.String(lqr.NextLink))) 2921} 2922 2923// ListQueueResourcePage contains a page of ListQueue values. 2924type ListQueueResourcePage struct { 2925 fn func(context.Context, ListQueueResource) (ListQueueResource, error) 2926 lqr ListQueueResource 2927} 2928 2929// NextWithContext advances to the next page of values. If there was an error making 2930// the request the page does not advance and the error is returned. 2931func (page *ListQueueResourcePage) NextWithContext(ctx context.Context) (err error) { 2932 if tracing.IsEnabled() { 2933 ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourcePage.NextWithContext") 2934 defer func() { 2935 sc := -1 2936 if page.Response().Response.Response != nil { 2937 sc = page.Response().Response.Response.StatusCode 2938 } 2939 tracing.EndSpan(ctx, sc, err) 2940 }() 2941 } 2942 for { 2943 next, err := page.fn(ctx, page.lqr) 2944 if err != nil { 2945 return err 2946 } 2947 page.lqr = next 2948 if !next.hasNextLink() || !next.IsEmpty() { 2949 break 2950 } 2951 } 2952 return nil 2953} 2954 2955// Next advances to the next page of values. If there was an error making 2956// the request the page does not advance and the error is returned. 2957// Deprecated: Use NextWithContext() instead. 2958func (page *ListQueueResourcePage) Next() error { 2959 return page.NextWithContext(context.Background()) 2960} 2961 2962// NotDone returns true if the page enumeration should be started or is not yet complete. 2963func (page ListQueueResourcePage) NotDone() bool { 2964 return !page.lqr.IsEmpty() 2965} 2966 2967// Response returns the raw server response from the last page request. 2968func (page ListQueueResourcePage) Response() ListQueueResource { 2969 return page.lqr 2970} 2971 2972// Values returns the slice of values for the current page or nil if there are no values. 2973func (page ListQueueResourcePage) Values() []ListQueue { 2974 if page.lqr.IsEmpty() { 2975 return nil 2976 } 2977 return *page.lqr.Value 2978} 2979 2980// Creates a new instance of the ListQueueResourcePage type. 2981func NewListQueueResourcePage(cur ListQueueResource, getNextPage func(context.Context, ListQueueResource) (ListQueueResource, error)) ListQueueResourcePage { 2982 return ListQueueResourcePage{ 2983 fn: getNextPage, 2984 lqr: cur, 2985 } 2986} 2987 2988// ListQueueServices ... 2989type ListQueueServices struct { 2990 autorest.Response `json:"-"` 2991 // Value - READ-ONLY; List of queue services returned. 2992 Value *[]QueueServiceProperties `json:"value,omitempty"` 2993} 2994 2995// MarshalJSON is the custom marshaler for ListQueueServices. 2996func (lqs ListQueueServices) MarshalJSON() ([]byte, error) { 2997 objectMap := make(map[string]interface{}) 2998 return json.Marshal(objectMap) 2999} 3000 3001// ListServiceSasResponse the List service SAS credentials operation response. 3002type ListServiceSasResponse struct { 3003 autorest.Response `json:"-"` 3004 // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. 3005 ServiceSasToken *string `json:"serviceSasToken,omitempty"` 3006} 3007 3008// MarshalJSON is the custom marshaler for ListServiceSasResponse. 3009func (lssr ListServiceSasResponse) MarshalJSON() ([]byte, error) { 3010 objectMap := make(map[string]interface{}) 3011 return json.Marshal(objectMap) 3012} 3013 3014// ListTableResource response schema. Contains list of tables returned 3015type ListTableResource struct { 3016 autorest.Response `json:"-"` 3017 // Value - READ-ONLY; List of tables returned. 3018 Value *[]Table `json:"value,omitempty"` 3019 // NextLink - READ-ONLY; Request URL that can be used to query next page of tables 3020 NextLink *string `json:"nextLink,omitempty"` 3021} 3022 3023// MarshalJSON is the custom marshaler for ListTableResource. 3024func (ltr ListTableResource) MarshalJSON() ([]byte, error) { 3025 objectMap := make(map[string]interface{}) 3026 return json.Marshal(objectMap) 3027} 3028 3029// ListTableResourceIterator provides access to a complete listing of Table values. 3030type ListTableResourceIterator struct { 3031 i int 3032 page ListTableResourcePage 3033} 3034 3035// NextWithContext advances to the next value. If there was an error making 3036// the request the iterator does not advance and the error is returned. 3037func (iter *ListTableResourceIterator) NextWithContext(ctx context.Context) (err error) { 3038 if tracing.IsEnabled() { 3039 ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourceIterator.NextWithContext") 3040 defer func() { 3041 sc := -1 3042 if iter.Response().Response.Response != nil { 3043 sc = iter.Response().Response.Response.StatusCode 3044 } 3045 tracing.EndSpan(ctx, sc, err) 3046 }() 3047 } 3048 iter.i++ 3049 if iter.i < len(iter.page.Values()) { 3050 return nil 3051 } 3052 err = iter.page.NextWithContext(ctx) 3053 if err != nil { 3054 iter.i-- 3055 return err 3056 } 3057 iter.i = 0 3058 return nil 3059} 3060 3061// Next advances to the next value. If there was an error making 3062// the request the iterator does not advance and the error is returned. 3063// Deprecated: Use NextWithContext() instead. 3064func (iter *ListTableResourceIterator) Next() error { 3065 return iter.NextWithContext(context.Background()) 3066} 3067 3068// NotDone returns true if the enumeration should be started or is not yet complete. 3069func (iter ListTableResourceIterator) NotDone() bool { 3070 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3071} 3072 3073// Response returns the raw server response from the last page request. 3074func (iter ListTableResourceIterator) Response() ListTableResource { 3075 return iter.page.Response() 3076} 3077 3078// Value returns the current value or a zero-initialized value if the 3079// iterator has advanced beyond the end of the collection. 3080func (iter ListTableResourceIterator) Value() Table { 3081 if !iter.page.NotDone() { 3082 return Table{} 3083 } 3084 return iter.page.Values()[iter.i] 3085} 3086 3087// Creates a new instance of the ListTableResourceIterator type. 3088func NewListTableResourceIterator(page ListTableResourcePage) ListTableResourceIterator { 3089 return ListTableResourceIterator{page: page} 3090} 3091 3092// IsEmpty returns true if the ListResult contains no values. 3093func (ltr ListTableResource) IsEmpty() bool { 3094 return ltr.Value == nil || len(*ltr.Value) == 0 3095} 3096 3097// hasNextLink returns true if the NextLink is not empty. 3098func (ltr ListTableResource) hasNextLink() bool { 3099 return ltr.NextLink != nil && len(*ltr.NextLink) != 0 3100} 3101 3102// listTableResourcePreparer prepares a request to retrieve the next set of results. 3103// It returns nil if no more results exist. 3104func (ltr ListTableResource) listTableResourcePreparer(ctx context.Context) (*http.Request, error) { 3105 if !ltr.hasNextLink() { 3106 return nil, nil 3107 } 3108 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3109 autorest.AsJSON(), 3110 autorest.AsGet(), 3111 autorest.WithBaseURL(to.String(ltr.NextLink))) 3112} 3113 3114// ListTableResourcePage contains a page of Table values. 3115type ListTableResourcePage struct { 3116 fn func(context.Context, ListTableResource) (ListTableResource, error) 3117 ltr ListTableResource 3118} 3119 3120// NextWithContext advances to the next page of values. If there was an error making 3121// the request the page does not advance and the error is returned. 3122func (page *ListTableResourcePage) NextWithContext(ctx context.Context) (err error) { 3123 if tracing.IsEnabled() { 3124 ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourcePage.NextWithContext") 3125 defer func() { 3126 sc := -1 3127 if page.Response().Response.Response != nil { 3128 sc = page.Response().Response.Response.StatusCode 3129 } 3130 tracing.EndSpan(ctx, sc, err) 3131 }() 3132 } 3133 for { 3134 next, err := page.fn(ctx, page.ltr) 3135 if err != nil { 3136 return err 3137 } 3138 page.ltr = next 3139 if !next.hasNextLink() || !next.IsEmpty() { 3140 break 3141 } 3142 } 3143 return nil 3144} 3145 3146// Next advances to the next page of values. If there was an error making 3147// the request the page does not advance and the error is returned. 3148// Deprecated: Use NextWithContext() instead. 3149func (page *ListTableResourcePage) Next() error { 3150 return page.NextWithContext(context.Background()) 3151} 3152 3153// NotDone returns true if the page enumeration should be started or is not yet complete. 3154func (page ListTableResourcePage) NotDone() bool { 3155 return !page.ltr.IsEmpty() 3156} 3157 3158// Response returns the raw server response from the last page request. 3159func (page ListTableResourcePage) Response() ListTableResource { 3160 return page.ltr 3161} 3162 3163// Values returns the slice of values for the current page or nil if there are no values. 3164func (page ListTableResourcePage) Values() []Table { 3165 if page.ltr.IsEmpty() { 3166 return nil 3167 } 3168 return *page.ltr.Value 3169} 3170 3171// Creates a new instance of the ListTableResourcePage type. 3172func NewListTableResourcePage(cur ListTableResource, getNextPage func(context.Context, ListTableResource) (ListTableResource, error)) ListTableResourcePage { 3173 return ListTableResourcePage{ 3174 fn: getNextPage, 3175 ltr: cur, 3176 } 3177} 3178 3179// ListTableServices ... 3180type ListTableServices struct { 3181 autorest.Response `json:"-"` 3182 // Value - READ-ONLY; List of table services returned. 3183 Value *[]TableServiceProperties `json:"value,omitempty"` 3184} 3185 3186// MarshalJSON is the custom marshaler for ListTableServices. 3187func (lts ListTableServices) MarshalJSON() ([]byte, error) { 3188 objectMap := make(map[string]interface{}) 3189 return json.Marshal(objectMap) 3190} 3191 3192// ManagementPolicy the Get Storage Account ManagementPolicies operation response. 3193type ManagementPolicy struct { 3194 autorest.Response `json:"-"` 3195 // ManagementPolicyProperties - Returns the Storage Account Data Policies Rules. 3196 *ManagementPolicyProperties `json:"properties,omitempty"` 3197 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3198 ID *string `json:"id,omitempty"` 3199 // Name - READ-ONLY; The name of the resource 3200 Name *string `json:"name,omitempty"` 3201 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3202 Type *string `json:"type,omitempty"` 3203} 3204 3205// MarshalJSON is the custom marshaler for ManagementPolicy. 3206func (mp ManagementPolicy) MarshalJSON() ([]byte, error) { 3207 objectMap := make(map[string]interface{}) 3208 if mp.ManagementPolicyProperties != nil { 3209 objectMap["properties"] = mp.ManagementPolicyProperties 3210 } 3211 return json.Marshal(objectMap) 3212} 3213 3214// UnmarshalJSON is the custom unmarshaler for ManagementPolicy struct. 3215func (mp *ManagementPolicy) UnmarshalJSON(body []byte) error { 3216 var m map[string]*json.RawMessage 3217 err := json.Unmarshal(body, &m) 3218 if err != nil { 3219 return err 3220 } 3221 for k, v := range m { 3222 switch k { 3223 case "properties": 3224 if v != nil { 3225 var managementPolicyProperties ManagementPolicyProperties 3226 err = json.Unmarshal(*v, &managementPolicyProperties) 3227 if err != nil { 3228 return err 3229 } 3230 mp.ManagementPolicyProperties = &managementPolicyProperties 3231 } 3232 case "id": 3233 if v != nil { 3234 var ID string 3235 err = json.Unmarshal(*v, &ID) 3236 if err != nil { 3237 return err 3238 } 3239 mp.ID = &ID 3240 } 3241 case "name": 3242 if v != nil { 3243 var name string 3244 err = json.Unmarshal(*v, &name) 3245 if err != nil { 3246 return err 3247 } 3248 mp.Name = &name 3249 } 3250 case "type": 3251 if v != nil { 3252 var typeVar string 3253 err = json.Unmarshal(*v, &typeVar) 3254 if err != nil { 3255 return err 3256 } 3257 mp.Type = &typeVar 3258 } 3259 } 3260 } 3261 3262 return nil 3263} 3264 3265// ManagementPolicyAction actions are applied to the filtered blobs when the execution condition is met. 3266type ManagementPolicyAction struct { 3267 // BaseBlob - The management policy action for base blob 3268 BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` 3269 // Snapshot - The management policy action for snapshot 3270 Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` 3271} 3272 3273// ManagementPolicyBaseBlob management policy action for base blob. 3274type ManagementPolicyBaseBlob struct { 3275 // TierToCool - The function to tier blobs to cool storage. Support blobs currently at Hot tier 3276 TierToCool *DateAfterModification `json:"tierToCool,omitempty"` 3277 // TierToArchive - The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier 3278 TierToArchive *DateAfterModification `json:"tierToArchive,omitempty"` 3279 // Delete - The function to delete the blob 3280 Delete *DateAfterModification `json:"delete,omitempty"` 3281} 3282 3283// ManagementPolicyDefinition an object that defines the Lifecycle rule. Each definition is made up with a 3284// filters set and an actions set. 3285type ManagementPolicyDefinition struct { 3286 // Actions - An object that defines the action set. 3287 Actions *ManagementPolicyAction `json:"actions,omitempty"` 3288 // Filters - An object that defines the filter set. 3289 Filters *ManagementPolicyFilter `json:"filters,omitempty"` 3290} 3291 3292// ManagementPolicyFilter filters limit rule actions to a subset of blobs within the storage account. If 3293// multiple filters are defined, a logical AND is performed on all filters. 3294type ManagementPolicyFilter struct { 3295 // PrefixMatch - An array of strings for prefixes to be match. 3296 PrefixMatch *[]string `json:"prefixMatch,omitempty"` 3297 // BlobTypes - An array of predefined enum values. Only blockBlob is supported. 3298 BlobTypes *[]string `json:"blobTypes,omitempty"` 3299 // BlobIndexMatch - An array of blob index tag based filters, there can be at most 10 tag filters 3300 BlobIndexMatch *[]TagFilter `json:"blobIndexMatch,omitempty"` 3301} 3302 3303// ManagementPolicyProperties the Storage Account ManagementPolicy properties. 3304type ManagementPolicyProperties struct { 3305 // LastModifiedTime - READ-ONLY; Returns the date and time the ManagementPolicies was last modified. 3306 LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` 3307 // Policy - The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. 3308 Policy *ManagementPolicySchema `json:"policy,omitempty"` 3309} 3310 3311// MarshalJSON is the custom marshaler for ManagementPolicyProperties. 3312func (mpp ManagementPolicyProperties) MarshalJSON() ([]byte, error) { 3313 objectMap := make(map[string]interface{}) 3314 if mpp.Policy != nil { 3315 objectMap["policy"] = mpp.Policy 3316 } 3317 return json.Marshal(objectMap) 3318} 3319 3320// ManagementPolicyRule an object that wraps the Lifecycle rule. Each rule is uniquely defined by name. 3321type ManagementPolicyRule struct { 3322 // Enabled - Rule is enabled if set to true. 3323 Enabled *bool `json:"enabled,omitempty"` 3324 // Name - A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. 3325 Name *string `json:"name,omitempty"` 3326 // Type - The valid value is Lifecycle 3327 Type *string `json:"type,omitempty"` 3328 // Definition - An object that defines the Lifecycle rule. 3329 Definition *ManagementPolicyDefinition `json:"definition,omitempty"` 3330} 3331 3332// ManagementPolicySchema the Storage Account ManagementPolicies Rules. See more details in: 3333// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. 3334type ManagementPolicySchema struct { 3335 // Rules - The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. 3336 Rules *[]ManagementPolicyRule `json:"rules,omitempty"` 3337} 3338 3339// ManagementPolicySnapShot management policy action for snapshot. 3340type ManagementPolicySnapShot struct { 3341 // Delete - The function to delete the blob snapshot 3342 Delete *DateAfterCreation `json:"delete,omitempty"` 3343} 3344 3345// MetricSpecification metric specification of operation. 3346type MetricSpecification struct { 3347 // Name - Name of metric specification. 3348 Name *string `json:"name,omitempty"` 3349 // DisplayName - Display name of metric specification. 3350 DisplayName *string `json:"displayName,omitempty"` 3351 // DisplayDescription - Display description of metric specification. 3352 DisplayDescription *string `json:"displayDescription,omitempty"` 3353 // Unit - Unit could be Bytes or Count. 3354 Unit *string `json:"unit,omitempty"` 3355 // Dimensions - Dimensions of blobs, including blob type and access tier. 3356 Dimensions *[]Dimension `json:"dimensions,omitempty"` 3357 // AggregationType - Aggregation type could be Average. 3358 AggregationType *string `json:"aggregationType,omitempty"` 3359 // FillGapWithZero - The property to decide fill gap with zero or not. 3360 FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` 3361 // Category - The category this metric specification belong to, could be Capacity. 3362 Category *string `json:"category,omitempty"` 3363 // ResourceIDDimensionNameOverride - Account Resource Id. 3364 ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` 3365} 3366 3367// NetworkRuleSet network rule set 3368type NetworkRuleSet struct { 3369 // Bypass - Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices' 3370 Bypass Bypass `json:"bypass,omitempty"` 3371 // VirtualNetworkRules - Sets the virtual network rules 3372 VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` 3373 // IPRules - Sets the IP ACL rules 3374 IPRules *[]IPRule `json:"ipRules,omitempty"` 3375 // DefaultAction - Specifies the default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' 3376 DefaultAction DefaultAction `json:"defaultAction,omitempty"` 3377} 3378 3379// ObjectReplicationPolicies list storage account object replication policies. 3380type ObjectReplicationPolicies struct { 3381 autorest.Response `json:"-"` 3382 // Value - The replication policy between two storage accounts. 3383 Value *[]ObjectReplicationPolicy `json:"value,omitempty"` 3384} 3385 3386// ObjectReplicationPolicy the replication policy between two storage accounts. Multiple rules can be 3387// defined in one policy. 3388type ObjectReplicationPolicy struct { 3389 autorest.Response `json:"-"` 3390 // ObjectReplicationPolicyProperties - Returns the Storage Account Object Replication Policy. 3391 *ObjectReplicationPolicyProperties `json:"properties,omitempty"` 3392 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3393 ID *string `json:"id,omitempty"` 3394 // Name - READ-ONLY; The name of the resource 3395 Name *string `json:"name,omitempty"` 3396 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3397 Type *string `json:"type,omitempty"` 3398} 3399 3400// MarshalJSON is the custom marshaler for ObjectReplicationPolicy. 3401func (orp ObjectReplicationPolicy) MarshalJSON() ([]byte, error) { 3402 objectMap := make(map[string]interface{}) 3403 if orp.ObjectReplicationPolicyProperties != nil { 3404 objectMap["properties"] = orp.ObjectReplicationPolicyProperties 3405 } 3406 return json.Marshal(objectMap) 3407} 3408 3409// UnmarshalJSON is the custom unmarshaler for ObjectReplicationPolicy struct. 3410func (orp *ObjectReplicationPolicy) UnmarshalJSON(body []byte) error { 3411 var m map[string]*json.RawMessage 3412 err := json.Unmarshal(body, &m) 3413 if err != nil { 3414 return err 3415 } 3416 for k, v := range m { 3417 switch k { 3418 case "properties": 3419 if v != nil { 3420 var objectReplicationPolicyProperties ObjectReplicationPolicyProperties 3421 err = json.Unmarshal(*v, &objectReplicationPolicyProperties) 3422 if err != nil { 3423 return err 3424 } 3425 orp.ObjectReplicationPolicyProperties = &objectReplicationPolicyProperties 3426 } 3427 case "id": 3428 if v != nil { 3429 var ID string 3430 err = json.Unmarshal(*v, &ID) 3431 if err != nil { 3432 return err 3433 } 3434 orp.ID = &ID 3435 } 3436 case "name": 3437 if v != nil { 3438 var name string 3439 err = json.Unmarshal(*v, &name) 3440 if err != nil { 3441 return err 3442 } 3443 orp.Name = &name 3444 } 3445 case "type": 3446 if v != nil { 3447 var typeVar string 3448 err = json.Unmarshal(*v, &typeVar) 3449 if err != nil { 3450 return err 3451 } 3452 orp.Type = &typeVar 3453 } 3454 } 3455 } 3456 3457 return nil 3458} 3459 3460// ObjectReplicationPolicyFilter filters limit replication to a subset of blobs within the storage account. 3461// A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is 3462// performed on all filters. 3463type ObjectReplicationPolicyFilter struct { 3464 // PrefixMatch - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix. 3465 PrefixMatch *[]string `json:"prefixMatch,omitempty"` 3466 // MinCreationTime - Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z 3467 MinCreationTime *string `json:"minCreationTime,omitempty"` 3468} 3469 3470// ObjectReplicationPolicyProperties the Storage Account ObjectReplicationPolicy properties. 3471type ObjectReplicationPolicyProperties struct { 3472 // PolicyID - READ-ONLY; A unique id for object replication policy. 3473 PolicyID *string `json:"policyId,omitempty"` 3474 // EnabledTime - READ-ONLY; Indicates when the policy is enabled on the source account. 3475 EnabledTime *date.Time `json:"enabledTime,omitempty"` 3476 // SourceAccount - Required. Source account name. 3477 SourceAccount *string `json:"sourceAccount,omitempty"` 3478 // DestinationAccount - Required. Destination account name. 3479 DestinationAccount *string `json:"destinationAccount,omitempty"` 3480 // Rules - The storage account object replication rules. 3481 Rules *[]ObjectReplicationPolicyRule `json:"rules,omitempty"` 3482} 3483 3484// MarshalJSON is the custom marshaler for ObjectReplicationPolicyProperties. 3485func (orpp ObjectReplicationPolicyProperties) MarshalJSON() ([]byte, error) { 3486 objectMap := make(map[string]interface{}) 3487 if orpp.SourceAccount != nil { 3488 objectMap["sourceAccount"] = orpp.SourceAccount 3489 } 3490 if orpp.DestinationAccount != nil { 3491 objectMap["destinationAccount"] = orpp.DestinationAccount 3492 } 3493 if orpp.Rules != nil { 3494 objectMap["rules"] = orpp.Rules 3495 } 3496 return json.Marshal(objectMap) 3497} 3498 3499// ObjectReplicationPolicyRule the replication policy rule between two containers. 3500type ObjectReplicationPolicyRule struct { 3501 // RuleID - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account. 3502 RuleID *string `json:"ruleId,omitempty"` 3503 // SourceContainer - Required. Source container name. 3504 SourceContainer *string `json:"sourceContainer,omitempty"` 3505 // DestinationContainer - Required. Destination container name. 3506 DestinationContainer *string `json:"destinationContainer,omitempty"` 3507 // Filters - Optional. An object that defines the filter set. 3508 Filters *ObjectReplicationPolicyFilter `json:"filters,omitempty"` 3509} 3510 3511// Operation storage REST API operation definition. 3512type Operation struct { 3513 // Name - Operation name: {provider}/{resource}/{operation} 3514 Name *string `json:"name,omitempty"` 3515 // Display - Display metadata associated with the operation. 3516 Display *OperationDisplay `json:"display,omitempty"` 3517 // Origin - The origin of operations. 3518 Origin *string `json:"origin,omitempty"` 3519 // OperationProperties - Properties of operation, include metric specifications. 3520 *OperationProperties `json:"properties,omitempty"` 3521} 3522 3523// MarshalJSON is the custom marshaler for Operation. 3524func (o Operation) MarshalJSON() ([]byte, error) { 3525 objectMap := make(map[string]interface{}) 3526 if o.Name != nil { 3527 objectMap["name"] = o.Name 3528 } 3529 if o.Display != nil { 3530 objectMap["display"] = o.Display 3531 } 3532 if o.Origin != nil { 3533 objectMap["origin"] = o.Origin 3534 } 3535 if o.OperationProperties != nil { 3536 objectMap["properties"] = o.OperationProperties 3537 } 3538 return json.Marshal(objectMap) 3539} 3540 3541// UnmarshalJSON is the custom unmarshaler for Operation struct. 3542func (o *Operation) UnmarshalJSON(body []byte) error { 3543 var m map[string]*json.RawMessage 3544 err := json.Unmarshal(body, &m) 3545 if err != nil { 3546 return err 3547 } 3548 for k, v := range m { 3549 switch k { 3550 case "name": 3551 if v != nil { 3552 var name string 3553 err = json.Unmarshal(*v, &name) 3554 if err != nil { 3555 return err 3556 } 3557 o.Name = &name 3558 } 3559 case "display": 3560 if v != nil { 3561 var display OperationDisplay 3562 err = json.Unmarshal(*v, &display) 3563 if err != nil { 3564 return err 3565 } 3566 o.Display = &display 3567 } 3568 case "origin": 3569 if v != nil { 3570 var origin string 3571 err = json.Unmarshal(*v, &origin) 3572 if err != nil { 3573 return err 3574 } 3575 o.Origin = &origin 3576 } 3577 case "properties": 3578 if v != nil { 3579 var operationProperties OperationProperties 3580 err = json.Unmarshal(*v, &operationProperties) 3581 if err != nil { 3582 return err 3583 } 3584 o.OperationProperties = &operationProperties 3585 } 3586 } 3587 } 3588 3589 return nil 3590} 3591 3592// OperationDisplay display metadata associated with the operation. 3593type OperationDisplay struct { 3594 // Provider - Service provider: Microsoft Storage. 3595 Provider *string `json:"provider,omitempty"` 3596 // Resource - Resource on which the operation is performed etc. 3597 Resource *string `json:"resource,omitempty"` 3598 // Operation - Type of operation: get, read, delete, etc. 3599 Operation *string `json:"operation,omitempty"` 3600 // Description - Description of the operation. 3601 Description *string `json:"description,omitempty"` 3602} 3603 3604// OperationListResult result of the request to list Storage operations. It contains a list of operations 3605// and a URL link to get the next set of results. 3606type OperationListResult struct { 3607 autorest.Response `json:"-"` 3608 // Value - List of Storage operations supported by the Storage resource provider. 3609 Value *[]Operation `json:"value,omitempty"` 3610} 3611 3612// OperationProperties properties of operation, include metric specifications. 3613type OperationProperties struct { 3614 // ServiceSpecification - One property of operation, include metric specifications. 3615 ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` 3616} 3617 3618// PrivateEndpoint the Private Endpoint resource. 3619type PrivateEndpoint struct { 3620 // ID - READ-ONLY; The ARM identifier for Private Endpoint 3621 ID *string `json:"id,omitempty"` 3622} 3623 3624// MarshalJSON is the custom marshaler for PrivateEndpoint. 3625func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { 3626 objectMap := make(map[string]interface{}) 3627 return json.Marshal(objectMap) 3628} 3629 3630// PrivateEndpointConnection the Private Endpoint Connection resource. 3631type PrivateEndpointConnection struct { 3632 autorest.Response `json:"-"` 3633 // PrivateEndpointConnectionProperties - Resource properties. 3634 *PrivateEndpointConnectionProperties `json:"properties,omitempty"` 3635 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3636 ID *string `json:"id,omitempty"` 3637 // Name - READ-ONLY; The name of the resource 3638 Name *string `json:"name,omitempty"` 3639 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3640 Type *string `json:"type,omitempty"` 3641} 3642 3643// MarshalJSON is the custom marshaler for PrivateEndpointConnection. 3644func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { 3645 objectMap := make(map[string]interface{}) 3646 if pec.PrivateEndpointConnectionProperties != nil { 3647 objectMap["properties"] = pec.PrivateEndpointConnectionProperties 3648 } 3649 return json.Marshal(objectMap) 3650} 3651 3652// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. 3653func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { 3654 var m map[string]*json.RawMessage 3655 err := json.Unmarshal(body, &m) 3656 if err != nil { 3657 return err 3658 } 3659 for k, v := range m { 3660 switch k { 3661 case "properties": 3662 if v != nil { 3663 var privateEndpointConnectionProperties PrivateEndpointConnectionProperties 3664 err = json.Unmarshal(*v, &privateEndpointConnectionProperties) 3665 if err != nil { 3666 return err 3667 } 3668 pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties 3669 } 3670 case "id": 3671 if v != nil { 3672 var ID string 3673 err = json.Unmarshal(*v, &ID) 3674 if err != nil { 3675 return err 3676 } 3677 pec.ID = &ID 3678 } 3679 case "name": 3680 if v != nil { 3681 var name string 3682 err = json.Unmarshal(*v, &name) 3683 if err != nil { 3684 return err 3685 } 3686 pec.Name = &name 3687 } 3688 case "type": 3689 if v != nil { 3690 var typeVar string 3691 err = json.Unmarshal(*v, &typeVar) 3692 if err != nil { 3693 return err 3694 } 3695 pec.Type = &typeVar 3696 } 3697 } 3698 } 3699 3700 return nil 3701} 3702 3703// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified 3704// storage account 3705type PrivateEndpointConnectionListResult struct { 3706 autorest.Response `json:"-"` 3707 // Value - Array of private endpoint connections 3708 Value *[]PrivateEndpointConnection `json:"value,omitempty"` 3709} 3710 3711// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. 3712type PrivateEndpointConnectionProperties struct { 3713 // PrivateEndpoint - The resource of private end point. 3714 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` 3715 // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. 3716 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` 3717 // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed' 3718 ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` 3719} 3720 3721// PrivateLinkResource a private link resource 3722type PrivateLinkResource struct { 3723 // PrivateLinkResourceProperties - Resource properties. 3724 *PrivateLinkResourceProperties `json:"properties,omitempty"` 3725 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3726 ID *string `json:"id,omitempty"` 3727 // Name - READ-ONLY; The name of the resource 3728 Name *string `json:"name,omitempty"` 3729 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3730 Type *string `json:"type,omitempty"` 3731} 3732 3733// MarshalJSON is the custom marshaler for PrivateLinkResource. 3734func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { 3735 objectMap := make(map[string]interface{}) 3736 if plr.PrivateLinkResourceProperties != nil { 3737 objectMap["properties"] = plr.PrivateLinkResourceProperties 3738 } 3739 return json.Marshal(objectMap) 3740} 3741 3742// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct. 3743func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error { 3744 var m map[string]*json.RawMessage 3745 err := json.Unmarshal(body, &m) 3746 if err != nil { 3747 return err 3748 } 3749 for k, v := range m { 3750 switch k { 3751 case "properties": 3752 if v != nil { 3753 var privateLinkResourceProperties PrivateLinkResourceProperties 3754 err = json.Unmarshal(*v, &privateLinkResourceProperties) 3755 if err != nil { 3756 return err 3757 } 3758 plr.PrivateLinkResourceProperties = &privateLinkResourceProperties 3759 } 3760 case "id": 3761 if v != nil { 3762 var ID string 3763 err = json.Unmarshal(*v, &ID) 3764 if err != nil { 3765 return err 3766 } 3767 plr.ID = &ID 3768 } 3769 case "name": 3770 if v != nil { 3771 var name string 3772 err = json.Unmarshal(*v, &name) 3773 if err != nil { 3774 return err 3775 } 3776 plr.Name = &name 3777 } 3778 case "type": 3779 if v != nil { 3780 var typeVar string 3781 err = json.Unmarshal(*v, &typeVar) 3782 if err != nil { 3783 return err 3784 } 3785 plr.Type = &typeVar 3786 } 3787 } 3788 } 3789 3790 return nil 3791} 3792 3793// PrivateLinkResourceListResult a list of private link resources 3794type PrivateLinkResourceListResult struct { 3795 autorest.Response `json:"-"` 3796 // Value - Array of private link resources 3797 Value *[]PrivateLinkResource `json:"value,omitempty"` 3798} 3799 3800// PrivateLinkResourceProperties properties of a private link resource. 3801type PrivateLinkResourceProperties struct { 3802 // GroupID - READ-ONLY; The private link resource group id. 3803 GroupID *string `json:"groupId,omitempty"` 3804 // RequiredMembers - READ-ONLY; The private link resource required member names. 3805 RequiredMembers *[]string `json:"requiredMembers,omitempty"` 3806 // RequiredZoneNames - The private link resource Private link DNS zone name. 3807 RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` 3808} 3809 3810// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties. 3811func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { 3812 objectMap := make(map[string]interface{}) 3813 if plrp.RequiredZoneNames != nil { 3814 objectMap["requiredZoneNames"] = plrp.RequiredZoneNames 3815 } 3816 return json.Marshal(objectMap) 3817} 3818 3819// PrivateLinkServiceConnectionState a collection of information about the state of the connection between 3820// service consumer and provider. 3821type PrivateLinkServiceConnectionState struct { 3822 // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected' 3823 Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` 3824 // Description - The reason for approval/rejection of the connection. 3825 Description *string `json:"description,omitempty"` 3826 // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer. 3827 ActionRequired *string `json:"actionRequired,omitempty"` 3828} 3829 3830// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not 3831// have tags and a location 3832type ProxyResource struct { 3833 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3834 ID *string `json:"id,omitempty"` 3835 // Name - READ-ONLY; The name of the resource 3836 Name *string `json:"name,omitempty"` 3837 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3838 Type *string `json:"type,omitempty"` 3839} 3840 3841// MarshalJSON is the custom marshaler for ProxyResource. 3842func (pr ProxyResource) MarshalJSON() ([]byte, error) { 3843 objectMap := make(map[string]interface{}) 3844 return json.Marshal(objectMap) 3845} 3846 3847// Queue ... 3848type Queue struct { 3849 autorest.Response `json:"-"` 3850 // QueueProperties - Queue resource properties. 3851 *QueueProperties `json:"properties,omitempty"` 3852 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3853 ID *string `json:"id,omitempty"` 3854 // Name - READ-ONLY; The name of the resource 3855 Name *string `json:"name,omitempty"` 3856 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3857 Type *string `json:"type,omitempty"` 3858} 3859 3860// MarshalJSON is the custom marshaler for Queue. 3861func (q Queue) MarshalJSON() ([]byte, error) { 3862 objectMap := make(map[string]interface{}) 3863 if q.QueueProperties != nil { 3864 objectMap["properties"] = q.QueueProperties 3865 } 3866 return json.Marshal(objectMap) 3867} 3868 3869// UnmarshalJSON is the custom unmarshaler for Queue struct. 3870func (q *Queue) UnmarshalJSON(body []byte) error { 3871 var m map[string]*json.RawMessage 3872 err := json.Unmarshal(body, &m) 3873 if err != nil { 3874 return err 3875 } 3876 for k, v := range m { 3877 switch k { 3878 case "properties": 3879 if v != nil { 3880 var queueProperties QueueProperties 3881 err = json.Unmarshal(*v, &queueProperties) 3882 if err != nil { 3883 return err 3884 } 3885 q.QueueProperties = &queueProperties 3886 } 3887 case "id": 3888 if v != nil { 3889 var ID string 3890 err = json.Unmarshal(*v, &ID) 3891 if err != nil { 3892 return err 3893 } 3894 q.ID = &ID 3895 } 3896 case "name": 3897 if v != nil { 3898 var name string 3899 err = json.Unmarshal(*v, &name) 3900 if err != nil { 3901 return err 3902 } 3903 q.Name = &name 3904 } 3905 case "type": 3906 if v != nil { 3907 var typeVar string 3908 err = json.Unmarshal(*v, &typeVar) 3909 if err != nil { 3910 return err 3911 } 3912 q.Type = &typeVar 3913 } 3914 } 3915 } 3916 3917 return nil 3918} 3919 3920// QueueProperties ... 3921type QueueProperties struct { 3922 // Metadata - A name-value pair that represents queue metadata. 3923 Metadata map[string]*string `json:"metadata"` 3924 // ApproximateMessageCount - READ-ONLY; Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher. 3925 ApproximateMessageCount *int32 `json:"approximateMessageCount,omitempty"` 3926} 3927 3928// MarshalJSON is the custom marshaler for QueueProperties. 3929func (qp QueueProperties) MarshalJSON() ([]byte, error) { 3930 objectMap := make(map[string]interface{}) 3931 if qp.Metadata != nil { 3932 objectMap["metadata"] = qp.Metadata 3933 } 3934 return json.Marshal(objectMap) 3935} 3936 3937// QueueServiceProperties the properties of a storage account’s Queue service. 3938type QueueServiceProperties struct { 3939 autorest.Response `json:"-"` 3940 // QueueServicePropertiesProperties - The properties of a storage account’s Queue service. 3941 *QueueServicePropertiesProperties `json:"properties,omitempty"` 3942 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 3943 ID *string `json:"id,omitempty"` 3944 // Name - READ-ONLY; The name of the resource 3945 Name *string `json:"name,omitempty"` 3946 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 3947 Type *string `json:"type,omitempty"` 3948} 3949 3950// MarshalJSON is the custom marshaler for QueueServiceProperties. 3951func (qsp QueueServiceProperties) MarshalJSON() ([]byte, error) { 3952 objectMap := make(map[string]interface{}) 3953 if qsp.QueueServicePropertiesProperties != nil { 3954 objectMap["properties"] = qsp.QueueServicePropertiesProperties 3955 } 3956 return json.Marshal(objectMap) 3957} 3958 3959// UnmarshalJSON is the custom unmarshaler for QueueServiceProperties struct. 3960func (qsp *QueueServiceProperties) UnmarshalJSON(body []byte) error { 3961 var m map[string]*json.RawMessage 3962 err := json.Unmarshal(body, &m) 3963 if err != nil { 3964 return err 3965 } 3966 for k, v := range m { 3967 switch k { 3968 case "properties": 3969 if v != nil { 3970 var queueServiceProperties QueueServicePropertiesProperties 3971 err = json.Unmarshal(*v, &queueServiceProperties) 3972 if err != nil { 3973 return err 3974 } 3975 qsp.QueueServicePropertiesProperties = &queueServiceProperties 3976 } 3977 case "id": 3978 if v != nil { 3979 var ID string 3980 err = json.Unmarshal(*v, &ID) 3981 if err != nil { 3982 return err 3983 } 3984 qsp.ID = &ID 3985 } 3986 case "name": 3987 if v != nil { 3988 var name string 3989 err = json.Unmarshal(*v, &name) 3990 if err != nil { 3991 return err 3992 } 3993 qsp.Name = &name 3994 } 3995 case "type": 3996 if v != nil { 3997 var typeVar string 3998 err = json.Unmarshal(*v, &typeVar) 3999 if err != nil { 4000 return err 4001 } 4002 qsp.Type = &typeVar 4003 } 4004 } 4005 } 4006 4007 return nil 4008} 4009 4010// QueueServicePropertiesProperties the properties of a storage account’s Queue service. 4011type QueueServicePropertiesProperties struct { 4012 // Cors - Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service. 4013 Cors *CorsRules `json:"cors,omitempty"` 4014} 4015 4016// Resource common fields that are returned in the response for all Azure Resource Manager resources 4017type Resource struct { 4018 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 4019 ID *string `json:"id,omitempty"` 4020 // Name - READ-ONLY; The name of the resource 4021 Name *string `json:"name,omitempty"` 4022 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 4023 Type *string `json:"type,omitempty"` 4024} 4025 4026// MarshalJSON is the custom marshaler for Resource. 4027func (r Resource) MarshalJSON() ([]byte, error) { 4028 objectMap := make(map[string]interface{}) 4029 return json.Marshal(objectMap) 4030} 4031 4032// RestorePolicyProperties the blob service properties for blob restore policy 4033type RestorePolicyProperties struct { 4034 // Enabled - Blob restore is enabled if set to true. 4035 Enabled *bool `json:"enabled,omitempty"` 4036 // Days - how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. 4037 Days *int32 `json:"days,omitempty"` 4038 // LastEnabledTime - READ-ONLY; Deprecated in favor of minRestoreTime property. 4039 LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` 4040 // MinRestoreTime - READ-ONLY; Returns the minimum date and time that the restore can be started. 4041 MinRestoreTime *date.Time `json:"minRestoreTime,omitempty"` 4042} 4043 4044// MarshalJSON is the custom marshaler for RestorePolicyProperties. 4045func (rpp RestorePolicyProperties) MarshalJSON() ([]byte, error) { 4046 objectMap := make(map[string]interface{}) 4047 if rpp.Enabled != nil { 4048 objectMap["enabled"] = rpp.Enabled 4049 } 4050 if rpp.Days != nil { 4051 objectMap["days"] = rpp.Days 4052 } 4053 return json.Marshal(objectMap) 4054} 4055 4056// Restriction the restriction because of which SKU cannot be used. 4057type Restriction struct { 4058 // Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location. 4059 Type *string `json:"type,omitempty"` 4060 // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. 4061 Values *[]string `json:"values,omitempty"` 4062 // ReasonCode - The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC. Possible values include: 'QuotaID', 'NotAvailableForSubscription' 4063 ReasonCode ReasonCode `json:"reasonCode,omitempty"` 4064} 4065 4066// MarshalJSON is the custom marshaler for Restriction. 4067func (r Restriction) MarshalJSON() ([]byte, error) { 4068 objectMap := make(map[string]interface{}) 4069 if r.ReasonCode != "" { 4070 objectMap["reasonCode"] = r.ReasonCode 4071 } 4072 return json.Marshal(objectMap) 4073} 4074 4075// RoutingPreference routing preference defines the type of network, either microsoft or internet routing 4076// to be used to deliver the user data, the default option is microsoft routing 4077type RoutingPreference struct { 4078 // RoutingChoice - Routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting' 4079 RoutingChoice RoutingChoice `json:"routingChoice,omitempty"` 4080 // PublishMicrosoftEndpoints - A boolean flag which indicates whether microsoft routing storage endpoints are to be published 4081 PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` 4082 // PublishInternetEndpoints - A boolean flag which indicates whether internet routing storage endpoints are to be published 4083 PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` 4084} 4085 4086// ServiceSasParameters the parameters to list service SAS credentials of a specific resource. 4087type ServiceSasParameters struct { 4088 // CanonicalizedResource - The canonical path to the signed resource. 4089 CanonicalizedResource *string `json:"canonicalizedResource,omitempty"` 4090 // Resource - The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'SignedResourceB', 'SignedResourceC', 'SignedResourceF', 'SignedResourceS' 4091 Resource SignedResource `json:"signedResource,omitempty"` 4092 // Permissions - The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P' 4093 Permissions Permissions `json:"signedPermission,omitempty"` 4094 // IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests. 4095 IPAddressOrRange *string `json:"signedIp,omitempty"` 4096 // Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS' 4097 Protocols HTTPProtocol `json:"signedProtocol,omitempty"` 4098 // SharedAccessStartTime - The time at which the SAS becomes valid. 4099 SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` 4100 // SharedAccessExpiryTime - The time at which the shared access signature becomes invalid. 4101 SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` 4102 // Identifier - A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. 4103 Identifier *string `json:"signedIdentifier,omitempty"` 4104 // PartitionKeyStart - The start of partition key. 4105 PartitionKeyStart *string `json:"startPk,omitempty"` 4106 // PartitionKeyEnd - The end of partition key. 4107 PartitionKeyEnd *string `json:"endPk,omitempty"` 4108 // RowKeyStart - The start of row key. 4109 RowKeyStart *string `json:"startRk,omitempty"` 4110 // RowKeyEnd - The end of row key. 4111 RowKeyEnd *string `json:"endRk,omitempty"` 4112 // KeyToSign - The key to sign the account SAS token with. 4113 KeyToSign *string `json:"keyToSign,omitempty"` 4114 // CacheControl - The response header override for cache control. 4115 CacheControl *string `json:"rscc,omitempty"` 4116 // ContentDisposition - The response header override for content disposition. 4117 ContentDisposition *string `json:"rscd,omitempty"` 4118 // ContentEncoding - The response header override for content encoding. 4119 ContentEncoding *string `json:"rsce,omitempty"` 4120 // ContentLanguage - The response header override for content language. 4121 ContentLanguage *string `json:"rscl,omitempty"` 4122 // ContentType - The response header override for content type. 4123 ContentType *string `json:"rsct,omitempty"` 4124} 4125 4126// ServiceSpecification one property of operation, include metric specifications. 4127type ServiceSpecification struct { 4128 // MetricSpecifications - Metric specifications of operation. 4129 MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` 4130} 4131 4132// Sku the SKU of the storage account. 4133type Sku struct { 4134 // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' 4135 Name SkuName `json:"name,omitempty"` 4136 // Tier - Possible values include: 'Standard', 'Premium' 4137 Tier SkuTier `json:"tier,omitempty"` 4138} 4139 4140// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, 4141// change notification, etc. 4142type SKUCapability struct { 4143 // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. 4144 Name *string `json:"name,omitempty"` 4145 // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. 4146 Value *string `json:"value,omitempty"` 4147} 4148 4149// MarshalJSON is the custom marshaler for SKUCapability. 4150func (sc SKUCapability) MarshalJSON() ([]byte, error) { 4151 objectMap := make(map[string]interface{}) 4152 return json.Marshal(objectMap) 4153} 4154 4155// SkuInformation storage SKU and its properties 4156type SkuInformation struct { 4157 // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' 4158 Name SkuName `json:"name,omitempty"` 4159 // Tier - Possible values include: 'Standard', 'Premium' 4160 Tier SkuTier `json:"tier,omitempty"` 4161 // ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'. 4162 ResourceType *string `json:"resourceType,omitempty"` 4163 // Kind - READ-ONLY; Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' 4164 Kind Kind `json:"kind,omitempty"` 4165 // Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). 4166 Locations *[]string `json:"locations,omitempty"` 4167 // Capabilities - READ-ONLY; The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. 4168 Capabilities *[]SKUCapability `json:"capabilities,omitempty"` 4169 // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. 4170 Restrictions *[]Restriction `json:"restrictions,omitempty"` 4171} 4172 4173// MarshalJSON is the custom marshaler for SkuInformation. 4174func (si SkuInformation) MarshalJSON() ([]byte, error) { 4175 objectMap := make(map[string]interface{}) 4176 if si.Name != "" { 4177 objectMap["name"] = si.Name 4178 } 4179 if si.Tier != "" { 4180 objectMap["tier"] = si.Tier 4181 } 4182 if si.Restrictions != nil { 4183 objectMap["restrictions"] = si.Restrictions 4184 } 4185 return json.Marshal(objectMap) 4186} 4187 4188// SkuListResult the response from the List Storage SKUs operation. 4189type SkuListResult struct { 4190 autorest.Response `json:"-"` 4191 // Value - READ-ONLY; Get the list result of storage SKUs and their properties. 4192 Value *[]SkuInformation `json:"value,omitempty"` 4193} 4194 4195// MarshalJSON is the custom marshaler for SkuListResult. 4196func (slr SkuListResult) MarshalJSON() ([]byte, error) { 4197 objectMap := make(map[string]interface{}) 4198 return json.Marshal(objectMap) 4199} 4200 4201// Table properties of the table, including Id, resource name, resource type. 4202type Table struct { 4203 autorest.Response `json:"-"` 4204 // TableProperties - Table resource properties. 4205 *TableProperties `json:"properties,omitempty"` 4206 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 4207 ID *string `json:"id,omitempty"` 4208 // Name - READ-ONLY; The name of the resource 4209 Name *string `json:"name,omitempty"` 4210 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 4211 Type *string `json:"type,omitempty"` 4212} 4213 4214// MarshalJSON is the custom marshaler for Table. 4215func (t Table) MarshalJSON() ([]byte, error) { 4216 objectMap := make(map[string]interface{}) 4217 if t.TableProperties != nil { 4218 objectMap["properties"] = t.TableProperties 4219 } 4220 return json.Marshal(objectMap) 4221} 4222 4223// UnmarshalJSON is the custom unmarshaler for Table struct. 4224func (t *Table) UnmarshalJSON(body []byte) error { 4225 var m map[string]*json.RawMessage 4226 err := json.Unmarshal(body, &m) 4227 if err != nil { 4228 return err 4229 } 4230 for k, v := range m { 4231 switch k { 4232 case "properties": 4233 if v != nil { 4234 var tableProperties TableProperties 4235 err = json.Unmarshal(*v, &tableProperties) 4236 if err != nil { 4237 return err 4238 } 4239 t.TableProperties = &tableProperties 4240 } 4241 case "id": 4242 if v != nil { 4243 var ID string 4244 err = json.Unmarshal(*v, &ID) 4245 if err != nil { 4246 return err 4247 } 4248 t.ID = &ID 4249 } 4250 case "name": 4251 if v != nil { 4252 var name string 4253 err = json.Unmarshal(*v, &name) 4254 if err != nil { 4255 return err 4256 } 4257 t.Name = &name 4258 } 4259 case "type": 4260 if v != nil { 4261 var typeVar string 4262 err = json.Unmarshal(*v, &typeVar) 4263 if err != nil { 4264 return err 4265 } 4266 t.Type = &typeVar 4267 } 4268 } 4269 } 4270 4271 return nil 4272} 4273 4274// TableProperties ... 4275type TableProperties struct { 4276 // TableName - READ-ONLY; Table name under the specified account 4277 TableName *string `json:"tableName,omitempty"` 4278} 4279 4280// MarshalJSON is the custom marshaler for TableProperties. 4281func (tp TableProperties) MarshalJSON() ([]byte, error) { 4282 objectMap := make(map[string]interface{}) 4283 return json.Marshal(objectMap) 4284} 4285 4286// TableServiceProperties the properties of a storage account’s Table service. 4287type TableServiceProperties struct { 4288 autorest.Response `json:"-"` 4289 // TableServicePropertiesProperties - The properties of a storage account’s Table service. 4290 *TableServicePropertiesProperties `json:"properties,omitempty"` 4291 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 4292 ID *string `json:"id,omitempty"` 4293 // Name - READ-ONLY; The name of the resource 4294 Name *string `json:"name,omitempty"` 4295 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 4296 Type *string `json:"type,omitempty"` 4297} 4298 4299// MarshalJSON is the custom marshaler for TableServiceProperties. 4300func (tsp TableServiceProperties) MarshalJSON() ([]byte, error) { 4301 objectMap := make(map[string]interface{}) 4302 if tsp.TableServicePropertiesProperties != nil { 4303 objectMap["properties"] = tsp.TableServicePropertiesProperties 4304 } 4305 return json.Marshal(objectMap) 4306} 4307 4308// UnmarshalJSON is the custom unmarshaler for TableServiceProperties struct. 4309func (tsp *TableServiceProperties) UnmarshalJSON(body []byte) error { 4310 var m map[string]*json.RawMessage 4311 err := json.Unmarshal(body, &m) 4312 if err != nil { 4313 return err 4314 } 4315 for k, v := range m { 4316 switch k { 4317 case "properties": 4318 if v != nil { 4319 var tableServiceProperties TableServicePropertiesProperties 4320 err = json.Unmarshal(*v, &tableServiceProperties) 4321 if err != nil { 4322 return err 4323 } 4324 tsp.TableServicePropertiesProperties = &tableServiceProperties 4325 } 4326 case "id": 4327 if v != nil { 4328 var ID string 4329 err = json.Unmarshal(*v, &ID) 4330 if err != nil { 4331 return err 4332 } 4333 tsp.ID = &ID 4334 } 4335 case "name": 4336 if v != nil { 4337 var name string 4338 err = json.Unmarshal(*v, &name) 4339 if err != nil { 4340 return err 4341 } 4342 tsp.Name = &name 4343 } 4344 case "type": 4345 if v != nil { 4346 var typeVar string 4347 err = json.Unmarshal(*v, &typeVar) 4348 if err != nil { 4349 return err 4350 } 4351 tsp.Type = &typeVar 4352 } 4353 } 4354 } 4355 4356 return nil 4357} 4358 4359// TableServicePropertiesProperties the properties of a storage account’s Table service. 4360type TableServicePropertiesProperties struct { 4361 // Cors - Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service. 4362 Cors *CorsRules `json:"cors,omitempty"` 4363} 4364 4365// TagFilter blob index tag based filtering for blob objects 4366type TagFilter struct { 4367 // Name - This is the filter tag name, it can have 1 - 128 characters 4368 Name *string `json:"name,omitempty"` 4369 // Op - This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported 4370 Op *string `json:"op,omitempty"` 4371 // Value - This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters 4372 Value *string `json:"value,omitempty"` 4373} 4374 4375// TagProperty a tag of the LegalHold of a blob container. 4376type TagProperty struct { 4377 // Tag - READ-ONLY; The tag value. 4378 Tag *string `json:"tag,omitempty"` 4379 // Timestamp - READ-ONLY; Returns the date and time the tag was added. 4380 Timestamp *date.Time `json:"timestamp,omitempty"` 4381 // ObjectIdentifier - READ-ONLY; Returns the Object ID of the user who added the tag. 4382 ObjectIdentifier *string `json:"objectIdentifier,omitempty"` 4383 // TenantID - READ-ONLY; Returns the Tenant ID that issued the token for the user who added the tag. 4384 TenantID *string `json:"tenantId,omitempty"` 4385 // Upn - READ-ONLY; Returns the User Principal Name of the user who added the tag. 4386 Upn *string `json:"upn,omitempty"` 4387} 4388 4389// MarshalJSON is the custom marshaler for TagProperty. 4390func (tp TagProperty) MarshalJSON() ([]byte, error) { 4391 objectMap := make(map[string]interface{}) 4392 return json.Marshal(objectMap) 4393} 4394 4395// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource 4396// which has 'tags' and a 'location' 4397type TrackedResource struct { 4398 // Tags - Resource tags. 4399 Tags map[string]*string `json:"tags"` 4400 // Location - The geo-location where the resource lives 4401 Location *string `json:"location,omitempty"` 4402 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 4403 ID *string `json:"id,omitempty"` 4404 // Name - READ-ONLY; The name of the resource 4405 Name *string `json:"name,omitempty"` 4406 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 4407 Type *string `json:"type,omitempty"` 4408} 4409 4410// MarshalJSON is the custom marshaler for TrackedResource. 4411func (tr TrackedResource) MarshalJSON() ([]byte, error) { 4412 objectMap := make(map[string]interface{}) 4413 if tr.Tags != nil { 4414 objectMap["tags"] = tr.Tags 4415 } 4416 if tr.Location != nil { 4417 objectMap["location"] = tr.Location 4418 } 4419 return json.Marshal(objectMap) 4420} 4421 4422// UpdateHistoryProperty an update history of the ImmutabilityPolicy of a blob container. 4423type UpdateHistoryProperty struct { 4424 // Update - READ-ONLY; The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Possible values include: 'Put', 'Lock', 'Extend' 4425 Update ImmutabilityPolicyUpdateType `json:"update,omitempty"` 4426 // ImmutabilityPeriodSinceCreationInDays - READ-ONLY; The immutability period for the blobs in the container since the policy creation, in days. 4427 ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` 4428 // Timestamp - READ-ONLY; Returns the date and time the ImmutabilityPolicy was updated. 4429 Timestamp *date.Time `json:"timestamp,omitempty"` 4430 // ObjectIdentifier - READ-ONLY; Returns the Object ID of the user who updated the ImmutabilityPolicy. 4431 ObjectIdentifier *string `json:"objectIdentifier,omitempty"` 4432 // TenantID - READ-ONLY; Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. 4433 TenantID *string `json:"tenantId,omitempty"` 4434 // Upn - READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy. 4435 Upn *string `json:"upn,omitempty"` 4436} 4437 4438// MarshalJSON is the custom marshaler for UpdateHistoryProperty. 4439func (uhp UpdateHistoryProperty) MarshalJSON() ([]byte, error) { 4440 objectMap := make(map[string]interface{}) 4441 return json.Marshal(objectMap) 4442} 4443 4444// Usage describes Storage Resource Usage. 4445type Usage struct { 4446 // Unit - READ-ONLY; Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond' 4447 Unit UsageUnit `json:"unit,omitempty"` 4448 // CurrentValue - READ-ONLY; Gets the current count of the allocated resources in the subscription. 4449 CurrentValue *int32 `json:"currentValue,omitempty"` 4450 // Limit - READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription. 4451 Limit *int32 `json:"limit,omitempty"` 4452 // Name - READ-ONLY; Gets the name of the type of usage. 4453 Name *UsageName `json:"name,omitempty"` 4454} 4455 4456// MarshalJSON is the custom marshaler for Usage. 4457func (u Usage) MarshalJSON() ([]byte, error) { 4458 objectMap := make(map[string]interface{}) 4459 return json.Marshal(objectMap) 4460} 4461 4462// UsageListResult the response from the List Usages operation. 4463type UsageListResult struct { 4464 autorest.Response `json:"-"` 4465 // Value - Gets or sets the list of Storage Resource Usages. 4466 Value *[]Usage `json:"value,omitempty"` 4467} 4468 4469// UsageName the usage names that can be used; currently limited to StorageAccount. 4470type UsageName struct { 4471 // Value - READ-ONLY; Gets a string describing the resource name. 4472 Value *string `json:"value,omitempty"` 4473 // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. 4474 LocalizedValue *string `json:"localizedValue,omitempty"` 4475} 4476 4477// MarshalJSON is the custom marshaler for UsageName. 4478func (un UsageName) MarshalJSON() ([]byte, error) { 4479 objectMap := make(map[string]interface{}) 4480 return json.Marshal(objectMap) 4481} 4482 4483// VirtualNetworkRule virtual Network rule. 4484type VirtualNetworkRule struct { 4485 // VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. 4486 VirtualNetworkResourceID *string `json:"id,omitempty"` 4487 // Action - The action of virtual network rule. Possible values include: 'Allow' 4488 Action Action `json:"action,omitempty"` 4489 // State - Gets the state of virtual network rule. Possible values include: 'StateProvisioning', 'StateDeprovisioning', 'StateSucceeded', 'StateFailed', 'StateNetworkSourceDeleted' 4490 State State `json:"state,omitempty"` 4491} 4492