1package storage
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/storage/mgmt/2015-05-01-preview/storage"
33
34// AccountStatus enumerates the values for account status.
35type AccountStatus string
36
37const (
38	// Available ...
39	Available AccountStatus = "Available"
40	// Unavailable ...
41	Unavailable AccountStatus = "Unavailable"
42)
43
44// PossibleAccountStatusValues returns an array of possible values for the AccountStatus const type.
45func PossibleAccountStatusValues() []AccountStatus {
46	return []AccountStatus{Available, Unavailable}
47}
48
49// AccountType enumerates the values for account type.
50type AccountType string
51
52const (
53	// PremiumLRS ...
54	PremiumLRS AccountType = "Premium_LRS"
55	// StandardGRS ...
56	StandardGRS AccountType = "Standard_GRS"
57	// StandardLRS ...
58	StandardLRS AccountType = "Standard_LRS"
59	// StandardRAGRS ...
60	StandardRAGRS AccountType = "Standard_RAGRS"
61	// StandardZRS ...
62	StandardZRS AccountType = "Standard_ZRS"
63)
64
65// PossibleAccountTypeValues returns an array of possible values for the AccountType const type.
66func PossibleAccountTypeValues() []AccountType {
67	return []AccountType{PremiumLRS, StandardGRS, StandardLRS, StandardRAGRS, StandardZRS}
68}
69
70// KeyName enumerates the values for key name.
71type KeyName string
72
73const (
74	// Key1 ...
75	Key1 KeyName = "key1"
76	// Key2 ...
77	Key2 KeyName = "key2"
78)
79
80// PossibleKeyNameValues returns an array of possible values for the KeyName const type.
81func PossibleKeyNameValues() []KeyName {
82	return []KeyName{Key1, Key2}
83}
84
85// ProvisioningState enumerates the values for provisioning state.
86type ProvisioningState string
87
88const (
89	// Creating ...
90	Creating ProvisioningState = "Creating"
91	// ResolvingDNS ...
92	ResolvingDNS ProvisioningState = "ResolvingDNS"
93	// Succeeded ...
94	Succeeded ProvisioningState = "Succeeded"
95)
96
97// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
98func PossibleProvisioningStateValues() []ProvisioningState {
99	return []ProvisioningState{Creating, ResolvingDNS, Succeeded}
100}
101
102// Reason enumerates the values for reason.
103type Reason string
104
105const (
106	// AccountNameInvalid ...
107	AccountNameInvalid Reason = "AccountNameInvalid"
108	// AlreadyExists ...
109	AlreadyExists Reason = "AlreadyExists"
110)
111
112// PossibleReasonValues returns an array of possible values for the Reason const type.
113func PossibleReasonValues() []Reason {
114	return []Reason{AccountNameInvalid, AlreadyExists}
115}
116
117// UsageUnit enumerates the values for usage unit.
118type UsageUnit string
119
120const (
121	// Bytes ...
122	Bytes UsageUnit = "Bytes"
123	// BytesPerSecond ...
124	BytesPerSecond UsageUnit = "BytesPerSecond"
125	// Count ...
126	Count UsageUnit = "Count"
127	// CountsPerSecond ...
128	CountsPerSecond UsageUnit = "CountsPerSecond"
129	// Percent ...
130	Percent UsageUnit = "Percent"
131	// Seconds ...
132	Seconds UsageUnit = "Seconds"
133)
134
135// PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type.
136func PossibleUsageUnitValues() []UsageUnit {
137	return []UsageUnit{Bytes, BytesPerSecond, Count, CountsPerSecond, Percent, Seconds}
138}
139
140// Account the storage account.
141type Account struct {
142	autorest.Response  `json:"-"`
143	*AccountProperties `json:"properties,omitempty"`
144	// ID - READ-ONLY; Resource Id
145	ID *string `json:"id,omitempty"`
146	// Name - READ-ONLY; Resource name
147	Name *string `json:"name,omitempty"`
148	// Type - READ-ONLY; Resource type
149	Type *string `json:"type,omitempty"`
150	// Location - Resource location
151	Location *string `json:"location,omitempty"`
152	// Tags - Resource tags
153	Tags map[string]*string `json:"tags"`
154}
155
156// MarshalJSON is the custom marshaler for Account.
157func (a Account) MarshalJSON() ([]byte, error) {
158	objectMap := make(map[string]interface{})
159	if a.AccountProperties != nil {
160		objectMap["properties"] = a.AccountProperties
161	}
162	if a.Location != nil {
163		objectMap["location"] = a.Location
164	}
165	if a.Tags != nil {
166		objectMap["tags"] = a.Tags
167	}
168	return json.Marshal(objectMap)
169}
170
171// UnmarshalJSON is the custom unmarshaler for Account struct.
172func (a *Account) UnmarshalJSON(body []byte) error {
173	var m map[string]*json.RawMessage
174	err := json.Unmarshal(body, &m)
175	if err != nil {
176		return err
177	}
178	for k, v := range m {
179		switch k {
180		case "properties":
181			if v != nil {
182				var accountProperties AccountProperties
183				err = json.Unmarshal(*v, &accountProperties)
184				if err != nil {
185					return err
186				}
187				a.AccountProperties = &accountProperties
188			}
189		case "id":
190			if v != nil {
191				var ID string
192				err = json.Unmarshal(*v, &ID)
193				if err != nil {
194					return err
195				}
196				a.ID = &ID
197			}
198		case "name":
199			if v != nil {
200				var name string
201				err = json.Unmarshal(*v, &name)
202				if err != nil {
203					return err
204				}
205				a.Name = &name
206			}
207		case "type":
208			if v != nil {
209				var typeVar string
210				err = json.Unmarshal(*v, &typeVar)
211				if err != nil {
212					return err
213				}
214				a.Type = &typeVar
215			}
216		case "location":
217			if v != nil {
218				var location string
219				err = json.Unmarshal(*v, &location)
220				if err != nil {
221					return err
222				}
223				a.Location = &location
224			}
225		case "tags":
226			if v != nil {
227				var tags map[string]*string
228				err = json.Unmarshal(*v, &tags)
229				if err != nil {
230					return err
231				}
232				a.Tags = tags
233			}
234		}
235	}
236
237	return nil
238}
239
240// AccountCheckNameAvailabilityParameters ...
241type AccountCheckNameAvailabilityParameters struct {
242	Name *string `json:"name,omitempty"`
243	Type *string `json:"type,omitempty"`
244}
245
246// AccountCreateParameters the parameters to provide for the account.
247type AccountCreateParameters struct {
248	*AccountPropertiesCreateParameters `json:"properties,omitempty"`
249	// ID - READ-ONLY; Resource Id
250	ID *string `json:"id,omitempty"`
251	// Name - READ-ONLY; Resource name
252	Name *string `json:"name,omitempty"`
253	// Type - READ-ONLY; Resource type
254	Type *string `json:"type,omitempty"`
255	// Location - Resource location
256	Location *string `json:"location,omitempty"`
257	// Tags - Resource tags
258	Tags map[string]*string `json:"tags"`
259}
260
261// MarshalJSON is the custom marshaler for AccountCreateParameters.
262func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
263	objectMap := make(map[string]interface{})
264	if acp.AccountPropertiesCreateParameters != nil {
265		objectMap["properties"] = acp.AccountPropertiesCreateParameters
266	}
267	if acp.Location != nil {
268		objectMap["location"] = acp.Location
269	}
270	if acp.Tags != nil {
271		objectMap["tags"] = acp.Tags
272	}
273	return json.Marshal(objectMap)
274}
275
276// UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct.
277func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
278	var m map[string]*json.RawMessage
279	err := json.Unmarshal(body, &m)
280	if err != nil {
281		return err
282	}
283	for k, v := range m {
284		switch k {
285		case "properties":
286			if v != nil {
287				var accountPropertiesCreateParameters AccountPropertiesCreateParameters
288				err = json.Unmarshal(*v, &accountPropertiesCreateParameters)
289				if err != nil {
290					return err
291				}
292				acp.AccountPropertiesCreateParameters = &accountPropertiesCreateParameters
293			}
294		case "id":
295			if v != nil {
296				var ID string
297				err = json.Unmarshal(*v, &ID)
298				if err != nil {
299					return err
300				}
301				acp.ID = &ID
302			}
303		case "name":
304			if v != nil {
305				var name string
306				err = json.Unmarshal(*v, &name)
307				if err != nil {
308					return err
309				}
310				acp.Name = &name
311			}
312		case "type":
313			if v != nil {
314				var typeVar string
315				err = json.Unmarshal(*v, &typeVar)
316				if err != nil {
317					return err
318				}
319				acp.Type = &typeVar
320			}
321		case "location":
322			if v != nil {
323				var location string
324				err = json.Unmarshal(*v, &location)
325				if err != nil {
326					return err
327				}
328				acp.Location = &location
329			}
330		case "tags":
331			if v != nil {
332				var tags map[string]*string
333				err = json.Unmarshal(*v, &tags)
334				if err != nil {
335					return err
336				}
337				acp.Tags = tags
338			}
339		}
340	}
341
342	return nil
343}
344
345// AccountKeys the access keys for the storage account.
346type AccountKeys struct {
347	autorest.Response `json:"-"`
348	// Key1 - Gets the value of key 1.
349	Key1 *string `json:"key1,omitempty"`
350	// Key2 - Gets the value of key 2.
351	Key2 *string `json:"key2,omitempty"`
352}
353
354// AccountListResult the list storage accounts operation response.
355type AccountListResult struct {
356	autorest.Response `json:"-"`
357	// Value - Gets the list of storage accounts and their properties.
358	Value *[]Account `json:"value,omitempty"`
359	// NextLink - Gets the link to the next set of results. Currently this will always be empty as the API does not support pagination.
360	NextLink *string `json:"nextLink,omitempty"`
361}
362
363// AccountListResultIterator provides access to a complete listing of Account values.
364type AccountListResultIterator struct {
365	i    int
366	page AccountListResultPage
367}
368
369// NextWithContext advances to the next value.  If there was an error making
370// the request the iterator does not advance and the error is returned.
371func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
372	if tracing.IsEnabled() {
373		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext")
374		defer func() {
375			sc := -1
376			if iter.Response().Response.Response != nil {
377				sc = iter.Response().Response.Response.StatusCode
378			}
379			tracing.EndSpan(ctx, sc, err)
380		}()
381	}
382	iter.i++
383	if iter.i < len(iter.page.Values()) {
384		return nil
385	}
386	err = iter.page.NextWithContext(ctx)
387	if err != nil {
388		iter.i--
389		return err
390	}
391	iter.i = 0
392	return nil
393}
394
395// Next advances to the next value.  If there was an error making
396// the request the iterator does not advance and the error is returned.
397// Deprecated: Use NextWithContext() instead.
398func (iter *AccountListResultIterator) Next() error {
399	return iter.NextWithContext(context.Background())
400}
401
402// NotDone returns true if the enumeration should be started or is not yet complete.
403func (iter AccountListResultIterator) NotDone() bool {
404	return iter.page.NotDone() && iter.i < len(iter.page.Values())
405}
406
407// Response returns the raw server response from the last page request.
408func (iter AccountListResultIterator) Response() AccountListResult {
409	return iter.page.Response()
410}
411
412// Value returns the current value or a zero-initialized value if the
413// iterator has advanced beyond the end of the collection.
414func (iter AccountListResultIterator) Value() Account {
415	if !iter.page.NotDone() {
416		return Account{}
417	}
418	return iter.page.Values()[iter.i]
419}
420
421// Creates a new instance of the AccountListResultIterator type.
422func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator {
423	return AccountListResultIterator{page: page}
424}
425
426// IsEmpty returns true if the ListResult contains no values.
427func (alr AccountListResult) IsEmpty() bool {
428	return alr.Value == nil || len(*alr.Value) == 0
429}
430
431// accountListResultPreparer prepares a request to retrieve the next set of results.
432// It returns nil if no more results exist.
433func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) {
434	if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
435		return nil, nil
436	}
437	return autorest.Prepare((&http.Request{}).WithContext(ctx),
438		autorest.AsJSON(),
439		autorest.AsGet(),
440		autorest.WithBaseURL(to.String(alr.NextLink)))
441}
442
443// AccountListResultPage contains a page of Account values.
444type AccountListResultPage struct {
445	fn  func(context.Context, AccountListResult) (AccountListResult, error)
446	alr AccountListResult
447}
448
449// NextWithContext advances to the next page of values.  If there was an error making
450// the request the page does not advance and the error is returned.
451func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) {
452	if tracing.IsEnabled() {
453		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext")
454		defer func() {
455			sc := -1
456			if page.Response().Response.Response != nil {
457				sc = page.Response().Response.Response.StatusCode
458			}
459			tracing.EndSpan(ctx, sc, err)
460		}()
461	}
462	next, err := page.fn(ctx, page.alr)
463	if err != nil {
464		return err
465	}
466	page.alr = next
467	return nil
468}
469
470// Next advances to the next page of values.  If there was an error making
471// the request the page does not advance and the error is returned.
472// Deprecated: Use NextWithContext() instead.
473func (page *AccountListResultPage) Next() error {
474	return page.NextWithContext(context.Background())
475}
476
477// NotDone returns true if the page enumeration should be started or is not yet complete.
478func (page AccountListResultPage) NotDone() bool {
479	return !page.alr.IsEmpty()
480}
481
482// Response returns the raw server response from the last page request.
483func (page AccountListResultPage) Response() AccountListResult {
484	return page.alr
485}
486
487// Values returns the slice of values for the current page or nil if there are no values.
488func (page AccountListResultPage) Values() []Account {
489	if page.alr.IsEmpty() {
490		return nil
491	}
492	return *page.alr.Value
493}
494
495// Creates a new instance of the AccountListResultPage type.
496func NewAccountListResultPage(getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage {
497	return AccountListResultPage{fn: getNextPage}
498}
499
500// AccountProperties ...
501type AccountProperties struct {
502	// ProvisioningState - Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'
503	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
504	// AccountType - Gets the type of the storage account. Possible values include: 'StandardLRS', 'StandardZRS', 'StandardGRS', 'StandardRAGRS', 'PremiumLRS'
505	AccountType AccountType `json:"accountType,omitempty"`
506	// PrimaryEndpoints - Gets the URLs that are used to perform a retrieval of a public blob, queue or table object.Note that StandardZRS and PremiumLRS accounts only return the blob endpoint.
507	PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"`
508	// PrimaryLocation - Gets the location of the primary for the storage account.
509	PrimaryLocation *string `json:"primaryLocation,omitempty"`
510	// StatusOfPrimary - Gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'Available', 'Unavailable'
511	StatusOfPrimary AccountStatus `json:"statusOfPrimary,omitempty"`
512	// LastGeoFailoverTime - 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 StandardGRS or StandardRAGRS.
513	LastGeoFailoverTime *date.Time `json:"lastGeoFailoverTime,omitempty"`
514	// SecondaryLocation - Gets the location of the geo replicated secondary for the storage account. Only available if the accountType is StandardGRS or StandardRAGRS.
515	SecondaryLocation *string `json:"secondaryLocation,omitempty"`
516	// StatusOfSecondary - Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the accountType is StandardGRS or StandardRAGRS. Possible values include: 'Available', 'Unavailable'
517	StatusOfSecondary AccountStatus `json:"statusOfSecondary,omitempty"`
518	// CreationTime - Gets the creation date and time of the storage account in UTC.
519	CreationTime *date.Time `json:"creationTime,omitempty"`
520	// CustomDomain - Gets the user assigned custom domain assigned to this storage account.
521	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
522	// SecondaryEndpoints - 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 accountType is StandardRAGRS.
523	SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"`
524}
525
526// AccountPropertiesCreateParameters ...
527type AccountPropertiesCreateParameters struct {
528	// AccountType - Gets or sets the account type. Possible values include: 'StandardLRS', 'StandardZRS', 'StandardGRS', 'StandardRAGRS', 'PremiumLRS'
529	AccountType AccountType `json:"accountType,omitempty"`
530}
531
532// AccountPropertiesUpdateParameters ...
533type AccountPropertiesUpdateParameters struct {
534	// AccountType - Gets or sets the account type. Note that StandardZRS and PremiumLRS accounts cannot be changed to other account types, and other account types cannot be changed to StandardZRS or PremiumLRS. Possible values include: 'StandardLRS', 'StandardZRS', 'StandardGRS', 'StandardRAGRS', 'PremiumLRS'
535	AccountType AccountType `json:"accountType,omitempty"`
536	// 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.
537	CustomDomain *CustomDomain `json:"customDomain,omitempty"`
538}
539
540// AccountRegenerateKeyParameters ...
541type AccountRegenerateKeyParameters struct {
542	// KeyName - Possible values include: 'Key1', 'Key2'
543	KeyName KeyName `json:"keyName,omitempty"`
544}
545
546// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
547// operation.
548type AccountsCreateFuture struct {
549	azure.Future
550}
551
552// Result returns the result of the asynchronous operation.
553// If the operation has not completed it will return an error.
554func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, err error) {
555	var done bool
556	done, err = future.DoneWithContext(context.Background(), client)
557	if err != nil {
558		err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure")
559		return
560	}
561	if !done {
562		err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
563		return
564	}
565	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
566	if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent {
567		a, err = client.CreateResponder(a.Response.Response)
568		if err != nil {
569			err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request")
570		}
571	}
572	return
573}
574
575// AccountUpdateParameters the parameters to update on the account.
576type AccountUpdateParameters struct {
577	*AccountPropertiesUpdateParameters `json:"properties,omitempty"`
578	// ID - READ-ONLY; Resource Id
579	ID *string `json:"id,omitempty"`
580	// Name - READ-ONLY; Resource name
581	Name *string `json:"name,omitempty"`
582	// Type - READ-ONLY; Resource type
583	Type *string `json:"type,omitempty"`
584	// Location - Resource location
585	Location *string `json:"location,omitempty"`
586	// Tags - Resource tags
587	Tags map[string]*string `json:"tags"`
588}
589
590// MarshalJSON is the custom marshaler for AccountUpdateParameters.
591func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
592	objectMap := make(map[string]interface{})
593	if aup.AccountPropertiesUpdateParameters != nil {
594		objectMap["properties"] = aup.AccountPropertiesUpdateParameters
595	}
596	if aup.Location != nil {
597		objectMap["location"] = aup.Location
598	}
599	if aup.Tags != nil {
600		objectMap["tags"] = aup.Tags
601	}
602	return json.Marshal(objectMap)
603}
604
605// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct.
606func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error {
607	var m map[string]*json.RawMessage
608	err := json.Unmarshal(body, &m)
609	if err != nil {
610		return err
611	}
612	for k, v := range m {
613		switch k {
614		case "properties":
615			if v != nil {
616				var accountPropertiesUpdateParameters AccountPropertiesUpdateParameters
617				err = json.Unmarshal(*v, &accountPropertiesUpdateParameters)
618				if err != nil {
619					return err
620				}
621				aup.AccountPropertiesUpdateParameters = &accountPropertiesUpdateParameters
622			}
623		case "id":
624			if v != nil {
625				var ID string
626				err = json.Unmarshal(*v, &ID)
627				if err != nil {
628					return err
629				}
630				aup.ID = &ID
631			}
632		case "name":
633			if v != nil {
634				var name string
635				err = json.Unmarshal(*v, &name)
636				if err != nil {
637					return err
638				}
639				aup.Name = &name
640			}
641		case "type":
642			if v != nil {
643				var typeVar string
644				err = json.Unmarshal(*v, &typeVar)
645				if err != nil {
646					return err
647				}
648				aup.Type = &typeVar
649			}
650		case "location":
651			if v != nil {
652				var location string
653				err = json.Unmarshal(*v, &location)
654				if err != nil {
655					return err
656				}
657				aup.Location = &location
658			}
659		case "tags":
660			if v != nil {
661				var tags map[string]*string
662				err = json.Unmarshal(*v, &tags)
663				if err != nil {
664					return err
665				}
666				aup.Tags = tags
667			}
668		}
669	}
670
671	return nil
672}
673
674// CheckNameAvailabilityResult the CheckNameAvailability operation response.
675type CheckNameAvailabilityResult struct {
676	autorest.Response `json:"-"`
677	// NameAvailable - 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 invalid and cannot be used.
678	NameAvailable *bool `json:"nameAvailable,omitempty"`
679	// Reason - 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'
680	Reason Reason `json:"reason,omitempty"`
681	// Message - Gets an error message explaining the Reason value in more detail.
682	Message *string `json:"message,omitempty"`
683}
684
685// CustomDomain the custom domain assigned to this storage account. This can be set via Update.
686type CustomDomain struct {
687	// Name - Gets or sets the custom domain name. Name is the CNAME source.
688	Name *string `json:"name,omitempty"`
689	// UseSubDomainName - Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates
690	UseSubDomainName *bool `json:"useSubDomainName,omitempty"`
691}
692
693// Endpoints the URIs that are used to perform a retrieval of a public blob, queue or table object.
694type Endpoints struct {
695	// Blob - Gets the blob endpoint.
696	Blob *string `json:"blob,omitempty"`
697	// Queue - Gets the queue endpoint.
698	Queue *string `json:"queue,omitempty"`
699	// Table - Gets the table endpoint.
700	Table *string `json:"table,omitempty"`
701}
702
703// Resource ...
704type Resource struct {
705	// ID - READ-ONLY; Resource Id
706	ID *string `json:"id,omitempty"`
707	// Name - READ-ONLY; Resource name
708	Name *string `json:"name,omitempty"`
709	// Type - READ-ONLY; Resource type
710	Type *string `json:"type,omitempty"`
711	// Location - Resource location
712	Location *string `json:"location,omitempty"`
713	// Tags - Resource tags
714	Tags map[string]*string `json:"tags"`
715}
716
717// MarshalJSON is the custom marshaler for Resource.
718func (r Resource) MarshalJSON() ([]byte, error) {
719	objectMap := make(map[string]interface{})
720	if r.Location != nil {
721		objectMap["location"] = r.Location
722	}
723	if r.Tags != nil {
724		objectMap["tags"] = r.Tags
725	}
726	return json.Marshal(objectMap)
727}
728
729// SubResource ...
730type SubResource struct {
731	// ID - Resource Id
732	ID *string `json:"id,omitempty"`
733}
734
735// Usage describes Storage Resource Usage.
736type Usage struct {
737	// Unit - Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'
738	Unit UsageUnit `json:"unit,omitempty"`
739	// CurrentValue - Gets the current count of the allocated resources in the subscription.
740	CurrentValue *int32 `json:"currentValue,omitempty"`
741	// Limit - Gets the maximum count of the resources that can be allocated in the subscription.
742	Limit *int32 `json:"limit,omitempty"`
743	// Name - Gets the name of the type of usage.
744	Name *UsageName `json:"name,omitempty"`
745}
746
747// UsageListResult the List Usages operation response.
748type UsageListResult struct {
749	autorest.Response `json:"-"`
750	// Value - Gets or sets the list Storage Resource Usages.
751	Value *[]Usage `json:"value,omitempty"`
752}
753
754// UsageName the Usage Names.
755type UsageName struct {
756	// Value - Gets a string describing the resource name.
757	Value *string `json:"value,omitempty"`
758	// LocalizedValue - Gets a localized string describing the resource name.
759	LocalizedValue *string `json:"localizedValue,omitempty"`
760}
761