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	"net/http"
16)
17
18// The package's fully qualified name.
19const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2018-03-01-preview/storage"
20
21// Account the storage account.
22type Account struct {
23	autorest.Response `json:"-"`
24	// Sku - READ-ONLY; Gets the SKU.
25	Sku *Sku `json:"sku,omitempty"`
26	// Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
27	Kind Kind `json:"kind,omitempty"`
28	// Identity - The identity of the resource.
29	Identity *Identity `json:"identity,omitempty"`
30	// AccountProperties - Properties of the storage account.
31	*AccountProperties `json:"properties,omitempty"`
32	// Tags - Resource tags.
33	Tags map[string]*string `json:"tags"`
34	// Location - The geo-location where the resource lives
35	Location *string `json:"location,omitempty"`
36	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
37	ID *string `json:"id,omitempty"`
38	// Name - READ-ONLY; The name of the resource
39	Name *string `json:"name,omitempty"`
40	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
41	Type *string `json:"type,omitempty"`
42}
43
44// MarshalJSON is the custom marshaler for Account.
45func (a Account) MarshalJSON() ([]byte, error) {
46	objectMap := make(map[string]interface{})
47	if a.Identity != nil {
48		objectMap["identity"] = a.Identity
49	}
50	if a.AccountProperties != nil {
51		objectMap["properties"] = a.AccountProperties
52	}
53	if a.Tags != nil {
54		objectMap["tags"] = a.Tags
55	}
56	if a.Location != nil {
57		objectMap["location"] = a.Location
58	}
59	return json.Marshal(objectMap)
60}
61
62// UnmarshalJSON is the custom unmarshaler for Account struct.
63func (a *Account) UnmarshalJSON(body []byte) error {
64	var m map[string]*json.RawMessage
65	err := json.Unmarshal(body, &m)
66	if err != nil {
67		return err
68	}
69	for k, v := range m {
70		switch k {
71		case "sku":
72			if v != nil {
73				var sku Sku
74				err = json.Unmarshal(*v, &sku)
75				if err != nil {
76					return err
77				}
78				a.Sku = &sku
79			}
80		case "kind":
81			if v != nil {
82				var kind Kind
83				err = json.Unmarshal(*v, &kind)
84				if err != nil {
85					return err
86				}
87				a.Kind = kind
88			}
89		case "identity":
90			if v != nil {
91				var identity Identity
92				err = json.Unmarshal(*v, &identity)
93				if err != nil {
94					return err
95				}
96				a.Identity = &identity
97			}
98		case "properties":
99			if v != nil {
100				var accountProperties AccountProperties
101				err = json.Unmarshal(*v, &accountProperties)
102				if err != nil {
103					return err
104				}
105				a.AccountProperties = &accountProperties
106			}
107		case "tags":
108			if v != nil {
109				var tags map[string]*string
110				err = json.Unmarshal(*v, &tags)
111				if err != nil {
112					return err
113				}
114				a.Tags = tags
115			}
116		case "location":
117			if v != nil {
118				var location string
119				err = json.Unmarshal(*v, &location)
120				if err != nil {
121					return err
122				}
123				a.Location = &location
124			}
125		case "id":
126			if v != nil {
127				var ID string
128				err = json.Unmarshal(*v, &ID)
129				if err != nil {
130					return err
131				}
132				a.ID = &ID
133			}
134		case "name":
135			if v != nil {
136				var name string
137				err = json.Unmarshal(*v, &name)
138				if err != nil {
139					return err
140				}
141				a.Name = &name
142			}
143		case "type":
144			if v != nil {
145				var typeVar string
146				err = json.Unmarshal(*v, &typeVar)
147				if err != nil {
148					return err
149				}
150				a.Type = &typeVar
151			}
152		}
153	}
154
155	return nil
156}
157
158// AccountCheckNameAvailabilityParameters the parameters used to check the availability of the storage
159// account name.
160type AccountCheckNameAvailabilityParameters struct {
161	// Name - The storage account name.
162	Name *string `json:"name,omitempty"`
163	// Type - The type of resource, Microsoft.Storage/storageAccounts
164	Type *string `json:"type,omitempty"`
165}
166
167// AccountCreateParameters the parameters used when creating a storage account.
168type AccountCreateParameters struct {
169	// Sku - Required. Gets or sets the sku name.
170	Sku *Sku `json:"sku,omitempty"`
171	// Kind - Required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
172	Kind Kind `json:"kind,omitempty"`
173	// 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.
174	Location *string `json:"location,omitempty"`
175	// 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.
176	Tags map[string]*string `json:"tags"`
177	// Identity - The identity of the resource.
178	Identity *Identity `json:"identity,omitempty"`
179	// AccountPropertiesCreateParameters - The parameters used to create the storage account.
180	*AccountPropertiesCreateParameters `json:"properties,omitempty"`
181}
182
183// MarshalJSON is the custom marshaler for AccountCreateParameters.
184func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
185	objectMap := make(map[string]interface{})
186	if acp.Sku != nil {
187		objectMap["sku"] = acp.Sku
188	}
189	if acp.Kind != "" {
190		objectMap["kind"] = acp.Kind
191	}
192	if acp.Location != nil {
193		objectMap["location"] = acp.Location
194	}
195	if acp.Tags != nil {
196		objectMap["tags"] = acp.Tags
197	}
198	if acp.Identity != nil {
199		objectMap["identity"] = acp.Identity
200	}
201	if acp.AccountPropertiesCreateParameters != nil {
202		objectMap["properties"] = acp.AccountPropertiesCreateParameters
203	}
204	return json.Marshal(objectMap)
205}
206
207// UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct.
208func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
209	var m map[string]*json.RawMessage
210	err := json.Unmarshal(body, &m)
211	if err != nil {
212		return err
213	}
214	for k, v := range m {
215		switch k {
216		case "sku":
217			if v != nil {
218				var sku Sku
219				err = json.Unmarshal(*v, &sku)
220				if err != nil {
221					return err
222				}
223				acp.Sku = &sku
224			}
225		case "kind":
226			if v != nil {
227				var kind Kind
228				err = json.Unmarshal(*v, &kind)
229				if err != nil {
230					return err
231				}
232				acp.Kind = kind
233			}
234		case "location":
235			if v != nil {
236				var location string
237				err = json.Unmarshal(*v, &location)
238				if err != nil {
239					return err
240				}
241				acp.Location = &location
242			}
243		case "tags":
244			if v != nil {
245				var tags map[string]*string
246				err = json.Unmarshal(*v, &tags)
247				if err != nil {
248					return err
249				}
250				acp.Tags = tags
251			}
252		case "identity":
253			if v != nil {
254				var identity Identity
255				err = json.Unmarshal(*v, &identity)
256				if err != nil {
257					return err
258				}
259				acp.Identity = &identity
260			}
261		case "properties":
262			if v != nil {
263				var accountPropertiesCreateParameters AccountPropertiesCreateParameters
264				err = json.Unmarshal(*v, &accountPropertiesCreateParameters)
265				if err != nil {
266					return err
267				}
268				acp.AccountPropertiesCreateParameters = &accountPropertiesCreateParameters
269			}
270		}
271	}
272
273	return nil
274}
275
276// AccountKey an access key for the storage account.
277type AccountKey struct {
278	// KeyName - READ-ONLY; Name of the key.
279	KeyName *string `json:"keyName,omitempty"`
280	// Value - READ-ONLY; Base 64-encoded value of the key.
281	Value *string `json:"value,omitempty"`
282	// Permissions - READ-ONLY; Permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full'
283	Permissions KeyPermission `json:"permissions,omitempty"`
284}
285
286// MarshalJSON is the custom marshaler for AccountKey.
287func (ak AccountKey) MarshalJSON() ([]byte, error) {
288	objectMap := make(map[string]interface{})
289	return json.Marshal(objectMap)
290}
291
292// AccountListKeysResult the response from the ListKeys operation.
293type AccountListKeysResult struct {
294	autorest.Response `json:"-"`
295	// Keys - READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account.
296	Keys *[]AccountKey `json:"keys,omitempty"`
297}
298
299// MarshalJSON is the custom marshaler for AccountListKeysResult.
300func (alkr AccountListKeysResult) MarshalJSON() ([]byte, error) {
301	objectMap := make(map[string]interface{})
302	return json.Marshal(objectMap)
303}
304
305// AccountListResult the response from the List Storage Accounts operation.
306type AccountListResult struct {
307	autorest.Response `json:"-"`
308	// Value - READ-ONLY; Gets the list of storage accounts and their properties.
309	Value *[]Account `json:"value,omitempty"`
310}
311
312// MarshalJSON is the custom marshaler for AccountListResult.
313func (alr AccountListResult) MarshalJSON() ([]byte, error) {
314	objectMap := make(map[string]interface{})
315	return json.Marshal(objectMap)
316}
317
318// AccountManagementPolicies the Get Storage Account ManagementPolicies operation response.
319type AccountManagementPolicies struct {
320	autorest.Response `json:"-"`
321	// AccountManagementPoliciesRulesProperty - READ-ONLY; Returns the Storage Account Data Policies Rules.
322	*AccountManagementPoliciesRulesProperty `json:"properties,omitempty"`
323	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
324	ID *string `json:"id,omitempty"`
325	// Name - READ-ONLY; The name of the resource
326	Name *string `json:"name,omitempty"`
327	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
328	Type *string `json:"type,omitempty"`
329}
330
331// MarshalJSON is the custom marshaler for AccountManagementPolicies.
332func (amp AccountManagementPolicies) MarshalJSON() ([]byte, error) {
333	objectMap := make(map[string]interface{})
334	return json.Marshal(objectMap)
335}
336
337// UnmarshalJSON is the custom unmarshaler for AccountManagementPolicies struct.
338func (amp *AccountManagementPolicies) UnmarshalJSON(body []byte) error {
339	var m map[string]*json.RawMessage
340	err := json.Unmarshal(body, &m)
341	if err != nil {
342		return err
343	}
344	for k, v := range m {
345		switch k {
346		case "properties":
347			if v != nil {
348				var accountManagementPoliciesRulesProperty AccountManagementPoliciesRulesProperty
349				err = json.Unmarshal(*v, &accountManagementPoliciesRulesProperty)
350				if err != nil {
351					return err
352				}
353				amp.AccountManagementPoliciesRulesProperty = &accountManagementPoliciesRulesProperty
354			}
355		case "id":
356			if v != nil {
357				var ID string
358				err = json.Unmarshal(*v, &ID)
359				if err != nil {
360					return err
361				}
362				amp.ID = &ID
363			}
364		case "name":
365			if v != nil {
366				var name string
367				err = json.Unmarshal(*v, &name)
368				if err != nil {
369					return err
370				}
371				amp.Name = &name
372			}
373		case "type":
374			if v != nil {
375				var typeVar string
376				err = json.Unmarshal(*v, &typeVar)
377				if err != nil {
378					return err
379				}
380				amp.Type = &typeVar
381			}
382		}
383	}
384
385	return nil
386}
387
388// AccountManagementPoliciesRulesProperty the Storage Account Data Policies properties.
389type AccountManagementPoliciesRulesProperty struct {
390	// LastModifiedTime - READ-ONLY; Returns the date and time the ManagementPolicies was last modified.
391	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
392	// Policy - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
393	Policy interface{} `json:"policy,omitempty"`
394}
395
396// MarshalJSON is the custom marshaler for AccountManagementPoliciesRulesProperty.
397func (amprp AccountManagementPoliciesRulesProperty) MarshalJSON() ([]byte, error) {
398	objectMap := make(map[string]interface{})
399	if amprp.Policy != nil {
400		objectMap["policy"] = amprp.Policy
401	}
402	return json.Marshal(objectMap)
403}
404
405// AccountProperties properties of the storage account.
406type AccountProperties struct {
407	// ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'
408	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
409	// 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.
410	PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"`
411	// PrimaryLocation - READ-ONLY; Gets the location of the primary data center for the storage account.
412	PrimaryLocation *string `json:"primaryLocation,omitempty"`
413	// StatusOfPrimary - READ-ONLY; Gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'Available', 'Unavailable'
414	StatusOfPrimary AccountStatus `json:"statusOfPrimary,omitempty"`
415	// 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.
416	LastGeoFailoverTime *date.Time `json:"lastGeoFailoverTime,omitempty"`
417	// 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.
418	SecondaryLocation *string `json:"secondaryLocation,omitempty"`
419	// 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'
420	StatusOfSecondary AccountStatus `json:"statusOfSecondary,omitempty"`
421	// CreationTime - READ-ONLY; Gets the creation date and time of the storage account in UTC.
422	CreationTime *date.Time `json:"creationTime,omitempty"`
423	// CustomDomain - READ-ONLY; Gets the custom domain the user assigned to this storage account.
424	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
425	// 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.
426	SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"`
427	// Encryption - READ-ONLY; Gets the encryption settings on the account. If unspecified, the account is unencrypted.
428	Encryption *Encryption `json:"encryption,omitempty"`
429	// AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
430	AccessTier AccessTier `json:"accessTier,omitempty"`
431	// EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
432	EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
433	// NetworkRuleSet - READ-ONLY; Network rule set
434	NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
435	// IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true.
436	IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"`
437}
438
439// MarshalJSON is the custom marshaler for AccountProperties.
440func (ap AccountProperties) MarshalJSON() ([]byte, error) {
441	objectMap := make(map[string]interface{})
442	if ap.EnableHTTPSTrafficOnly != nil {
443		objectMap["supportsHttpsTrafficOnly"] = ap.EnableHTTPSTrafficOnly
444	}
445	if ap.IsHnsEnabled != nil {
446		objectMap["isHnsEnabled"] = ap.IsHnsEnabled
447	}
448	return json.Marshal(objectMap)
449}
450
451// AccountPropertiesCreateParameters the parameters used to create the storage account.
452type AccountPropertiesCreateParameters struct {
453	// 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.
454	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
455	// Encryption - Provides the encryption settings on the account. If left unspecified the account encryption settings will remain the same. The default setting is unencrypted.
456	Encryption *Encryption `json:"encryption,omitempty"`
457	// NetworkRuleSet - Network rule set
458	NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
459	// AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
460	AccessTier AccessTier `json:"accessTier,omitempty"`
461	// EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
462	EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
463	// IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true.
464	IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"`
465}
466
467// AccountPropertiesUpdateParameters the parameters used when updating a storage account.
468type AccountPropertiesUpdateParameters struct {
469	// 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.
470	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
471	// Encryption - Provides the encryption settings on the account. The default setting is unencrypted.
472	Encryption *Encryption `json:"encryption,omitempty"`
473	// AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'
474	AccessTier AccessTier `json:"accessTier,omitempty"`
475	// EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true.
476	EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
477	// NetworkRuleSet - Network rule set
478	NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
479}
480
481// AccountRegenerateKeyParameters the parameters used to regenerate the storage account key.
482type AccountRegenerateKeyParameters struct {
483	// KeyName - The name of storage keys that want to be regenerated, possible values are key1, key2.
484	KeyName *string `json:"keyName,omitempty"`
485}
486
487// AccountSasParameters the parameters to list SAS credentials of a storage account.
488type AccountSasParameters struct {
489	// 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'
490	Services Services `json:"signedServices,omitempty"`
491	// 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'
492	ResourceTypes SignedResourceTypes `json:"signedResourceTypes,omitempty"`
493	// 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'
494	Permissions Permissions `json:"signedPermission,omitempty"`
495	// IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests.
496	IPAddressOrRange *string `json:"signedIp,omitempty"`
497	// Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS'
498	Protocols HTTPProtocol `json:"signedProtocol,omitempty"`
499	// SharedAccessStartTime - The time at which the SAS becomes valid.
500	SharedAccessStartTime *date.Time `json:"signedStart,omitempty"`
501	// SharedAccessExpiryTime - The time at which the shared access signature becomes invalid.
502	SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"`
503	// KeyToSign - The key to sign the account SAS token with.
504	KeyToSign *string `json:"keyToSign,omitempty"`
505}
506
507// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
508// operation.
509type AccountsCreateFuture struct {
510	azure.FutureAPI
511	// Result returns the result of the asynchronous operation.
512	// If the operation has not completed it will return an error.
513	Result func(AccountsClient) (Account, error)
514}
515
516// UnmarshalJSON is the custom unmarshaller for CreateFuture.
517func (future *AccountsCreateFuture) UnmarshalJSON(body []byte) error {
518	var azFuture azure.Future
519	if err := json.Unmarshal(body, &azFuture); err != nil {
520		return err
521	}
522	future.FutureAPI = &azFuture
523	future.Result = future.result
524	return nil
525}
526
527// result is the default implementation for AccountsCreateFuture.Result.
528func (future *AccountsCreateFuture) result(client AccountsClient) (a Account, err error) {
529	var done bool
530	done, err = future.DoneWithContext(context.Background(), client)
531	if err != nil {
532		err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure")
533		return
534	}
535	if !done {
536		a.Response.Response = future.Response()
537		err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
538		return
539	}
540	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
541	if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
542		a, err = client.CreateResponder(a.Response.Response)
543		if err != nil {
544			err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
545		}
546	}
547	return
548}
549
550// AccountUpdateParameters the parameters that can be provided when updating the storage account
551// properties.
552type AccountUpdateParameters struct {
553	// Sku - Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku names be updated to any other value.
554	Sku *Sku `json:"sku,omitempty"`
555	// 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.
556	Tags map[string]*string `json:"tags"`
557	// Identity - The identity of the resource.
558	Identity *Identity `json:"identity,omitempty"`
559	// AccountPropertiesUpdateParameters - The parameters used when updating a storage account.
560	*AccountPropertiesUpdateParameters `json:"properties,omitempty"`
561	// Kind - Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
562	Kind Kind `json:"kind,omitempty"`
563}
564
565// MarshalJSON is the custom marshaler for AccountUpdateParameters.
566func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
567	objectMap := make(map[string]interface{})
568	if aup.Sku != nil {
569		objectMap["sku"] = aup.Sku
570	}
571	if aup.Tags != nil {
572		objectMap["tags"] = aup.Tags
573	}
574	if aup.Identity != nil {
575		objectMap["identity"] = aup.Identity
576	}
577	if aup.AccountPropertiesUpdateParameters != nil {
578		objectMap["properties"] = aup.AccountPropertiesUpdateParameters
579	}
580	if aup.Kind != "" {
581		objectMap["kind"] = aup.Kind
582	}
583	return json.Marshal(objectMap)
584}
585
586// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct.
587func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error {
588	var m map[string]*json.RawMessage
589	err := json.Unmarshal(body, &m)
590	if err != nil {
591		return err
592	}
593	for k, v := range m {
594		switch k {
595		case "sku":
596			if v != nil {
597				var sku Sku
598				err = json.Unmarshal(*v, &sku)
599				if err != nil {
600					return err
601				}
602				aup.Sku = &sku
603			}
604		case "tags":
605			if v != nil {
606				var tags map[string]*string
607				err = json.Unmarshal(*v, &tags)
608				if err != nil {
609					return err
610				}
611				aup.Tags = tags
612			}
613		case "identity":
614			if v != nil {
615				var identity Identity
616				err = json.Unmarshal(*v, &identity)
617				if err != nil {
618					return err
619				}
620				aup.Identity = &identity
621			}
622		case "properties":
623			if v != nil {
624				var accountPropertiesUpdateParameters AccountPropertiesUpdateParameters
625				err = json.Unmarshal(*v, &accountPropertiesUpdateParameters)
626				if err != nil {
627					return err
628				}
629				aup.AccountPropertiesUpdateParameters = &accountPropertiesUpdateParameters
630			}
631		case "kind":
632			if v != nil {
633				var kind Kind
634				err = json.Unmarshal(*v, &kind)
635				if err != nil {
636					return err
637				}
638				aup.Kind = kind
639			}
640		}
641	}
642
643	return nil
644}
645
646// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
647type AzureEntityResource struct {
648	// Etag - READ-ONLY; Resource Etag.
649	Etag *string `json:"etag,omitempty"`
650	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
651	ID *string `json:"id,omitempty"`
652	// Name - READ-ONLY; The name of the resource
653	Name *string `json:"name,omitempty"`
654	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
655	Type *string `json:"type,omitempty"`
656}
657
658// MarshalJSON is the custom marshaler for AzureEntityResource.
659func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
660	objectMap := make(map[string]interface{})
661	return json.Marshal(objectMap)
662}
663
664// BlobContainer properties of the blob container, including Id, resource name, resource type, Etag.
665type BlobContainer struct {
666	autorest.Response `json:"-"`
667	// ContainerProperties - Properties of the blob container.
668	*ContainerProperties `json:"properties,omitempty"`
669	// Etag - READ-ONLY; Resource Etag.
670	Etag *string `json:"etag,omitempty"`
671	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
672	ID *string `json:"id,omitempty"`
673	// Name - READ-ONLY; The name of the resource
674	Name *string `json:"name,omitempty"`
675	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
676	Type *string `json:"type,omitempty"`
677}
678
679// MarshalJSON is the custom marshaler for BlobContainer.
680func (bc BlobContainer) MarshalJSON() ([]byte, error) {
681	objectMap := make(map[string]interface{})
682	if bc.ContainerProperties != nil {
683		objectMap["properties"] = bc.ContainerProperties
684	}
685	return json.Marshal(objectMap)
686}
687
688// UnmarshalJSON is the custom unmarshaler for BlobContainer struct.
689func (bc *BlobContainer) UnmarshalJSON(body []byte) error {
690	var m map[string]*json.RawMessage
691	err := json.Unmarshal(body, &m)
692	if err != nil {
693		return err
694	}
695	for k, v := range m {
696		switch k {
697		case "properties":
698			if v != nil {
699				var containerProperties ContainerProperties
700				err = json.Unmarshal(*v, &containerProperties)
701				if err != nil {
702					return err
703				}
704				bc.ContainerProperties = &containerProperties
705			}
706		case "etag":
707			if v != nil {
708				var etag string
709				err = json.Unmarshal(*v, &etag)
710				if err != nil {
711					return err
712				}
713				bc.Etag = &etag
714			}
715		case "id":
716			if v != nil {
717				var ID string
718				err = json.Unmarshal(*v, &ID)
719				if err != nil {
720					return err
721				}
722				bc.ID = &ID
723			}
724		case "name":
725			if v != nil {
726				var name string
727				err = json.Unmarshal(*v, &name)
728				if err != nil {
729					return err
730				}
731				bc.Name = &name
732			}
733		case "type":
734			if v != nil {
735				var typeVar string
736				err = json.Unmarshal(*v, &typeVar)
737				if err != nil {
738					return err
739				}
740				bc.Type = &typeVar
741			}
742		}
743	}
744
745	return nil
746}
747
748// CheckNameAvailabilityResult the CheckNameAvailability operation response.
749type CheckNameAvailabilityResult struct {
750	autorest.Response `json:"-"`
751	// 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.
752	NameAvailable *bool `json:"nameAvailable,omitempty"`
753	// 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'
754	Reason Reason `json:"reason,omitempty"`
755	// Message - READ-ONLY; Gets an error message explaining the Reason value in more detail.
756	Message *string `json:"message,omitempty"`
757}
758
759// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult.
760func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) {
761	objectMap := make(map[string]interface{})
762	return json.Marshal(objectMap)
763}
764
765// ContainerProperties the properties of a container.
766type ContainerProperties struct {
767	// PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone'
768	PublicAccess PublicAccess `json:"publicAccess,omitempty"`
769	// LastModifiedTime - READ-ONLY; Returns the date and time the container was last modified.
770	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
771	// LeaseStatus - READ-ONLY; The lease status of the container. Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked'
772	LeaseStatus LeaseStatus `json:"leaseStatus,omitempty"`
773	// LeaseState - READ-ONLY; Lease state of the container. Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken'
774	LeaseState LeaseState `json:"leaseState,omitempty"`
775	// 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'
776	LeaseDuration LeaseDuration `json:"leaseDuration,omitempty"`
777	// Metadata - A name-value pair to associate with the container as metadata.
778	Metadata map[string]*string `json:"metadata"`
779	// ImmutabilityPolicy - READ-ONLY; The ImmutabilityPolicy property of the container.
780	ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"`
781	// LegalHold - READ-ONLY; The LegalHold property of the container.
782	LegalHold *LegalHoldProperties `json:"legalHold,omitempty"`
783	// 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.
784	HasLegalHold *bool `json:"hasLegalHold,omitempty"`
785	// 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.
786	HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"`
787}
788
789// MarshalJSON is the custom marshaler for ContainerProperties.
790func (cp ContainerProperties) MarshalJSON() ([]byte, error) {
791	objectMap := make(map[string]interface{})
792	if cp.PublicAccess != "" {
793		objectMap["publicAccess"] = cp.PublicAccess
794	}
795	if cp.Metadata != nil {
796		objectMap["metadata"] = cp.Metadata
797	}
798	return json.Marshal(objectMap)
799}
800
801// CustomDomain the custom domain assigned to this storage account. This can be set via Update.
802type CustomDomain struct {
803	// Name - Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
804	Name *string `json:"name,omitempty"`
805	// UseSubDomainName - Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.
806	UseSubDomainName *bool `json:"useSubDomainName,omitempty"`
807}
808
809// Dimension dimension of blobs, possibly be blob type or access tier.
810type Dimension struct {
811	// Name - Display name of dimension.
812	Name *string `json:"name,omitempty"`
813	// DisplayName - Display name of dimension.
814	DisplayName *string `json:"displayName,omitempty"`
815}
816
817// Encryption the encryption settings on the storage account.
818type Encryption struct {
819	// Services - List of services which support encryption.
820	Services *EncryptionServices `json:"services,omitempty"`
821	// KeySource - The encryption keySource (provider). Possible values (case-insensitive):  Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyvault'
822	KeySource KeySource `json:"keySource,omitempty"`
823	// KeyVaultProperties - Properties provided by key vault.
824	KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"`
825}
826
827// EncryptionService a service that allows server-side encryption to be used.
828type EncryptionService struct {
829	// Enabled - A boolean indicating whether or not the service encrypts the data as it is stored.
830	Enabled *bool `json:"enabled,omitempty"`
831	// 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.
832	LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"`
833}
834
835// MarshalJSON is the custom marshaler for EncryptionService.
836func (es EncryptionService) MarshalJSON() ([]byte, error) {
837	objectMap := make(map[string]interface{})
838	if es.Enabled != nil {
839		objectMap["enabled"] = es.Enabled
840	}
841	return json.Marshal(objectMap)
842}
843
844// EncryptionServices a list of services that support encryption.
845type EncryptionServices struct {
846	// Blob - The encryption function of the blob storage service.
847	Blob *EncryptionService `json:"blob,omitempty"`
848	// File - The encryption function of the file storage service.
849	File *EncryptionService `json:"file,omitempty"`
850	// Table - READ-ONLY; The encryption function of the table storage service.
851	Table *EncryptionService `json:"table,omitempty"`
852	// Queue - READ-ONLY; The encryption function of the queue storage service.
853	Queue *EncryptionService `json:"queue,omitempty"`
854}
855
856// MarshalJSON is the custom marshaler for EncryptionServices.
857func (es EncryptionServices) MarshalJSON() ([]byte, error) {
858	objectMap := make(map[string]interface{})
859	if es.Blob != nil {
860		objectMap["blob"] = es.Blob
861	}
862	if es.File != nil {
863		objectMap["file"] = es.File
864	}
865	return json.Marshal(objectMap)
866}
867
868// Endpoints the URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs
869// object.
870type Endpoints struct {
871	// Blob - READ-ONLY; Gets the blob endpoint.
872	Blob *string `json:"blob,omitempty"`
873	// Queue - READ-ONLY; Gets the queue endpoint.
874	Queue *string `json:"queue,omitempty"`
875	// Table - READ-ONLY; Gets the table endpoint.
876	Table *string `json:"table,omitempty"`
877	// File - READ-ONLY; Gets the file endpoint.
878	File *string `json:"file,omitempty"`
879	// Web - READ-ONLY; Gets the web endpoint.
880	Web *string `json:"web,omitempty"`
881	// Dfs - READ-ONLY; Gets the dfs endpoint.
882	Dfs *string `json:"dfs,omitempty"`
883}
884
885// MarshalJSON is the custom marshaler for Endpoints.
886func (e Endpoints) MarshalJSON() ([]byte, error) {
887	objectMap := make(map[string]interface{})
888	return json.Marshal(objectMap)
889}
890
891// Identity identity for the resource.
892type Identity struct {
893	// PrincipalID - READ-ONLY; The principal ID of resource identity.
894	PrincipalID *string `json:"principalId,omitempty"`
895	// TenantID - READ-ONLY; The tenant ID of resource.
896	TenantID *string `json:"tenantId,omitempty"`
897	// Type - The identity type.
898	Type *string `json:"type,omitempty"`
899}
900
901// MarshalJSON is the custom marshaler for Identity.
902func (i Identity) MarshalJSON() ([]byte, error) {
903	objectMap := make(map[string]interface{})
904	if i.Type != nil {
905		objectMap["type"] = i.Type
906	}
907	return json.Marshal(objectMap)
908}
909
910// ImmutabilityPolicy the ImmutabilityPolicy property of a blob container, including Id, resource name,
911// resource type, Etag.
912type ImmutabilityPolicy struct {
913	autorest.Response `json:"-"`
914	// ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container.
915	*ImmutabilityPolicyProperty `json:"properties,omitempty"`
916	// Etag - READ-ONLY; Resource Etag.
917	Etag *string `json:"etag,omitempty"`
918	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
919	ID *string `json:"id,omitempty"`
920	// Name - READ-ONLY; The name of the resource
921	Name *string `json:"name,omitempty"`
922	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
923	Type *string `json:"type,omitempty"`
924}
925
926// MarshalJSON is the custom marshaler for ImmutabilityPolicy.
927func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) {
928	objectMap := make(map[string]interface{})
929	if IP.ImmutabilityPolicyProperty != nil {
930		objectMap["properties"] = IP.ImmutabilityPolicyProperty
931	}
932	return json.Marshal(objectMap)
933}
934
935// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicy struct.
936func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error {
937	var m map[string]*json.RawMessage
938	err := json.Unmarshal(body, &m)
939	if err != nil {
940		return err
941	}
942	for k, v := range m {
943		switch k {
944		case "properties":
945			if v != nil {
946				var immutabilityPolicyProperty ImmutabilityPolicyProperty
947				err = json.Unmarshal(*v, &immutabilityPolicyProperty)
948				if err != nil {
949					return err
950				}
951				IP.ImmutabilityPolicyProperty = &immutabilityPolicyProperty
952			}
953		case "etag":
954			if v != nil {
955				var etag string
956				err = json.Unmarshal(*v, &etag)
957				if err != nil {
958					return err
959				}
960				IP.Etag = &etag
961			}
962		case "id":
963			if v != nil {
964				var ID string
965				err = json.Unmarshal(*v, &ID)
966				if err != nil {
967					return err
968				}
969				IP.ID = &ID
970			}
971		case "name":
972			if v != nil {
973				var name string
974				err = json.Unmarshal(*v, &name)
975				if err != nil {
976					return err
977				}
978				IP.Name = &name
979			}
980		case "type":
981			if v != nil {
982				var typeVar string
983				err = json.Unmarshal(*v, &typeVar)
984				if err != nil {
985					return err
986				}
987				IP.Type = &typeVar
988			}
989		}
990	}
991
992	return nil
993}
994
995// ImmutabilityPolicyProperties the properties of an ImmutabilityPolicy of a blob container.
996type ImmutabilityPolicyProperties struct {
997	// ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container.
998	*ImmutabilityPolicyProperty `json:"properties,omitempty"`
999	// Etag - READ-ONLY; ImmutabilityPolicy Etag.
1000	Etag *string `json:"etag,omitempty"`
1001	// UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container.
1002	UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"`
1003}
1004
1005// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperties.
1006func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) {
1007	objectMap := make(map[string]interface{})
1008	if ipp.ImmutabilityPolicyProperty != nil {
1009		objectMap["properties"] = ipp.ImmutabilityPolicyProperty
1010	}
1011	return json.Marshal(objectMap)
1012}
1013
1014// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicyProperties struct.
1015func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error {
1016	var m map[string]*json.RawMessage
1017	err := json.Unmarshal(body, &m)
1018	if err != nil {
1019		return err
1020	}
1021	for k, v := range m {
1022		switch k {
1023		case "properties":
1024			if v != nil {
1025				var immutabilityPolicyProperty ImmutabilityPolicyProperty
1026				err = json.Unmarshal(*v, &immutabilityPolicyProperty)
1027				if err != nil {
1028					return err
1029				}
1030				ipp.ImmutabilityPolicyProperty = &immutabilityPolicyProperty
1031			}
1032		case "etag":
1033			if v != nil {
1034				var etag string
1035				err = json.Unmarshal(*v, &etag)
1036				if err != nil {
1037					return err
1038				}
1039				ipp.Etag = &etag
1040			}
1041		case "updateHistory":
1042			if v != nil {
1043				var updateHistory []UpdateHistoryProperty
1044				err = json.Unmarshal(*v, &updateHistory)
1045				if err != nil {
1046					return err
1047				}
1048				ipp.UpdateHistory = &updateHistory
1049			}
1050		}
1051	}
1052
1053	return nil
1054}
1055
1056// ImmutabilityPolicyProperty the properties of an ImmutabilityPolicy of a blob container.
1057type ImmutabilityPolicyProperty struct {
1058	// ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days.
1059	ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
1060	// State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'
1061	State ImmutabilityPolicyState `json:"state,omitempty"`
1062}
1063
1064// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperty.
1065func (ipp ImmutabilityPolicyProperty) MarshalJSON() ([]byte, error) {
1066	objectMap := make(map[string]interface{})
1067	if ipp.ImmutabilityPeriodSinceCreationInDays != nil {
1068		objectMap["immutabilityPeriodSinceCreationInDays"] = ipp.ImmutabilityPeriodSinceCreationInDays
1069	}
1070	return json.Marshal(objectMap)
1071}
1072
1073// IPRule IP rule with specific IP or IP range in CIDR format.
1074type IPRule struct {
1075	// IPAddressOrRange - Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
1076	IPAddressOrRange *string `json:"value,omitempty"`
1077	// Action - The action of IP ACL rule. Possible values include: 'Allow'
1078	Action Action `json:"action,omitempty"`
1079}
1080
1081// KeyVaultProperties properties of key vault.
1082type KeyVaultProperties struct {
1083	// KeyName - The name of KeyVault key.
1084	KeyName *string `json:"keyname,omitempty"`
1085	// KeyVersion - The version of KeyVault key.
1086	KeyVersion *string `json:"keyversion,omitempty"`
1087	// KeyVaultURI - The Uri of KeyVault.
1088	KeyVaultURI *string `json:"keyvaulturi,omitempty"`
1089}
1090
1091// LeaseContainerRequest lease Container request schema.
1092type LeaseContainerRequest struct {
1093	// Action - Specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break'
1094	Action Action1 `json:"action,omitempty"`
1095	// LeaseID - Identifies the lease. Can be specified in any valid GUID string format.
1096	LeaseID *string `json:"leaseId,omitempty"`
1097	// BreakPeriod - Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.
1098	BreakPeriod *int32 `json:"breakPeriod,omitempty"`
1099	// LeaseDuration - Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.
1100	LeaseDuration *int32 `json:"leaseDuration,omitempty"`
1101	// ProposedLeaseID - Optional for acquire, required for change. Proposed lease ID, in a GUID string format.
1102	ProposedLeaseID *string `json:"proposedLeaseId,omitempty"`
1103}
1104
1105// LeaseContainerResponse lease Container response schema.
1106type LeaseContainerResponse struct {
1107	autorest.Response `json:"-"`
1108	// LeaseID - Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease.
1109	LeaseID *string `json:"leaseId,omitempty"`
1110	// LeaseTimeSeconds - Approximate time remaining in the lease period, in seconds.
1111	LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"`
1112}
1113
1114// LegalHold the LegalHold property of a blob container.
1115type LegalHold struct {
1116	autorest.Response `json:"-"`
1117	// 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.
1118	HasLegalHold *bool `json:"hasLegalHold,omitempty"`
1119	// Tags - Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.
1120	Tags *[]string `json:"tags,omitempty"`
1121}
1122
1123// MarshalJSON is the custom marshaler for LegalHold.
1124func (lh LegalHold) MarshalJSON() ([]byte, error) {
1125	objectMap := make(map[string]interface{})
1126	if lh.Tags != nil {
1127		objectMap["tags"] = lh.Tags
1128	}
1129	return json.Marshal(objectMap)
1130}
1131
1132// LegalHoldProperties the LegalHold property of a blob container.
1133type LegalHoldProperties struct {
1134	// 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.
1135	HasLegalHold *bool `json:"hasLegalHold,omitempty"`
1136	// Tags - The list of LegalHold tags of a blob container.
1137	Tags *[]TagProperty `json:"tags,omitempty"`
1138}
1139
1140// MarshalJSON is the custom marshaler for LegalHoldProperties.
1141func (lhp LegalHoldProperties) MarshalJSON() ([]byte, error) {
1142	objectMap := make(map[string]interface{})
1143	if lhp.Tags != nil {
1144		objectMap["tags"] = lhp.Tags
1145	}
1146	return json.Marshal(objectMap)
1147}
1148
1149// ListAccountSasResponse the List SAS credentials operation response.
1150type ListAccountSasResponse struct {
1151	autorest.Response `json:"-"`
1152	// AccountSasToken - READ-ONLY; List SAS credentials of storage account.
1153	AccountSasToken *string `json:"accountSasToken,omitempty"`
1154}
1155
1156// MarshalJSON is the custom marshaler for ListAccountSasResponse.
1157func (lasr ListAccountSasResponse) MarshalJSON() ([]byte, error) {
1158	objectMap := make(map[string]interface{})
1159	return json.Marshal(objectMap)
1160}
1161
1162// ListContainerItem the blob container properties be listed out.
1163type ListContainerItem struct {
1164	// ContainerProperties - The blob container properties be listed out.
1165	*ContainerProperties `json:"properties,omitempty"`
1166	// Etag - READ-ONLY; Resource Etag.
1167	Etag *string `json:"etag,omitempty"`
1168	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1169	ID *string `json:"id,omitempty"`
1170	// Name - READ-ONLY; The name of the resource
1171	Name *string `json:"name,omitempty"`
1172	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1173	Type *string `json:"type,omitempty"`
1174}
1175
1176// MarshalJSON is the custom marshaler for ListContainerItem.
1177func (lci ListContainerItem) MarshalJSON() ([]byte, error) {
1178	objectMap := make(map[string]interface{})
1179	if lci.ContainerProperties != nil {
1180		objectMap["properties"] = lci.ContainerProperties
1181	}
1182	return json.Marshal(objectMap)
1183}
1184
1185// UnmarshalJSON is the custom unmarshaler for ListContainerItem struct.
1186func (lci *ListContainerItem) UnmarshalJSON(body []byte) error {
1187	var m map[string]*json.RawMessage
1188	err := json.Unmarshal(body, &m)
1189	if err != nil {
1190		return err
1191	}
1192	for k, v := range m {
1193		switch k {
1194		case "properties":
1195			if v != nil {
1196				var containerProperties ContainerProperties
1197				err = json.Unmarshal(*v, &containerProperties)
1198				if err != nil {
1199					return err
1200				}
1201				lci.ContainerProperties = &containerProperties
1202			}
1203		case "etag":
1204			if v != nil {
1205				var etag string
1206				err = json.Unmarshal(*v, &etag)
1207				if err != nil {
1208					return err
1209				}
1210				lci.Etag = &etag
1211			}
1212		case "id":
1213			if v != nil {
1214				var ID string
1215				err = json.Unmarshal(*v, &ID)
1216				if err != nil {
1217					return err
1218				}
1219				lci.ID = &ID
1220			}
1221		case "name":
1222			if v != nil {
1223				var name string
1224				err = json.Unmarshal(*v, &name)
1225				if err != nil {
1226					return err
1227				}
1228				lci.Name = &name
1229			}
1230		case "type":
1231			if v != nil {
1232				var typeVar string
1233				err = json.Unmarshal(*v, &typeVar)
1234				if err != nil {
1235					return err
1236				}
1237				lci.Type = &typeVar
1238			}
1239		}
1240	}
1241
1242	return nil
1243}
1244
1245// ListContainerItems the list of blob containers.
1246type ListContainerItems struct {
1247	autorest.Response `json:"-"`
1248	// Value - The list of blob containers.
1249	Value *[]ListContainerItem `json:"value,omitempty"`
1250}
1251
1252// ListServiceSasResponse the List service SAS credentials operation response.
1253type ListServiceSasResponse struct {
1254	autorest.Response `json:"-"`
1255	// ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource.
1256	ServiceSasToken *string `json:"serviceSasToken,omitempty"`
1257}
1258
1259// MarshalJSON is the custom marshaler for ListServiceSasResponse.
1260func (lssr ListServiceSasResponse) MarshalJSON() ([]byte, error) {
1261	objectMap := make(map[string]interface{})
1262	return json.Marshal(objectMap)
1263}
1264
1265// ManagementPoliciesRules the Storage Account ManagementPolicies Rules, in JSON format. See more details
1266// in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
1267type ManagementPoliciesRules struct {
1268	// Policy - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
1269	Policy interface{} `json:"policy,omitempty"`
1270}
1271
1272// ManagementPoliciesRulesSetParameter the Storage Account ManagementPolicies Rules, in JSON format. See
1273// more details in:
1274// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
1275type ManagementPoliciesRulesSetParameter struct {
1276	// ManagementPoliciesRules - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
1277	*ManagementPoliciesRules `json:"properties,omitempty"`
1278}
1279
1280// MarshalJSON is the custom marshaler for ManagementPoliciesRulesSetParameter.
1281func (mprsp ManagementPoliciesRulesSetParameter) MarshalJSON() ([]byte, error) {
1282	objectMap := make(map[string]interface{})
1283	if mprsp.ManagementPoliciesRules != nil {
1284		objectMap["properties"] = mprsp.ManagementPoliciesRules
1285	}
1286	return json.Marshal(objectMap)
1287}
1288
1289// UnmarshalJSON is the custom unmarshaler for ManagementPoliciesRulesSetParameter struct.
1290func (mprsp *ManagementPoliciesRulesSetParameter) UnmarshalJSON(body []byte) error {
1291	var m map[string]*json.RawMessage
1292	err := json.Unmarshal(body, &m)
1293	if err != nil {
1294		return err
1295	}
1296	for k, v := range m {
1297		switch k {
1298		case "properties":
1299			if v != nil {
1300				var managementPoliciesRules ManagementPoliciesRules
1301				err = json.Unmarshal(*v, &managementPoliciesRules)
1302				if err != nil {
1303					return err
1304				}
1305				mprsp.ManagementPoliciesRules = &managementPoliciesRules
1306			}
1307		}
1308	}
1309
1310	return nil
1311}
1312
1313// MetricSpecification metric specification of operation.
1314type MetricSpecification struct {
1315	// Name - Name of metric specification.
1316	Name *string `json:"name,omitempty"`
1317	// DisplayName - Display name of metric specification.
1318	DisplayName *string `json:"displayName,omitempty"`
1319	// DisplayDescription - Display description of metric specification.
1320	DisplayDescription *string `json:"displayDescription,omitempty"`
1321	// Unit - Unit could be Bytes or Count.
1322	Unit *string `json:"unit,omitempty"`
1323	// Dimensions - Dimensions of blobs, including blob type and access tier.
1324	Dimensions *[]Dimension `json:"dimensions,omitempty"`
1325	// AggregationType - Aggregation type could be Average.
1326	AggregationType *string `json:"aggregationType,omitempty"`
1327	// FillGapWithZero - The property to decide fill gap with zero or not.
1328	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
1329	// Category - The category this metric specification belong to, could be Capacity.
1330	Category *string `json:"category,omitempty"`
1331	// ResourceIDDimensionNameOverride - Account Resource Id.
1332	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
1333}
1334
1335// NetworkRuleSet network rule set
1336type NetworkRuleSet struct {
1337	// 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'
1338	Bypass Bypass `json:"bypass,omitempty"`
1339	// VirtualNetworkRules - Sets the virtual network rules
1340	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
1341	// IPRules - Sets the IP ACL rules
1342	IPRules *[]IPRule `json:"ipRules,omitempty"`
1343	// DefaultAction - Specifies the default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny'
1344	DefaultAction DefaultAction `json:"defaultAction,omitempty"`
1345}
1346
1347// Operation storage REST API operation definition.
1348type Operation struct {
1349	// Name - Operation name: {provider}/{resource}/{operation}
1350	Name *string `json:"name,omitempty"`
1351	// Display - Display metadata associated with the operation.
1352	Display *OperationDisplay `json:"display,omitempty"`
1353	// Origin - The origin of operations.
1354	Origin *string `json:"origin,omitempty"`
1355	// OperationProperties - Properties of operation, include metric specifications.
1356	*OperationProperties `json:"properties,omitempty"`
1357}
1358
1359// MarshalJSON is the custom marshaler for Operation.
1360func (o Operation) MarshalJSON() ([]byte, error) {
1361	objectMap := make(map[string]interface{})
1362	if o.Name != nil {
1363		objectMap["name"] = o.Name
1364	}
1365	if o.Display != nil {
1366		objectMap["display"] = o.Display
1367	}
1368	if o.Origin != nil {
1369		objectMap["origin"] = o.Origin
1370	}
1371	if o.OperationProperties != nil {
1372		objectMap["properties"] = o.OperationProperties
1373	}
1374	return json.Marshal(objectMap)
1375}
1376
1377// UnmarshalJSON is the custom unmarshaler for Operation struct.
1378func (o *Operation) UnmarshalJSON(body []byte) error {
1379	var m map[string]*json.RawMessage
1380	err := json.Unmarshal(body, &m)
1381	if err != nil {
1382		return err
1383	}
1384	for k, v := range m {
1385		switch k {
1386		case "name":
1387			if v != nil {
1388				var name string
1389				err = json.Unmarshal(*v, &name)
1390				if err != nil {
1391					return err
1392				}
1393				o.Name = &name
1394			}
1395		case "display":
1396			if v != nil {
1397				var display OperationDisplay
1398				err = json.Unmarshal(*v, &display)
1399				if err != nil {
1400					return err
1401				}
1402				o.Display = &display
1403			}
1404		case "origin":
1405			if v != nil {
1406				var origin string
1407				err = json.Unmarshal(*v, &origin)
1408				if err != nil {
1409					return err
1410				}
1411				o.Origin = &origin
1412			}
1413		case "properties":
1414			if v != nil {
1415				var operationProperties OperationProperties
1416				err = json.Unmarshal(*v, &operationProperties)
1417				if err != nil {
1418					return err
1419				}
1420				o.OperationProperties = &operationProperties
1421			}
1422		}
1423	}
1424
1425	return nil
1426}
1427
1428// OperationDisplay display metadata associated with the operation.
1429type OperationDisplay struct {
1430	// Provider - Service provider: Microsoft Storage.
1431	Provider *string `json:"provider,omitempty"`
1432	// Resource - Resource on which the operation is performed etc.
1433	Resource *string `json:"resource,omitempty"`
1434	// Operation - Type of operation: get, read, delete, etc.
1435	Operation *string `json:"operation,omitempty"`
1436	// Description - Description of the operation.
1437	Description *string `json:"description,omitempty"`
1438}
1439
1440// OperationListResult result of the request to list Storage operations. It contains a list of operations
1441// and a URL link to get the next set of results.
1442type OperationListResult struct {
1443	autorest.Response `json:"-"`
1444	// Value - List of Storage operations supported by the Storage resource provider.
1445	Value *[]Operation `json:"value,omitempty"`
1446}
1447
1448// OperationProperties properties of operation, include metric specifications.
1449type OperationProperties struct {
1450	// ServiceSpecification - One property of operation, include metric specifications.
1451	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
1452}
1453
1454// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
1455// have tags and a location
1456type ProxyResource struct {
1457	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1458	ID *string `json:"id,omitempty"`
1459	// Name - READ-ONLY; The name of the resource
1460	Name *string `json:"name,omitempty"`
1461	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1462	Type *string `json:"type,omitempty"`
1463}
1464
1465// MarshalJSON is the custom marshaler for ProxyResource.
1466func (pr ProxyResource) MarshalJSON() ([]byte, error) {
1467	objectMap := make(map[string]interface{})
1468	return json.Marshal(objectMap)
1469}
1470
1471// Resource common fields that are returned in the response for all Azure Resource Manager resources
1472type Resource struct {
1473	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1474	ID *string `json:"id,omitempty"`
1475	// Name - READ-ONLY; The name of the resource
1476	Name *string `json:"name,omitempty"`
1477	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1478	Type *string `json:"type,omitempty"`
1479}
1480
1481// MarshalJSON is the custom marshaler for Resource.
1482func (r Resource) MarshalJSON() ([]byte, error) {
1483	objectMap := make(map[string]interface{})
1484	return json.Marshal(objectMap)
1485}
1486
1487// Restriction the restriction because of which SKU cannot be used.
1488type Restriction struct {
1489	// Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location.
1490	Type *string `json:"type,omitempty"`
1491	// 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.
1492	Values *[]string `json:"values,omitempty"`
1493	// 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'
1494	ReasonCode ReasonCode `json:"reasonCode,omitempty"`
1495}
1496
1497// MarshalJSON is the custom marshaler for Restriction.
1498func (r Restriction) MarshalJSON() ([]byte, error) {
1499	objectMap := make(map[string]interface{})
1500	if r.ReasonCode != "" {
1501		objectMap["reasonCode"] = r.ReasonCode
1502	}
1503	return json.Marshal(objectMap)
1504}
1505
1506// ServiceSasParameters the parameters to list service SAS credentials of a specific resource.
1507type ServiceSasParameters struct {
1508	// CanonicalizedResource - The canonical path to the signed resource.
1509	CanonicalizedResource *string `json:"canonicalizedResource,omitempty"`
1510	// 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'
1511	Resource SignedResource `json:"signedResource,omitempty"`
1512	// 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'
1513	Permissions Permissions `json:"signedPermission,omitempty"`
1514	// IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests.
1515	IPAddressOrRange *string `json:"signedIp,omitempty"`
1516	// Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS'
1517	Protocols HTTPProtocol `json:"signedProtocol,omitempty"`
1518	// SharedAccessStartTime - The time at which the SAS becomes valid.
1519	SharedAccessStartTime *date.Time `json:"signedStart,omitempty"`
1520	// SharedAccessExpiryTime - The time at which the shared access signature becomes invalid.
1521	SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"`
1522	// Identifier - A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table.
1523	Identifier *string `json:"signedIdentifier,omitempty"`
1524	// PartitionKeyStart - The start of partition key.
1525	PartitionKeyStart *string `json:"startPk,omitempty"`
1526	// PartitionKeyEnd - The end of partition key.
1527	PartitionKeyEnd *string `json:"endPk,omitempty"`
1528	// RowKeyStart - The start of row key.
1529	RowKeyStart *string `json:"startRk,omitempty"`
1530	// RowKeyEnd - The end of row key.
1531	RowKeyEnd *string `json:"endRk,omitempty"`
1532	// KeyToSign - The key to sign the account SAS token with.
1533	KeyToSign *string `json:"keyToSign,omitempty"`
1534	// CacheControl - The response header override for cache control.
1535	CacheControl *string `json:"rscc,omitempty"`
1536	// ContentDisposition - The response header override for content disposition.
1537	ContentDisposition *string `json:"rscd,omitempty"`
1538	// ContentEncoding - The response header override for content encoding.
1539	ContentEncoding *string `json:"rsce,omitempty"`
1540	// ContentLanguage - The response header override for content language.
1541	ContentLanguage *string `json:"rscl,omitempty"`
1542	// ContentType - The response header override for content type.
1543	ContentType *string `json:"rsct,omitempty"`
1544}
1545
1546// ServiceSpecification one property of operation, include metric specifications.
1547type ServiceSpecification struct {
1548	// MetricSpecifications - Metric specifications of operation.
1549	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
1550}
1551
1552// Sku the SKU of the storage account.
1553type Sku struct {
1554	// Name - Gets or sets the sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS'
1555	Name SkuName `json:"name,omitempty"`
1556	// Tier - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'
1557	Tier SkuTier `json:"tier,omitempty"`
1558	// ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'.
1559	ResourceType *string `json:"resourceType,omitempty"`
1560	// Kind - READ-ONLY; Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'
1561	Kind Kind `json:"kind,omitempty"`
1562	// 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.).
1563	Locations *[]string `json:"locations,omitempty"`
1564	// Capabilities - READ-ONLY; The capability information in the specified sku, including file encryption, network acls, change notification, etc.
1565	Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
1566	// Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
1567	Restrictions *[]Restriction `json:"restrictions,omitempty"`
1568}
1569
1570// MarshalJSON is the custom marshaler for Sku.
1571func (s Sku) MarshalJSON() ([]byte, error) {
1572	objectMap := make(map[string]interface{})
1573	if s.Name != "" {
1574		objectMap["name"] = s.Name
1575	}
1576	if s.Restrictions != nil {
1577		objectMap["restrictions"] = s.Restrictions
1578	}
1579	return json.Marshal(objectMap)
1580}
1581
1582// SKUCapability the capability information in the specified sku, including file encryption, network acls,
1583// change notification, etc.
1584type SKUCapability struct {
1585	// Name - READ-ONLY; The name of capability, The capability information in the specified sku, including file encryption, network acls, change notification, etc.
1586	Name *string `json:"name,omitempty"`
1587	// Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'.
1588	Value *string `json:"value,omitempty"`
1589}
1590
1591// MarshalJSON is the custom marshaler for SKUCapability.
1592func (sc SKUCapability) MarshalJSON() ([]byte, error) {
1593	objectMap := make(map[string]interface{})
1594	return json.Marshal(objectMap)
1595}
1596
1597// SkuListResult the response from the List Storage SKUs operation.
1598type SkuListResult struct {
1599	autorest.Response `json:"-"`
1600	// Value - READ-ONLY; Get the list result of storage SKUs and their properties.
1601	Value *[]Sku `json:"value,omitempty"`
1602}
1603
1604// MarshalJSON is the custom marshaler for SkuListResult.
1605func (slr SkuListResult) MarshalJSON() ([]byte, error) {
1606	objectMap := make(map[string]interface{})
1607	return json.Marshal(objectMap)
1608}
1609
1610// TagProperty a tag of the LegalHold of a blob container.
1611type TagProperty struct {
1612	// Tag - READ-ONLY; The tag value.
1613	Tag *string `json:"tag,omitempty"`
1614	// Timestamp - READ-ONLY; Returns the date and time the tag was added.
1615	Timestamp *date.Time `json:"timestamp,omitempty"`
1616	// ObjectIdentifier - READ-ONLY; Returns the Object ID of the user who added the tag.
1617	ObjectIdentifier *string `json:"objectIdentifier,omitempty"`
1618	// TenantID - READ-ONLY; Returns the Tenant ID that issued the token for the user who added the tag.
1619	TenantID *string `json:"tenantId,omitempty"`
1620	// Upn - READ-ONLY; Returns the User Principal Name of the user who added the tag.
1621	Upn *string `json:"upn,omitempty"`
1622}
1623
1624// MarshalJSON is the custom marshaler for TagProperty.
1625func (tp TagProperty) MarshalJSON() ([]byte, error) {
1626	objectMap := make(map[string]interface{})
1627	return json.Marshal(objectMap)
1628}
1629
1630// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
1631// which has 'tags' and a 'location'
1632type TrackedResource struct {
1633	// Tags - Resource tags.
1634	Tags map[string]*string `json:"tags"`
1635	// Location - The geo-location where the resource lives
1636	Location *string `json:"location,omitempty"`
1637	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1638	ID *string `json:"id,omitempty"`
1639	// Name - READ-ONLY; The name of the resource
1640	Name *string `json:"name,omitempty"`
1641	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1642	Type *string `json:"type,omitempty"`
1643}
1644
1645// MarshalJSON is the custom marshaler for TrackedResource.
1646func (tr TrackedResource) MarshalJSON() ([]byte, error) {
1647	objectMap := make(map[string]interface{})
1648	if tr.Tags != nil {
1649		objectMap["tags"] = tr.Tags
1650	}
1651	if tr.Location != nil {
1652		objectMap["location"] = tr.Location
1653	}
1654	return json.Marshal(objectMap)
1655}
1656
1657// UpdateHistoryProperty an update history of the ImmutabilityPolicy of a blob container.
1658type UpdateHistoryProperty struct {
1659	// Update - READ-ONLY; The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Possible values include: 'Put', 'Lock', 'Extend'
1660	Update ImmutabilityPolicyUpdateType `json:"update,omitempty"`
1661	// ImmutabilityPeriodSinceCreationInDays - READ-ONLY; The immutability period for the blobs in the container since the policy creation, in days.
1662	ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
1663	// Timestamp - READ-ONLY; Returns the date and time the ImmutabilityPolicy was updated.
1664	Timestamp *date.Time `json:"timestamp,omitempty"`
1665	// ObjectIdentifier - READ-ONLY; Returns the Object ID of the user who updated the ImmutabilityPolicy.
1666	ObjectIdentifier *string `json:"objectIdentifier,omitempty"`
1667	// TenantID - READ-ONLY; Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.
1668	TenantID *string `json:"tenantId,omitempty"`
1669	// Upn - READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy.
1670	Upn *string `json:"upn,omitempty"`
1671}
1672
1673// MarshalJSON is the custom marshaler for UpdateHistoryProperty.
1674func (uhp UpdateHistoryProperty) MarshalJSON() ([]byte, error) {
1675	objectMap := make(map[string]interface{})
1676	return json.Marshal(objectMap)
1677}
1678
1679// Usage describes Storage Resource Usage.
1680type Usage struct {
1681	// Unit - READ-ONLY; Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'
1682	Unit UsageUnit `json:"unit,omitempty"`
1683	// CurrentValue - READ-ONLY; Gets the current count of the allocated resources in the subscription.
1684	CurrentValue *int32 `json:"currentValue,omitempty"`
1685	// Limit - READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription.
1686	Limit *int32 `json:"limit,omitempty"`
1687	// Name - READ-ONLY; Gets the name of the type of usage.
1688	Name *UsageName `json:"name,omitempty"`
1689}
1690
1691// MarshalJSON is the custom marshaler for Usage.
1692func (u Usage) MarshalJSON() ([]byte, error) {
1693	objectMap := make(map[string]interface{})
1694	return json.Marshal(objectMap)
1695}
1696
1697// UsageListResult the response from the List Usages operation.
1698type UsageListResult struct {
1699	autorest.Response `json:"-"`
1700	// Value - Gets or sets the list of Storage Resource Usages.
1701	Value *[]Usage `json:"value,omitempty"`
1702}
1703
1704// UsageName the usage names that can be used; currently limited to StorageAccount.
1705type UsageName struct {
1706	// Value - READ-ONLY; Gets a string describing the resource name.
1707	Value *string `json:"value,omitempty"`
1708	// LocalizedValue - READ-ONLY; Gets a localized string describing the resource name.
1709	LocalizedValue *string `json:"localizedValue,omitempty"`
1710}
1711
1712// MarshalJSON is the custom marshaler for UsageName.
1713func (un UsageName) MarshalJSON() ([]byte, error) {
1714	objectMap := make(map[string]interface{})
1715	return json.Marshal(objectMap)
1716}
1717
1718// VirtualNetworkRule virtual Network rule.
1719type VirtualNetworkRule struct {
1720	// VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
1721	VirtualNetworkResourceID *string `json:"id,omitempty"`
1722	// Action - The action of virtual network rule. Possible values include: 'Allow'
1723	Action Action `json:"action,omitempty"`
1724	// State - Gets the state of virtual network rule. Possible values include: 'StateProvisioning', 'StateDeprovisioning', 'StateSucceeded', 'StateFailed', 'StateNetworkSourceDeleted'
1725	State State `json:"state,omitempty"`
1726}
1727