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