1package labservices
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/shopspring/decimal"
29	"net/http"
30)
31
32// The package's fully qualified name.
33const fqdn = "github.com/Azure/azure-sdk-for-go/services/labservices/mgmt/2018-10-15/labservices"
34
35// AddRemove enumerates the values for add remove.
36type AddRemove string
37
38const (
39	// Add Indicates that a user is adding a favorite lab
40	Add AddRemove = "Add"
41	// Remove Indicates that a user is removing a favorite lab
42	Remove AddRemove = "Remove"
43)
44
45// PossibleAddRemoveValues returns an array of possible values for the AddRemove const type.
46func PossibleAddRemoveValues() []AddRemove {
47	return []AddRemove{Add, Remove}
48}
49
50// ConfigurationState enumerates the values for configuration state.
51type ConfigurationState string
52
53const (
54	// Completed User is finished modifying the template.
55	Completed ConfigurationState = "Completed"
56	// NotApplicable User either hasn't started configuring their template
57	// or they haven't started the configuration process.
58	NotApplicable ConfigurationState = "NotApplicable"
59)
60
61// PossibleConfigurationStateValues returns an array of possible values for the ConfigurationState const type.
62func PossibleConfigurationStateValues() []ConfigurationState {
63	return []ConfigurationState{Completed, NotApplicable}
64}
65
66// LabUserAccessMode enumerates the values for lab user access mode.
67type LabUserAccessMode string
68
69const (
70	// Open Any user can register with the lab and access its VMs.
71	Open LabUserAccessMode = "Open"
72	// Restricted Only users registered with the lab can access VMs.
73	Restricted LabUserAccessMode = "Restricted"
74)
75
76// PossibleLabUserAccessModeValues returns an array of possible values for the LabUserAccessMode const type.
77func PossibleLabUserAccessModeValues() []LabUserAccessMode {
78	return []LabUserAccessMode{Open, Restricted}
79}
80
81// ManagedLabVMSize enumerates the values for managed lab vm size.
82type ManagedLabVMSize string
83
84const (
85	// Basic The base VM size
86	Basic ManagedLabVMSize = "Basic"
87	// Performance The most performant VM size
88	Performance ManagedLabVMSize = "Performance"
89	// Standard The standard or default VM size
90	Standard ManagedLabVMSize = "Standard"
91)
92
93// PossibleManagedLabVMSizeValues returns an array of possible values for the ManagedLabVMSize const type.
94func PossibleManagedLabVMSizeValues() []ManagedLabVMSize {
95	return []ManagedLabVMSize{Basic, Performance, Standard}
96}
97
98// PublishingState enumerates the values for publishing state.
99type PublishingState string
100
101const (
102	// Draft Initial state of an environment setting.
103	Draft PublishingState = "Draft"
104	// Published All resources are currently provisioned.
105	Published PublishingState = "Published"
106	// PublishFailed Failed to provision all the necessary resources.
107	PublishFailed PublishingState = "PublishFailed"
108	// Publishing Currently provisioning resources.
109	Publishing PublishingState = "Publishing"
110	// Scaling Currently provisioning resources without recreating VM image.
111	Scaling PublishingState = "Scaling"
112)
113
114// PossiblePublishingStateValues returns an array of possible values for the PublishingState const type.
115func PossiblePublishingStateValues() []PublishingState {
116	return []PublishingState{Draft, Published, PublishFailed, Publishing, Scaling}
117}
118
119// AddUsersPayload payload for Add Users operation on a Lab.
120type AddUsersPayload struct {
121	// EmailAddresses - List of user emails addresses to add to the lab.
122	EmailAddresses *[]string `json:"emailAddresses,omitempty"`
123}
124
125// CloudError error from a REST request.
126type CloudError struct {
127	Error *CloudErrorBody `json:"error,omitempty"`
128}
129
130// CloudErrorBody body of an error from a REST request.
131type CloudErrorBody struct {
132	Code    *string `json:"code,omitempty"`
133	Message *string `json:"message,omitempty"`
134	Target  *string `json:"target,omitempty"`
135	// Details - Inner errors.
136	Details *[]CloudErrorBody `json:"details,omitempty"`
137}
138
139// CreateLabProperties properties for creating a managed lab and a default environment setting
140type CreateLabProperties struct {
141	// EnvironmentSettingCreationParameters - Settings related to creating an environment setting
142	EnvironmentSettingCreationParameters *EnvironmentSettingCreationParameters `json:"environmentSettingCreationParameters,omitempty"`
143	// LabCreationParameters - Settings related to creating a lab
144	LabCreationParameters *LabCreationParameters `json:"labCreationParameters,omitempty"`
145	// Name - The name of the resource
146	Name *string `json:"name,omitempty"`
147	// Location - The location of the resource
148	Location *string `json:"location,omitempty"`
149	// Tags - The tags of the resource.
150	Tags map[string]*string `json:"tags"`
151}
152
153// MarshalJSON is the custom marshaler for CreateLabProperties.
154func (clp CreateLabProperties) MarshalJSON() ([]byte, error) {
155	objectMap := make(map[string]interface{})
156	if clp.EnvironmentSettingCreationParameters != nil {
157		objectMap["environmentSettingCreationParameters"] = clp.EnvironmentSettingCreationParameters
158	}
159	if clp.LabCreationParameters != nil {
160		objectMap["labCreationParameters"] = clp.LabCreationParameters
161	}
162	if clp.Name != nil {
163		objectMap["name"] = clp.Name
164	}
165	if clp.Location != nil {
166		objectMap["location"] = clp.Location
167	}
168	if clp.Tags != nil {
169		objectMap["tags"] = clp.Tags
170	}
171	return json.Marshal(objectMap)
172}
173
174// Environment represents an environment instance
175type Environment struct {
176	autorest.Response `json:"-"`
177	// EnvironmentProperties - The properties of the Environment resource
178	*EnvironmentProperties `json:"properties,omitempty"`
179	// ID - READ-ONLY; The identifier of the resource.
180	ID *string `json:"id,omitempty"`
181	// Name - READ-ONLY; The name of the resource.
182	Name *string `json:"name,omitempty"`
183	// Type - READ-ONLY; The type of the resource.
184	Type *string `json:"type,omitempty"`
185	// Location - The location of the resource.
186	Location *string `json:"location,omitempty"`
187	// Tags - The tags of the resource.
188	Tags map[string]*string `json:"tags"`
189}
190
191// MarshalJSON is the custom marshaler for Environment.
192func (e Environment) MarshalJSON() ([]byte, error) {
193	objectMap := make(map[string]interface{})
194	if e.EnvironmentProperties != nil {
195		objectMap["properties"] = e.EnvironmentProperties
196	}
197	if e.Location != nil {
198		objectMap["location"] = e.Location
199	}
200	if e.Tags != nil {
201		objectMap["tags"] = e.Tags
202	}
203	return json.Marshal(objectMap)
204}
205
206// UnmarshalJSON is the custom unmarshaler for Environment struct.
207func (e *Environment) UnmarshalJSON(body []byte) error {
208	var m map[string]*json.RawMessage
209	err := json.Unmarshal(body, &m)
210	if err != nil {
211		return err
212	}
213	for k, v := range m {
214		switch k {
215		case "properties":
216			if v != nil {
217				var environmentProperties EnvironmentProperties
218				err = json.Unmarshal(*v, &environmentProperties)
219				if err != nil {
220					return err
221				}
222				e.EnvironmentProperties = &environmentProperties
223			}
224		case "id":
225			if v != nil {
226				var ID string
227				err = json.Unmarshal(*v, &ID)
228				if err != nil {
229					return err
230				}
231				e.ID = &ID
232			}
233		case "name":
234			if v != nil {
235				var name string
236				err = json.Unmarshal(*v, &name)
237				if err != nil {
238					return err
239				}
240				e.Name = &name
241			}
242		case "type":
243			if v != nil {
244				var typeVar string
245				err = json.Unmarshal(*v, &typeVar)
246				if err != nil {
247					return err
248				}
249				e.Type = &typeVar
250			}
251		case "location":
252			if v != nil {
253				var location string
254				err = json.Unmarshal(*v, &location)
255				if err != nil {
256					return err
257				}
258				e.Location = &location
259			}
260		case "tags":
261			if v != nil {
262				var tags map[string]*string
263				err = json.Unmarshal(*v, &tags)
264				if err != nil {
265					return err
266				}
267				e.Tags = tags
268			}
269		}
270	}
271
272	return nil
273}
274
275// EnvironmentDetails this represents the details about a User's environment and its state.
276type EnvironmentDetails struct {
277	// Name - READ-ONLY; Name of the Environment
278	Name *string `json:"name,omitempty"`
279	// Description - READ-ONLY; Description of the Environment
280	Description *string `json:"description,omitempty"`
281	// ID - READ-ONLY; Resource Id of the environment
282	ID *string `json:"id,omitempty"`
283	// ProvisioningState - READ-ONLY; The provisioning state of the environment. This also includes LabIsFull and NotYetProvisioned status.
284	ProvisioningState *string `json:"provisioningState,omitempty"`
285	// VirtualMachineDetails - READ-ONLY; Details of backing DTL virtual machine with compute and network details.
286	VirtualMachineDetails *VirtualMachineDetails `json:"virtualMachineDetails,omitempty"`
287	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
288	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
289	// EnvironmentState - READ-ONLY; Publishing state of the environment setting Possible values are Creating, Created, Failed
290	EnvironmentState *string `json:"environmentState,omitempty"`
291	// TotalUsage - READ-ONLY; How long the environment has been used by a lab user
292	TotalUsage *string `json:"totalUsage,omitempty"`
293	// PasswordLastReset - READ-ONLY; When the password was last reset on the environment.
294	PasswordLastReset *date.Time `json:"passwordLastReset,omitempty"`
295}
296
297// EnvironmentFragment represents an environment instance
298type EnvironmentFragment struct {
299	// EnvironmentPropertiesFragment - The properties of the Environment resource
300	*EnvironmentPropertiesFragment `json:"properties,omitempty"`
301	// ID - READ-ONLY; The identifier of the resource.
302	ID *string `json:"id,omitempty"`
303	// Name - READ-ONLY; The name of the resource.
304	Name *string `json:"name,omitempty"`
305	// Type - READ-ONLY; The type of the resource.
306	Type *string `json:"type,omitempty"`
307	// Location - The location of the resource.
308	Location *string `json:"location,omitempty"`
309	// Tags - The tags of the resource.
310	Tags map[string]*string `json:"tags"`
311}
312
313// MarshalJSON is the custom marshaler for EnvironmentFragment.
314func (ef EnvironmentFragment) MarshalJSON() ([]byte, error) {
315	objectMap := make(map[string]interface{})
316	if ef.EnvironmentPropertiesFragment != nil {
317		objectMap["properties"] = ef.EnvironmentPropertiesFragment
318	}
319	if ef.Location != nil {
320		objectMap["location"] = ef.Location
321	}
322	if ef.Tags != nil {
323		objectMap["tags"] = ef.Tags
324	}
325	return json.Marshal(objectMap)
326}
327
328// UnmarshalJSON is the custom unmarshaler for EnvironmentFragment struct.
329func (ef *EnvironmentFragment) UnmarshalJSON(body []byte) error {
330	var m map[string]*json.RawMessage
331	err := json.Unmarshal(body, &m)
332	if err != nil {
333		return err
334	}
335	for k, v := range m {
336		switch k {
337		case "properties":
338			if v != nil {
339				var environmentPropertiesFragment EnvironmentPropertiesFragment
340				err = json.Unmarshal(*v, &environmentPropertiesFragment)
341				if err != nil {
342					return err
343				}
344				ef.EnvironmentPropertiesFragment = &environmentPropertiesFragment
345			}
346		case "id":
347			if v != nil {
348				var ID string
349				err = json.Unmarshal(*v, &ID)
350				if err != nil {
351					return err
352				}
353				ef.ID = &ID
354			}
355		case "name":
356			if v != nil {
357				var name string
358				err = json.Unmarshal(*v, &name)
359				if err != nil {
360					return err
361				}
362				ef.Name = &name
363			}
364		case "type":
365			if v != nil {
366				var typeVar string
367				err = json.Unmarshal(*v, &typeVar)
368				if err != nil {
369					return err
370				}
371				ef.Type = &typeVar
372			}
373		case "location":
374			if v != nil {
375				var location string
376				err = json.Unmarshal(*v, &location)
377				if err != nil {
378					return err
379				}
380				ef.Location = &location
381			}
382		case "tags":
383			if v != nil {
384				var tags map[string]*string
385				err = json.Unmarshal(*v, &tags)
386				if err != nil {
387					return err
388				}
389				ef.Tags = tags
390			}
391		}
392	}
393
394	return nil
395}
396
397// EnvironmentOperationsPayload represents payload for any Environment operations like get, start, stop,
398// connect
399type EnvironmentOperationsPayload struct {
400	// EnvironmentID - The resourceId of the environment
401	EnvironmentID *string `json:"environmentId,omitempty"`
402}
403
404// EnvironmentProperties properties of an environment
405type EnvironmentProperties struct {
406	// ResourceSets - The set of a VM and the setting id it was created for
407	ResourceSets *ResourceSet `json:"resourceSets,omitempty"`
408	// ClaimedByUserObjectID - READ-ONLY; The AAD object Id of the user who has claimed the environment
409	ClaimedByUserObjectID *string `json:"claimedByUserObjectId,omitempty"`
410	// ClaimedByUserPrincipalID - READ-ONLY; The user principal Id of the user who has claimed the environment
411	ClaimedByUserPrincipalID *string `json:"claimedByUserPrincipalId,omitempty"`
412	// ClaimedByUserName - READ-ONLY; The name or email address of the user who has claimed the environment
413	ClaimedByUserName *string `json:"claimedByUserName,omitempty"`
414	// IsClaimed - READ-ONLY; Is the environment claimed or not
415	IsClaimed *bool `json:"isClaimed,omitempty"`
416	// LastKnownPowerState - READ-ONLY; Last known power state of the environment
417	LastKnownPowerState *string `json:"lastKnownPowerState,omitempty"`
418	// NetworkInterface - READ-ONLY; Network details of the environment
419	NetworkInterface *NetworkInterface `json:"networkInterface,omitempty"`
420	// TotalUsage - READ-ONLY; How long the environment has been used by a lab user
421	TotalUsage *string `json:"totalUsage,omitempty"`
422	// PasswordLastReset - READ-ONLY; When the password was last reset on the environment.
423	PasswordLastReset *date.Time `json:"passwordLastReset,omitempty"`
424	// ProvisioningState - The provisioning status of the resource.
425	ProvisioningState *string `json:"provisioningState,omitempty"`
426	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
427	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
428	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
429	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
430}
431
432// EnvironmentPropertiesFragment properties of an environment
433type EnvironmentPropertiesFragment struct {
434	// ResourceSets - The set of a VM and the setting id it was created for
435	ResourceSets *ResourceSetFragment `json:"resourceSets,omitempty"`
436	// ProvisioningState - The provisioning status of the resource.
437	ProvisioningState *string `json:"provisioningState,omitempty"`
438	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
439	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
440}
441
442// EnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
443// operation.
444type EnvironmentsDeleteFuture struct {
445	azure.Future
446}
447
448// Result returns the result of the asynchronous operation.
449// If the operation has not completed it will return an error.
450func (future *EnvironmentsDeleteFuture) Result(client EnvironmentsClient) (ar autorest.Response, err error) {
451	var done bool
452	done, err = future.DoneWithContext(context.Background(), client)
453	if err != nil {
454		err = autorest.NewErrorWithError(err, "labservices.EnvironmentsDeleteFuture", "Result", future.Response(), "Polling failure")
455		return
456	}
457	if !done {
458		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentsDeleteFuture")
459		return
460	}
461	ar.Response = future.Response()
462	return
463}
464
465// EnvironmentSetting represents settings of an environment, from which environment instances would be
466// created
467type EnvironmentSetting struct {
468	autorest.Response `json:"-"`
469	// EnvironmentSettingProperties - The properties of the Environment Setting resource
470	*EnvironmentSettingProperties `json:"properties,omitempty"`
471	// ID - READ-ONLY; The identifier of the resource.
472	ID *string `json:"id,omitempty"`
473	// Name - READ-ONLY; The name of the resource.
474	Name *string `json:"name,omitempty"`
475	// Type - READ-ONLY; The type of the resource.
476	Type *string `json:"type,omitempty"`
477	// Location - The location of the resource.
478	Location *string `json:"location,omitempty"`
479	// Tags - The tags of the resource.
480	Tags map[string]*string `json:"tags"`
481}
482
483// MarshalJSON is the custom marshaler for EnvironmentSetting.
484func (es EnvironmentSetting) MarshalJSON() ([]byte, error) {
485	objectMap := make(map[string]interface{})
486	if es.EnvironmentSettingProperties != nil {
487		objectMap["properties"] = es.EnvironmentSettingProperties
488	}
489	if es.Location != nil {
490		objectMap["location"] = es.Location
491	}
492	if es.Tags != nil {
493		objectMap["tags"] = es.Tags
494	}
495	return json.Marshal(objectMap)
496}
497
498// UnmarshalJSON is the custom unmarshaler for EnvironmentSetting struct.
499func (es *EnvironmentSetting) UnmarshalJSON(body []byte) error {
500	var m map[string]*json.RawMessage
501	err := json.Unmarshal(body, &m)
502	if err != nil {
503		return err
504	}
505	for k, v := range m {
506		switch k {
507		case "properties":
508			if v != nil {
509				var environmentSettingProperties EnvironmentSettingProperties
510				err = json.Unmarshal(*v, &environmentSettingProperties)
511				if err != nil {
512					return err
513				}
514				es.EnvironmentSettingProperties = &environmentSettingProperties
515			}
516		case "id":
517			if v != nil {
518				var ID string
519				err = json.Unmarshal(*v, &ID)
520				if err != nil {
521					return err
522				}
523				es.ID = &ID
524			}
525		case "name":
526			if v != nil {
527				var name string
528				err = json.Unmarshal(*v, &name)
529				if err != nil {
530					return err
531				}
532				es.Name = &name
533			}
534		case "type":
535			if v != nil {
536				var typeVar string
537				err = json.Unmarshal(*v, &typeVar)
538				if err != nil {
539					return err
540				}
541				es.Type = &typeVar
542			}
543		case "location":
544			if v != nil {
545				var location string
546				err = json.Unmarshal(*v, &location)
547				if err != nil {
548					return err
549				}
550				es.Location = &location
551			}
552		case "tags":
553			if v != nil {
554				var tags map[string]*string
555				err = json.Unmarshal(*v, &tags)
556				if err != nil {
557					return err
558				}
559				es.Tags = tags
560			}
561		}
562	}
563
564	return nil
565}
566
567// EnvironmentSettingCreationParameters settings related to creating an environment setting
568type EnvironmentSettingCreationParameters struct {
569	// ResourceSettingCreationParameters - The resource specific settings
570	ResourceSettingCreationParameters *ResourceSettingCreationParameters `json:"resourceSettingCreationParameters,omitempty"`
571}
572
573// EnvironmentSettingFragment represents settings of an environment, from which environment instances would
574// be created
575type EnvironmentSettingFragment struct {
576	// EnvironmentSettingPropertiesFragment - The properties of the Environment Setting resource
577	*EnvironmentSettingPropertiesFragment `json:"properties,omitempty"`
578	// ID - READ-ONLY; The identifier of the resource.
579	ID *string `json:"id,omitempty"`
580	// Name - READ-ONLY; The name of the resource.
581	Name *string `json:"name,omitempty"`
582	// Type - READ-ONLY; The type of the resource.
583	Type *string `json:"type,omitempty"`
584	// Location - The location of the resource.
585	Location *string `json:"location,omitempty"`
586	// Tags - The tags of the resource.
587	Tags map[string]*string `json:"tags"`
588}
589
590// MarshalJSON is the custom marshaler for EnvironmentSettingFragment.
591func (esf EnvironmentSettingFragment) MarshalJSON() ([]byte, error) {
592	objectMap := make(map[string]interface{})
593	if esf.EnvironmentSettingPropertiesFragment != nil {
594		objectMap["properties"] = esf.EnvironmentSettingPropertiesFragment
595	}
596	if esf.Location != nil {
597		objectMap["location"] = esf.Location
598	}
599	if esf.Tags != nil {
600		objectMap["tags"] = esf.Tags
601	}
602	return json.Marshal(objectMap)
603}
604
605// UnmarshalJSON is the custom unmarshaler for EnvironmentSettingFragment struct.
606func (esf *EnvironmentSettingFragment) 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 environmentSettingPropertiesFragment EnvironmentSettingPropertiesFragment
617				err = json.Unmarshal(*v, &environmentSettingPropertiesFragment)
618				if err != nil {
619					return err
620				}
621				esf.EnvironmentSettingPropertiesFragment = &environmentSettingPropertiesFragment
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				esf.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				esf.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				esf.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				esf.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				esf.Tags = tags
667			}
668		}
669	}
670
671	return nil
672}
673
674// EnvironmentSettingProperties properties of an environment setting
675type EnvironmentSettingProperties struct {
676	// PublishingState - READ-ONLY; Describes the readiness of this environment setting. Possible values include: 'Draft', 'Publishing', 'Published', 'PublishFailed', 'Scaling'
677	PublishingState PublishingState `json:"publishingState,omitempty"`
678	// ConfigurationState - Describes the user's progress in configuring their environment setting. Possible values include: 'NotApplicable', 'Completed'
679	ConfigurationState ConfigurationState `json:"configurationState,omitempty"`
680	// Description - Describes the environment and its resource settings
681	Description *string `json:"description,omitempty"`
682	// Title - Brief title describing the environment and its resource settings
683	Title *string `json:"title,omitempty"`
684	// ResourceSettings - The resource specific settings
685	ResourceSettings *ResourceSettings `json:"resourceSettings,omitempty"`
686	// LastChanged - READ-ONLY; Time when the template VM was last changed.
687	LastChanged *date.Time `json:"lastChanged,omitempty"`
688	// LastPublished - READ-ONLY; Time when the template VM was last sent for publishing.
689	LastPublished *date.Time `json:"lastPublished,omitempty"`
690	// ProvisioningState - The provisioning status of the resource.
691	ProvisioningState *string `json:"provisioningState,omitempty"`
692	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
693	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
694	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
695	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
696}
697
698// EnvironmentSettingPropertiesFragment properties of an environment setting
699type EnvironmentSettingPropertiesFragment struct {
700	// ConfigurationState - Describes the user's progress in configuring their environment setting. Possible values include: 'NotApplicable', 'Completed'
701	ConfigurationState ConfigurationState `json:"configurationState,omitempty"`
702	// Description - Describes the environment and its resource settings
703	Description *string `json:"description,omitempty"`
704	// Title - Brief title describing the environment and its resource settings
705	Title *string `json:"title,omitempty"`
706	// ResourceSettings - The resource specific settings
707	ResourceSettings *ResourceSettingsFragment `json:"resourceSettings,omitempty"`
708	// ProvisioningState - The provisioning status of the resource.
709	ProvisioningState *string `json:"provisioningState,omitempty"`
710	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
711	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
712}
713
714// EnvironmentSettingsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
715// long-running operation.
716type EnvironmentSettingsCreateOrUpdateFuture struct {
717	azure.Future
718}
719
720// Result returns the result of the asynchronous operation.
721// If the operation has not completed it will return an error.
722func (future *EnvironmentSettingsCreateOrUpdateFuture) Result(client EnvironmentSettingsClient) (es EnvironmentSetting, err error) {
723	var done bool
724	done, err = future.DoneWithContext(context.Background(), client)
725	if err != nil {
726		err = autorest.NewErrorWithError(err, "labservices.EnvironmentSettingsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
727		return
728	}
729	if !done {
730		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentSettingsCreateOrUpdateFuture")
731		return
732	}
733	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
734	if es.Response.Response, err = future.GetResult(sender); err == nil && es.Response.Response.StatusCode != http.StatusNoContent {
735		es, err = client.CreateOrUpdateResponder(es.Response.Response)
736		if err != nil {
737			err = autorest.NewErrorWithError(err, "labservices.EnvironmentSettingsCreateOrUpdateFuture", "Result", es.Response.Response, "Failure responding to request")
738		}
739	}
740	return
741}
742
743// EnvironmentSettingsDeleteFuture an abstraction for monitoring and retrieving the results of a
744// long-running operation.
745type EnvironmentSettingsDeleteFuture struct {
746	azure.Future
747}
748
749// Result returns the result of the asynchronous operation.
750// If the operation has not completed it will return an error.
751func (future *EnvironmentSettingsDeleteFuture) Result(client EnvironmentSettingsClient) (ar autorest.Response, err error) {
752	var done bool
753	done, err = future.DoneWithContext(context.Background(), client)
754	if err != nil {
755		err = autorest.NewErrorWithError(err, "labservices.EnvironmentSettingsDeleteFuture", "Result", future.Response(), "Polling failure")
756		return
757	}
758	if !done {
759		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentSettingsDeleteFuture")
760		return
761	}
762	ar.Response = future.Response()
763	return
764}
765
766// EnvironmentSettingsStartFuture an abstraction for monitoring and retrieving the results of a
767// long-running operation.
768type EnvironmentSettingsStartFuture struct {
769	azure.Future
770}
771
772// Result returns the result of the asynchronous operation.
773// If the operation has not completed it will return an error.
774func (future *EnvironmentSettingsStartFuture) Result(client EnvironmentSettingsClient) (ar autorest.Response, err error) {
775	var done bool
776	done, err = future.DoneWithContext(context.Background(), client)
777	if err != nil {
778		err = autorest.NewErrorWithError(err, "labservices.EnvironmentSettingsStartFuture", "Result", future.Response(), "Polling failure")
779		return
780	}
781	if !done {
782		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentSettingsStartFuture")
783		return
784	}
785	ar.Response = future.Response()
786	return
787}
788
789// EnvironmentSettingsStopFuture an abstraction for monitoring and retrieving the results of a long-running
790// operation.
791type EnvironmentSettingsStopFuture struct {
792	azure.Future
793}
794
795// Result returns the result of the asynchronous operation.
796// If the operation has not completed it will return an error.
797func (future *EnvironmentSettingsStopFuture) Result(client EnvironmentSettingsClient) (ar autorest.Response, err error) {
798	var done bool
799	done, err = future.DoneWithContext(context.Background(), client)
800	if err != nil {
801		err = autorest.NewErrorWithError(err, "labservices.EnvironmentSettingsStopFuture", "Result", future.Response(), "Polling failure")
802		return
803	}
804	if !done {
805		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentSettingsStopFuture")
806		return
807	}
808	ar.Response = future.Response()
809	return
810}
811
812// EnvironmentSize represents a size category supported by this Lab Account (small, medium or large)
813type EnvironmentSize struct {
814	// Name - The size category. Possible values include: 'Basic', 'Standard', 'Performance'
815	Name ManagedLabVMSize `json:"name,omitempty"`
816	// VMSizes - Represents a set of compute sizes that can serve this given size type
817	VMSizes *[]SizeInfo `json:"vmSizes,omitempty"`
818	// MaxPrice - READ-ONLY; The pay-as-you-go dollar price per hour this size will cost. It does not include discounts and may not reflect the actual price the size will cost. This is the maximum price of all prices within this tier.
819	MaxPrice *decimal.Decimal `json:"maxPrice,omitempty"`
820	// MinNumberOfCores - READ-ONLY; The number of cores a VM of this size has. This is the minimum number of cores within this tier.
821	MinNumberOfCores *int32 `json:"minNumberOfCores,omitempty"`
822	// MinMemory - READ-ONLY; The amount of memory available (in GB). This is the minimum amount of memory within this tier.
823	MinMemory *float64 `json:"minMemory,omitempty"`
824}
825
826// EnvironmentSizeFragment represents a size category supported by this Lab Account (small, medium or
827// large)
828type EnvironmentSizeFragment struct {
829	// Name - The size category. Possible values include: 'Basic', 'Standard', 'Performance'
830	Name ManagedLabVMSize `json:"name,omitempty"`
831	// VMSizes - Represents a set of compute sizes that can serve this given size type
832	VMSizes *[]SizeInfoFragment `json:"vmSizes,omitempty"`
833}
834
835// EnvironmentsResetPasswordFuture an abstraction for monitoring and retrieving the results of a
836// long-running operation.
837type EnvironmentsResetPasswordFuture struct {
838	azure.Future
839}
840
841// Result returns the result of the asynchronous operation.
842// If the operation has not completed it will return an error.
843func (future *EnvironmentsResetPasswordFuture) Result(client EnvironmentsClient) (ar autorest.Response, err error) {
844	var done bool
845	done, err = future.DoneWithContext(context.Background(), client)
846	if err != nil {
847		err = autorest.NewErrorWithError(err, "labservices.EnvironmentsResetPasswordFuture", "Result", future.Response(), "Polling failure")
848		return
849	}
850	if !done {
851		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentsResetPasswordFuture")
852		return
853	}
854	ar.Response = future.Response()
855	return
856}
857
858// EnvironmentsStartFuture an abstraction for monitoring and retrieving the results of a long-running
859// operation.
860type EnvironmentsStartFuture struct {
861	azure.Future
862}
863
864// Result returns the result of the asynchronous operation.
865// If the operation has not completed it will return an error.
866func (future *EnvironmentsStartFuture) Result(client EnvironmentsClient) (ar autorest.Response, err error) {
867	var done bool
868	done, err = future.DoneWithContext(context.Background(), client)
869	if err != nil {
870		err = autorest.NewErrorWithError(err, "labservices.EnvironmentsStartFuture", "Result", future.Response(), "Polling failure")
871		return
872	}
873	if !done {
874		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentsStartFuture")
875		return
876	}
877	ar.Response = future.Response()
878	return
879}
880
881// EnvironmentsStopFuture an abstraction for monitoring and retrieving the results of a long-running
882// operation.
883type EnvironmentsStopFuture struct {
884	azure.Future
885}
886
887// Result returns the result of the asynchronous operation.
888// If the operation has not completed it will return an error.
889func (future *EnvironmentsStopFuture) Result(client EnvironmentsClient) (ar autorest.Response, err error) {
890	var done bool
891	done, err = future.DoneWithContext(context.Background(), client)
892	if err != nil {
893		err = autorest.NewErrorWithError(err, "labservices.EnvironmentsStopFuture", "Result", future.Response(), "Polling failure")
894		return
895	}
896	if !done {
897		err = azure.NewAsyncOpIncompleteError("labservices.EnvironmentsStopFuture")
898		return
899	}
900	ar.Response = future.Response()
901	return
902}
903
904// GalleryImage represents an image from the Azure Marketplace
905type GalleryImage struct {
906	autorest.Response `json:"-"`
907	// GalleryImageProperties - The gallery image properties
908	*GalleryImageProperties `json:"properties,omitempty"`
909	// ID - READ-ONLY; The identifier of the resource.
910	ID *string `json:"id,omitempty"`
911	// Name - READ-ONLY; The name of the resource.
912	Name *string `json:"name,omitempty"`
913	// Type - READ-ONLY; The type of the resource.
914	Type *string `json:"type,omitempty"`
915	// Location - The location of the resource.
916	Location *string `json:"location,omitempty"`
917	// Tags - The tags of the resource.
918	Tags map[string]*string `json:"tags"`
919}
920
921// MarshalJSON is the custom marshaler for GalleryImage.
922func (gi GalleryImage) MarshalJSON() ([]byte, error) {
923	objectMap := make(map[string]interface{})
924	if gi.GalleryImageProperties != nil {
925		objectMap["properties"] = gi.GalleryImageProperties
926	}
927	if gi.Location != nil {
928		objectMap["location"] = gi.Location
929	}
930	if gi.Tags != nil {
931		objectMap["tags"] = gi.Tags
932	}
933	return json.Marshal(objectMap)
934}
935
936// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
937func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
938	var m map[string]*json.RawMessage
939	err := json.Unmarshal(body, &m)
940	if err != nil {
941		return err
942	}
943	for k, v := range m {
944		switch k {
945		case "properties":
946			if v != nil {
947				var galleryImageProperties GalleryImageProperties
948				err = json.Unmarshal(*v, &galleryImageProperties)
949				if err != nil {
950					return err
951				}
952				gi.GalleryImageProperties = &galleryImageProperties
953			}
954		case "id":
955			if v != nil {
956				var ID string
957				err = json.Unmarshal(*v, &ID)
958				if err != nil {
959					return err
960				}
961				gi.ID = &ID
962			}
963		case "name":
964			if v != nil {
965				var name string
966				err = json.Unmarshal(*v, &name)
967				if err != nil {
968					return err
969				}
970				gi.Name = &name
971			}
972		case "type":
973			if v != nil {
974				var typeVar string
975				err = json.Unmarshal(*v, &typeVar)
976				if err != nil {
977					return err
978				}
979				gi.Type = &typeVar
980			}
981		case "location":
982			if v != nil {
983				var location string
984				err = json.Unmarshal(*v, &location)
985				if err != nil {
986					return err
987				}
988				gi.Location = &location
989			}
990		case "tags":
991			if v != nil {
992				var tags map[string]*string
993				err = json.Unmarshal(*v, &tags)
994				if err != nil {
995					return err
996				}
997				gi.Tags = tags
998			}
999		}
1000	}
1001
1002	return nil
1003}
1004
1005// GalleryImageFragment represents an image from the Azure Marketplace
1006type GalleryImageFragment struct {
1007	// GalleryImagePropertiesFragment - The gallery image properties
1008	*GalleryImagePropertiesFragment `json:"properties,omitempty"`
1009	// ID - READ-ONLY; The identifier of the resource.
1010	ID *string `json:"id,omitempty"`
1011	// Name - READ-ONLY; The name of the resource.
1012	Name *string `json:"name,omitempty"`
1013	// Type - READ-ONLY; The type of the resource.
1014	Type *string `json:"type,omitempty"`
1015	// Location - The location of the resource.
1016	Location *string `json:"location,omitempty"`
1017	// Tags - The tags of the resource.
1018	Tags map[string]*string `json:"tags"`
1019}
1020
1021// MarshalJSON is the custom marshaler for GalleryImageFragment.
1022func (gifVar GalleryImageFragment) MarshalJSON() ([]byte, error) {
1023	objectMap := make(map[string]interface{})
1024	if gifVar.GalleryImagePropertiesFragment != nil {
1025		objectMap["properties"] = gifVar.GalleryImagePropertiesFragment
1026	}
1027	if gifVar.Location != nil {
1028		objectMap["location"] = gifVar.Location
1029	}
1030	if gifVar.Tags != nil {
1031		objectMap["tags"] = gifVar.Tags
1032	}
1033	return json.Marshal(objectMap)
1034}
1035
1036// UnmarshalJSON is the custom unmarshaler for GalleryImageFragment struct.
1037func (gifVar *GalleryImageFragment) UnmarshalJSON(body []byte) error {
1038	var m map[string]*json.RawMessage
1039	err := json.Unmarshal(body, &m)
1040	if err != nil {
1041		return err
1042	}
1043	for k, v := range m {
1044		switch k {
1045		case "properties":
1046			if v != nil {
1047				var galleryImagePropertiesFragment GalleryImagePropertiesFragment
1048				err = json.Unmarshal(*v, &galleryImagePropertiesFragment)
1049				if err != nil {
1050					return err
1051				}
1052				gifVar.GalleryImagePropertiesFragment = &galleryImagePropertiesFragment
1053			}
1054		case "id":
1055			if v != nil {
1056				var ID string
1057				err = json.Unmarshal(*v, &ID)
1058				if err != nil {
1059					return err
1060				}
1061				gifVar.ID = &ID
1062			}
1063		case "name":
1064			if v != nil {
1065				var name string
1066				err = json.Unmarshal(*v, &name)
1067				if err != nil {
1068					return err
1069				}
1070				gifVar.Name = &name
1071			}
1072		case "type":
1073			if v != nil {
1074				var typeVar string
1075				err = json.Unmarshal(*v, &typeVar)
1076				if err != nil {
1077					return err
1078				}
1079				gifVar.Type = &typeVar
1080			}
1081		case "location":
1082			if v != nil {
1083				var location string
1084				err = json.Unmarshal(*v, &location)
1085				if err != nil {
1086					return err
1087				}
1088				gifVar.Location = &location
1089			}
1090		case "tags":
1091			if v != nil {
1092				var tags map[string]*string
1093				err = json.Unmarshal(*v, &tags)
1094				if err != nil {
1095					return err
1096				}
1097				gifVar.Tags = tags
1098			}
1099		}
1100	}
1101
1102	return nil
1103}
1104
1105// GalleryImageProperties the gallery image properties
1106type GalleryImageProperties struct {
1107	// Author - READ-ONLY; The author of the gallery image.
1108	Author *string `json:"author,omitempty"`
1109	// CreatedDate - READ-ONLY; The creation date of the gallery image.
1110	CreatedDate *date.Time `json:"createdDate,omitempty"`
1111	// Description - READ-ONLY; The description of the gallery image.
1112	Description *string `json:"description,omitempty"`
1113	// ImageReference - READ-ONLY; The image reference of the gallery image.
1114	ImageReference *GalleryImageReference `json:"imageReference,omitempty"`
1115	// Icon - READ-ONLY; The icon of the gallery image.
1116	Icon *string `json:"icon,omitempty"`
1117	// IsEnabled - Indicates whether this gallery image is enabled.
1118	IsEnabled *bool `json:"isEnabled,omitempty"`
1119	// IsOverride - Indicates whether this gallery has been overridden for this lab account
1120	IsOverride *bool `json:"isOverride,omitempty"`
1121	// PlanID - READ-ONLY; The third party plan that applies to this image
1122	PlanID *string `json:"planId,omitempty"`
1123	// IsPlanAuthorized - Indicates if the plan has been authorized for programmatic deployment.
1124	IsPlanAuthorized *bool `json:"isPlanAuthorized,omitempty"`
1125	// ProvisioningState - The provisioning status of the resource.
1126	ProvisioningState *string `json:"provisioningState,omitempty"`
1127	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
1128	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1129	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
1130	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
1131}
1132
1133// GalleryImagePropertiesFragment the gallery image properties
1134type GalleryImagePropertiesFragment struct {
1135	// IsEnabled - Indicates whether this gallery image is enabled.
1136	IsEnabled *bool `json:"isEnabled,omitempty"`
1137	// IsOverride - Indicates whether this gallery has been overridden for this lab account
1138	IsOverride *bool `json:"isOverride,omitempty"`
1139	// IsPlanAuthorized - Indicates if the plan has been authorized for programmatic deployment.
1140	IsPlanAuthorized *bool `json:"isPlanAuthorized,omitempty"`
1141	// ProvisioningState - The provisioning status of the resource.
1142	ProvisioningState *string `json:"provisioningState,omitempty"`
1143	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
1144	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1145}
1146
1147// GalleryImageReference the reference information for an Azure Marketplace image.
1148type GalleryImageReference struct {
1149	// Offer - The offer of the gallery image.
1150	Offer *string `json:"offer,omitempty"`
1151	// Publisher - The publisher of the gallery image.
1152	Publisher *string `json:"publisher,omitempty"`
1153	// Sku - The SKU of the gallery image.
1154	Sku *string `json:"sku,omitempty"`
1155	// OsType - The OS type of the gallery image.
1156	OsType *string `json:"osType,omitempty"`
1157	// Version - The version of the gallery image.
1158	Version *string `json:"version,omitempty"`
1159}
1160
1161// GalleryImageReferenceFragment the reference information for an Azure Marketplace image.
1162type GalleryImageReferenceFragment struct {
1163	// Offer - The offer of the gallery image.
1164	Offer *string `json:"offer,omitempty"`
1165	// Publisher - The publisher of the gallery image.
1166	Publisher *string `json:"publisher,omitempty"`
1167	// Sku - The SKU of the gallery image.
1168	Sku *string `json:"sku,omitempty"`
1169	// OsType - The OS type of the gallery image.
1170	OsType *string `json:"osType,omitempty"`
1171	// Version - The version of the gallery image.
1172	Version *string `json:"version,omitempty"`
1173}
1174
1175// GetEnvironmentResponse represents the environments details
1176type GetEnvironmentResponse struct {
1177	autorest.Response `json:"-"`
1178	// Environment - READ-ONLY; Details of the environment
1179	Environment *EnvironmentDetails `json:"environment,omitempty"`
1180}
1181
1182// GetPersonalPreferencesResponse represents the PersonalPreferences for the user
1183type GetPersonalPreferencesResponse struct {
1184	autorest.Response `json:"-"`
1185	// ID - Id to be used by the cache orchestrator
1186	ID *string `json:"id,omitempty"`
1187	// FavoriteLabResourceIds - Array of favorite lab resource ids
1188	FavoriteLabResourceIds *[]string `json:"favoriteLabResourceIds,omitempty"`
1189}
1190
1191// GetRegionalAvailabilityResponse the response model from the GetRegionalAvailability action
1192type GetRegionalAvailabilityResponse struct {
1193	autorest.Response `json:"-"`
1194	// RegionalAvailability - Availability information for different size categories per region
1195	RegionalAvailability *[]RegionalAvailability `json:"regionalAvailability,omitempty"`
1196}
1197
1198// GlobalUsersResetPasswordFuture an abstraction for monitoring and retrieving the results of a
1199// long-running operation.
1200type GlobalUsersResetPasswordFuture struct {
1201	azure.Future
1202}
1203
1204// Result returns the result of the asynchronous operation.
1205// If the operation has not completed it will return an error.
1206func (future *GlobalUsersResetPasswordFuture) Result(client GlobalUsersClient) (ar autorest.Response, err error) {
1207	var done bool
1208	done, err = future.DoneWithContext(context.Background(), client)
1209	if err != nil {
1210		err = autorest.NewErrorWithError(err, "labservices.GlobalUsersResetPasswordFuture", "Result", future.Response(), "Polling failure")
1211		return
1212	}
1213	if !done {
1214		err = azure.NewAsyncOpIncompleteError("labservices.GlobalUsersResetPasswordFuture")
1215		return
1216	}
1217	ar.Response = future.Response()
1218	return
1219}
1220
1221// GlobalUsersStartEnvironmentFuture an abstraction for monitoring and retrieving the results of a
1222// long-running operation.
1223type GlobalUsersStartEnvironmentFuture struct {
1224	azure.Future
1225}
1226
1227// Result returns the result of the asynchronous operation.
1228// If the operation has not completed it will return an error.
1229func (future *GlobalUsersStartEnvironmentFuture) Result(client GlobalUsersClient) (ar autorest.Response, err error) {
1230	var done bool
1231	done, err = future.DoneWithContext(context.Background(), client)
1232	if err != nil {
1233		err = autorest.NewErrorWithError(err, "labservices.GlobalUsersStartEnvironmentFuture", "Result", future.Response(), "Polling failure")
1234		return
1235	}
1236	if !done {
1237		err = azure.NewAsyncOpIncompleteError("labservices.GlobalUsersStartEnvironmentFuture")
1238		return
1239	}
1240	ar.Response = future.Response()
1241	return
1242}
1243
1244// GlobalUsersStopEnvironmentFuture an abstraction for monitoring and retrieving the results of a
1245// long-running operation.
1246type GlobalUsersStopEnvironmentFuture struct {
1247	azure.Future
1248}
1249
1250// Result returns the result of the asynchronous operation.
1251// If the operation has not completed it will return an error.
1252func (future *GlobalUsersStopEnvironmentFuture) Result(client GlobalUsersClient) (ar autorest.Response, err error) {
1253	var done bool
1254	done, err = future.DoneWithContext(context.Background(), client)
1255	if err != nil {
1256		err = autorest.NewErrorWithError(err, "labservices.GlobalUsersStopEnvironmentFuture", "Result", future.Response(), "Polling failure")
1257		return
1258	}
1259	if !done {
1260		err = azure.NewAsyncOpIncompleteError("labservices.GlobalUsersStopEnvironmentFuture")
1261		return
1262	}
1263	ar.Response = future.Response()
1264	return
1265}
1266
1267// Lab represents a lab.
1268type Lab struct {
1269	autorest.Response `json:"-"`
1270	// LabProperties - The properties of the resource.
1271	*LabProperties `json:"properties,omitempty"`
1272	// ID - READ-ONLY; The identifier of the resource.
1273	ID *string `json:"id,omitempty"`
1274	// Name - READ-ONLY; The name of the resource.
1275	Name *string `json:"name,omitempty"`
1276	// Type - READ-ONLY; The type of the resource.
1277	Type *string `json:"type,omitempty"`
1278	// Location - The location of the resource.
1279	Location *string `json:"location,omitempty"`
1280	// Tags - The tags of the resource.
1281	Tags map[string]*string `json:"tags"`
1282}
1283
1284// MarshalJSON is the custom marshaler for Lab.
1285func (l Lab) MarshalJSON() ([]byte, error) {
1286	objectMap := make(map[string]interface{})
1287	if l.LabProperties != nil {
1288		objectMap["properties"] = l.LabProperties
1289	}
1290	if l.Location != nil {
1291		objectMap["location"] = l.Location
1292	}
1293	if l.Tags != nil {
1294		objectMap["tags"] = l.Tags
1295	}
1296	return json.Marshal(objectMap)
1297}
1298
1299// UnmarshalJSON is the custom unmarshaler for Lab struct.
1300func (l *Lab) UnmarshalJSON(body []byte) error {
1301	var m map[string]*json.RawMessage
1302	err := json.Unmarshal(body, &m)
1303	if err != nil {
1304		return err
1305	}
1306	for k, v := range m {
1307		switch k {
1308		case "properties":
1309			if v != nil {
1310				var labProperties LabProperties
1311				err = json.Unmarshal(*v, &labProperties)
1312				if err != nil {
1313					return err
1314				}
1315				l.LabProperties = &labProperties
1316			}
1317		case "id":
1318			if v != nil {
1319				var ID string
1320				err = json.Unmarshal(*v, &ID)
1321				if err != nil {
1322					return err
1323				}
1324				l.ID = &ID
1325			}
1326		case "name":
1327			if v != nil {
1328				var name string
1329				err = json.Unmarshal(*v, &name)
1330				if err != nil {
1331					return err
1332				}
1333				l.Name = &name
1334			}
1335		case "type":
1336			if v != nil {
1337				var typeVar string
1338				err = json.Unmarshal(*v, &typeVar)
1339				if err != nil {
1340					return err
1341				}
1342				l.Type = &typeVar
1343			}
1344		case "location":
1345			if v != nil {
1346				var location string
1347				err = json.Unmarshal(*v, &location)
1348				if err != nil {
1349					return err
1350				}
1351				l.Location = &location
1352			}
1353		case "tags":
1354			if v != nil {
1355				var tags map[string]*string
1356				err = json.Unmarshal(*v, &tags)
1357				if err != nil {
1358					return err
1359				}
1360				l.Tags = tags
1361			}
1362		}
1363	}
1364
1365	return nil
1366}
1367
1368// LabAccount represents a lab account.
1369type LabAccount struct {
1370	autorest.Response `json:"-"`
1371	// LabAccountProperties - The properties of the resource.
1372	*LabAccountProperties `json:"properties,omitempty"`
1373	// ID - READ-ONLY; The identifier of the resource.
1374	ID *string `json:"id,omitempty"`
1375	// Name - READ-ONLY; The name of the resource.
1376	Name *string `json:"name,omitempty"`
1377	// Type - READ-ONLY; The type of the resource.
1378	Type *string `json:"type,omitempty"`
1379	// Location - The location of the resource.
1380	Location *string `json:"location,omitempty"`
1381	// Tags - The tags of the resource.
1382	Tags map[string]*string `json:"tags"`
1383}
1384
1385// MarshalJSON is the custom marshaler for LabAccount.
1386func (la LabAccount) MarshalJSON() ([]byte, error) {
1387	objectMap := make(map[string]interface{})
1388	if la.LabAccountProperties != nil {
1389		objectMap["properties"] = la.LabAccountProperties
1390	}
1391	if la.Location != nil {
1392		objectMap["location"] = la.Location
1393	}
1394	if la.Tags != nil {
1395		objectMap["tags"] = la.Tags
1396	}
1397	return json.Marshal(objectMap)
1398}
1399
1400// UnmarshalJSON is the custom unmarshaler for LabAccount struct.
1401func (la *LabAccount) UnmarshalJSON(body []byte) error {
1402	var m map[string]*json.RawMessage
1403	err := json.Unmarshal(body, &m)
1404	if err != nil {
1405		return err
1406	}
1407	for k, v := range m {
1408		switch k {
1409		case "properties":
1410			if v != nil {
1411				var labAccountProperties LabAccountProperties
1412				err = json.Unmarshal(*v, &labAccountProperties)
1413				if err != nil {
1414					return err
1415				}
1416				la.LabAccountProperties = &labAccountProperties
1417			}
1418		case "id":
1419			if v != nil {
1420				var ID string
1421				err = json.Unmarshal(*v, &ID)
1422				if err != nil {
1423					return err
1424				}
1425				la.ID = &ID
1426			}
1427		case "name":
1428			if v != nil {
1429				var name string
1430				err = json.Unmarshal(*v, &name)
1431				if err != nil {
1432					return err
1433				}
1434				la.Name = &name
1435			}
1436		case "type":
1437			if v != nil {
1438				var typeVar string
1439				err = json.Unmarshal(*v, &typeVar)
1440				if err != nil {
1441					return err
1442				}
1443				la.Type = &typeVar
1444			}
1445		case "location":
1446			if v != nil {
1447				var location string
1448				err = json.Unmarshal(*v, &location)
1449				if err != nil {
1450					return err
1451				}
1452				la.Location = &location
1453			}
1454		case "tags":
1455			if v != nil {
1456				var tags map[string]*string
1457				err = json.Unmarshal(*v, &tags)
1458				if err != nil {
1459					return err
1460				}
1461				la.Tags = tags
1462			}
1463		}
1464	}
1465
1466	return nil
1467}
1468
1469// LabAccountFragment represents a lab account.
1470type LabAccountFragment struct {
1471	// LabAccountPropertiesFragment - The properties of the resource.
1472	*LabAccountPropertiesFragment `json:"properties,omitempty"`
1473	// ID - READ-ONLY; The identifier of the resource.
1474	ID *string `json:"id,omitempty"`
1475	// Name - READ-ONLY; The name of the resource.
1476	Name *string `json:"name,omitempty"`
1477	// Type - READ-ONLY; The type of the resource.
1478	Type *string `json:"type,omitempty"`
1479	// Location - The location of the resource.
1480	Location *string `json:"location,omitempty"`
1481	// Tags - The tags of the resource.
1482	Tags map[string]*string `json:"tags"`
1483}
1484
1485// MarshalJSON is the custom marshaler for LabAccountFragment.
1486func (laf LabAccountFragment) MarshalJSON() ([]byte, error) {
1487	objectMap := make(map[string]interface{})
1488	if laf.LabAccountPropertiesFragment != nil {
1489		objectMap["properties"] = laf.LabAccountPropertiesFragment
1490	}
1491	if laf.Location != nil {
1492		objectMap["location"] = laf.Location
1493	}
1494	if laf.Tags != nil {
1495		objectMap["tags"] = laf.Tags
1496	}
1497	return json.Marshal(objectMap)
1498}
1499
1500// UnmarshalJSON is the custom unmarshaler for LabAccountFragment struct.
1501func (laf *LabAccountFragment) UnmarshalJSON(body []byte) error {
1502	var m map[string]*json.RawMessage
1503	err := json.Unmarshal(body, &m)
1504	if err != nil {
1505		return err
1506	}
1507	for k, v := range m {
1508		switch k {
1509		case "properties":
1510			if v != nil {
1511				var labAccountPropertiesFragment LabAccountPropertiesFragment
1512				err = json.Unmarshal(*v, &labAccountPropertiesFragment)
1513				if err != nil {
1514					return err
1515				}
1516				laf.LabAccountPropertiesFragment = &labAccountPropertiesFragment
1517			}
1518		case "id":
1519			if v != nil {
1520				var ID string
1521				err = json.Unmarshal(*v, &ID)
1522				if err != nil {
1523					return err
1524				}
1525				laf.ID = &ID
1526			}
1527		case "name":
1528			if v != nil {
1529				var name string
1530				err = json.Unmarshal(*v, &name)
1531				if err != nil {
1532					return err
1533				}
1534				laf.Name = &name
1535			}
1536		case "type":
1537			if v != nil {
1538				var typeVar string
1539				err = json.Unmarshal(*v, &typeVar)
1540				if err != nil {
1541					return err
1542				}
1543				laf.Type = &typeVar
1544			}
1545		case "location":
1546			if v != nil {
1547				var location string
1548				err = json.Unmarshal(*v, &location)
1549				if err != nil {
1550					return err
1551				}
1552				laf.Location = &location
1553			}
1554		case "tags":
1555			if v != nil {
1556				var tags map[string]*string
1557				err = json.Unmarshal(*v, &tags)
1558				if err != nil {
1559					return err
1560				}
1561				laf.Tags = tags
1562			}
1563		}
1564	}
1565
1566	return nil
1567}
1568
1569// LabAccountProperties properties of a Lab Account.
1570type LabAccountProperties struct {
1571	// SizeConfiguration - READ-ONLY; Represents the size configuration under the lab account
1572	SizeConfiguration *SizeConfigurationProperties `json:"sizeConfiguration,omitempty"`
1573	// EnabledRegionSelection - Represents if region selection is enabled
1574	EnabledRegionSelection *bool `json:"enabledRegionSelection,omitempty"`
1575	// ProvisioningState - The provisioning status of the resource.
1576	ProvisioningState *string `json:"provisioningState,omitempty"`
1577	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
1578	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1579	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
1580	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
1581}
1582
1583// LabAccountPropertiesFragment properties of a Lab Account.
1584type LabAccountPropertiesFragment struct {
1585	// EnabledRegionSelection - Represents if region selection is enabled
1586	EnabledRegionSelection *bool `json:"enabledRegionSelection,omitempty"`
1587	// ProvisioningState - The provisioning status of the resource.
1588	ProvisioningState *string `json:"provisioningState,omitempty"`
1589	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
1590	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1591}
1592
1593// LabAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1594// operation.
1595type LabAccountsDeleteFuture struct {
1596	azure.Future
1597}
1598
1599// Result returns the result of the asynchronous operation.
1600// If the operation has not completed it will return an error.
1601func (future *LabAccountsDeleteFuture) Result(client LabAccountsClient) (ar autorest.Response, err error) {
1602	var done bool
1603	done, err = future.DoneWithContext(context.Background(), client)
1604	if err != nil {
1605		err = autorest.NewErrorWithError(err, "labservices.LabAccountsDeleteFuture", "Result", future.Response(), "Polling failure")
1606		return
1607	}
1608	if !done {
1609		err = azure.NewAsyncOpIncompleteError("labservices.LabAccountsDeleteFuture")
1610		return
1611	}
1612	ar.Response = future.Response()
1613	return
1614}
1615
1616// LabCreationParameters settings related to creating a lab
1617type LabCreationParameters struct {
1618	// MaxUsersInLab - Maximum number of users allowed in the lab.
1619	MaxUsersInLab *int32 `json:"maxUsersInLab,omitempty"`
1620}
1621
1622// LabDetails this represents the details about a lab that the User is in, and its state.
1623type LabDetails struct {
1624	// Name - Name of the lab
1625	Name *string `json:"name,omitempty"`
1626	// ProvisioningState - The provisioning state of the lab.
1627	ProvisioningState *string `json:"provisioningState,omitempty"`
1628	// ID - The Id of the lab.
1629	ID *string `json:"id,omitempty"`
1630	// UsageQuota - READ-ONLY; The maximum duration a user can use a VM in this lab.
1631	UsageQuota *string `json:"usageQuota,omitempty"`
1632}
1633
1634// LabFragment represents a lab.
1635type LabFragment struct {
1636	// LabPropertiesFragment - The properties of the resource.
1637	*LabPropertiesFragment `json:"properties,omitempty"`
1638	// ID - READ-ONLY; The identifier of the resource.
1639	ID *string `json:"id,omitempty"`
1640	// Name - READ-ONLY; The name of the resource.
1641	Name *string `json:"name,omitempty"`
1642	// Type - READ-ONLY; The type of the resource.
1643	Type *string `json:"type,omitempty"`
1644	// Location - The location of the resource.
1645	Location *string `json:"location,omitempty"`
1646	// Tags - The tags of the resource.
1647	Tags map[string]*string `json:"tags"`
1648}
1649
1650// MarshalJSON is the custom marshaler for LabFragment.
1651func (lf LabFragment) MarshalJSON() ([]byte, error) {
1652	objectMap := make(map[string]interface{})
1653	if lf.LabPropertiesFragment != nil {
1654		objectMap["properties"] = lf.LabPropertiesFragment
1655	}
1656	if lf.Location != nil {
1657		objectMap["location"] = lf.Location
1658	}
1659	if lf.Tags != nil {
1660		objectMap["tags"] = lf.Tags
1661	}
1662	return json.Marshal(objectMap)
1663}
1664
1665// UnmarshalJSON is the custom unmarshaler for LabFragment struct.
1666func (lf *LabFragment) UnmarshalJSON(body []byte) error {
1667	var m map[string]*json.RawMessage
1668	err := json.Unmarshal(body, &m)
1669	if err != nil {
1670		return err
1671	}
1672	for k, v := range m {
1673		switch k {
1674		case "properties":
1675			if v != nil {
1676				var labPropertiesFragment LabPropertiesFragment
1677				err = json.Unmarshal(*v, &labPropertiesFragment)
1678				if err != nil {
1679					return err
1680				}
1681				lf.LabPropertiesFragment = &labPropertiesFragment
1682			}
1683		case "id":
1684			if v != nil {
1685				var ID string
1686				err = json.Unmarshal(*v, &ID)
1687				if err != nil {
1688					return err
1689				}
1690				lf.ID = &ID
1691			}
1692		case "name":
1693			if v != nil {
1694				var name string
1695				err = json.Unmarshal(*v, &name)
1696				if err != nil {
1697					return err
1698				}
1699				lf.Name = &name
1700			}
1701		case "type":
1702			if v != nil {
1703				var typeVar string
1704				err = json.Unmarshal(*v, &typeVar)
1705				if err != nil {
1706					return err
1707				}
1708				lf.Type = &typeVar
1709			}
1710		case "location":
1711			if v != nil {
1712				var location string
1713				err = json.Unmarshal(*v, &location)
1714				if err != nil {
1715					return err
1716				}
1717				lf.Location = &location
1718			}
1719		case "tags":
1720			if v != nil {
1721				var tags map[string]*string
1722				err = json.Unmarshal(*v, &tags)
1723				if err != nil {
1724					return err
1725				}
1726				lf.Tags = tags
1727			}
1728		}
1729	}
1730
1731	return nil
1732}
1733
1734// LabProperties properties of a Lab.
1735type LabProperties struct {
1736	// MaxUsersInLab - Maximum number of users allowed in the lab.
1737	MaxUsersInLab *int32 `json:"maxUsersInLab,omitempty"`
1738	// UserQuota - READ-ONLY; Maximum value MaxUsersInLab can be set to, as specified by the service
1739	UserQuota *int32 `json:"userQuota,omitempty"`
1740	// InvitationCode - READ-ONLY; Invitation code that users can use to join a lab.
1741	InvitationCode *string `json:"invitationCode,omitempty"`
1742	// CreatedByObjectID - READ-ONLY; Object id of the user that created the lab.
1743	CreatedByObjectID *string `json:"createdByObjectId,omitempty"`
1744	// UsageQuota - Maximum duration a user can use an environment for in the lab.
1745	UsageQuota *string `json:"usageQuota,omitempty"`
1746	// UserAccessMode - Lab user access mode (open to all vs. restricted to those listed on the lab). Possible values include: 'Restricted', 'Open'
1747	UserAccessMode LabUserAccessMode `json:"userAccessMode,omitempty"`
1748	// CreatedByUserPrincipalName - READ-ONLY; Lab creator name
1749	CreatedByUserPrincipalName *string `json:"createdByUserPrincipalName,omitempty"`
1750	// CreatedDate - READ-ONLY; Creation date for the lab
1751	CreatedDate *date.Time `json:"createdDate,omitempty"`
1752	// ProvisioningState - The provisioning status of the resource.
1753	ProvisioningState *string `json:"provisioningState,omitempty"`
1754	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
1755	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1756	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
1757	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
1758}
1759
1760// LabPropertiesFragment properties of a Lab.
1761type LabPropertiesFragment struct {
1762	// MaxUsersInLab - Maximum number of users allowed in the lab.
1763	MaxUsersInLab *int32 `json:"maxUsersInLab,omitempty"`
1764	// UsageQuota - Maximum duration a user can use an environment for in the lab.
1765	UsageQuota *string `json:"usageQuota,omitempty"`
1766	// UserAccessMode - Lab user access mode (open to all vs. restricted to those listed on the lab). Possible values include: 'Restricted', 'Open'
1767	UserAccessMode LabUserAccessMode `json:"userAccessMode,omitempty"`
1768	// ProvisioningState - The provisioning status of the resource.
1769	ProvisioningState *string `json:"provisioningState,omitempty"`
1770	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
1771	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
1772}
1773
1774// LabsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
1775type LabsDeleteFuture struct {
1776	azure.Future
1777}
1778
1779// Result returns the result of the asynchronous operation.
1780// If the operation has not completed it will return an error.
1781func (future *LabsDeleteFuture) Result(client LabsClient) (ar autorest.Response, err error) {
1782	var done bool
1783	done, err = future.DoneWithContext(context.Background(), client)
1784	if err != nil {
1785		err = autorest.NewErrorWithError(err, "labservices.LabsDeleteFuture", "Result", future.Response(), "Polling failure")
1786		return
1787	}
1788	if !done {
1789		err = azure.NewAsyncOpIncompleteError("labservices.LabsDeleteFuture")
1790		return
1791	}
1792	ar.Response = future.Response()
1793	return
1794}
1795
1796// LatestOperationResult details of the status of an operation.
1797type LatestOperationResult struct {
1798	// Status - READ-ONLY; The current status of the operation.
1799	Status *string `json:"status,omitempty"`
1800	// ErrorCode - READ-ONLY; Error code on failure.
1801	ErrorCode *string `json:"errorCode,omitempty"`
1802	// ErrorMessage - READ-ONLY; The error message.
1803	ErrorMessage *string `json:"errorMessage,omitempty"`
1804	// RequestURI - READ-ONLY; Request URI of the operation.
1805	RequestURI *string `json:"requestUri,omitempty"`
1806	// HTTPMethod - READ-ONLY; The HttpMethod - PUT/POST/DELETE for the operation.
1807	HTTPMethod *string `json:"httpMethod,omitempty"`
1808	// OperationURL - READ-ONLY; The URL to use to check long-running operation status
1809	OperationURL *string `json:"operationUrl,omitempty"`
1810}
1811
1812// ListEnvironmentsPayload represents the payload to list environments owned by a user
1813type ListEnvironmentsPayload struct {
1814	// LabID - The resource Id of the lab
1815	LabID *string `json:"labId,omitempty"`
1816}
1817
1818// ListEnvironmentsResponse represents the list of environments owned by a user
1819type ListEnvironmentsResponse struct {
1820	autorest.Response `json:"-"`
1821	// Environments - List of all the environments
1822	Environments *[]EnvironmentDetails `json:"environments,omitempty"`
1823}
1824
1825// ListLabsResponse lists the labs owned by a user
1826type ListLabsResponse struct {
1827	autorest.Response `json:"-"`
1828	// Labs - List of all the labs
1829	Labs *[]LabDetails `json:"labs,omitempty"`
1830}
1831
1832// NetworkInterface network details of the environment
1833type NetworkInterface struct {
1834	// PrivateIPAddress - READ-ONLY; PrivateIp address of the Compute VM
1835	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
1836	// SSHAuthority - READ-ONLY; Connection information for Linux
1837	SSHAuthority *string `json:"sshAuthority,omitempty"`
1838	// RdpAuthority - READ-ONLY; Connection information for Windows
1839	RdpAuthority *string `json:"rdpAuthority,omitempty"`
1840	// Username - READ-ONLY; Username of the VM
1841	Username *string `json:"username,omitempty"`
1842}
1843
1844// OperationBatchStatusPayload payload to get the status of an operation
1845type OperationBatchStatusPayload struct {
1846	// Urls - The operation url of long running operation
1847	Urls *[]string `json:"urls,omitempty"`
1848}
1849
1850// OperationBatchStatusResponse status Details of the long running operation for an environment
1851type OperationBatchStatusResponse struct {
1852	autorest.Response `json:"-"`
1853	// Items - READ-ONLY; Gets a collection of items that contain the operation url and status.
1854	Items *[]OperationBatchStatusResponseItem `json:"items,omitempty"`
1855}
1856
1857// OperationBatchStatusResponseItem represents the status of an operation that used the batch API.
1858type OperationBatchStatusResponseItem struct {
1859	// OperationURL - READ-ONLY; status of the long running operation for an environment
1860	OperationURL *string `json:"operationUrl,omitempty"`
1861	// Status - READ-ONLY; status of the long running operation for an environment
1862	Status *string `json:"status,omitempty"`
1863}
1864
1865// OperationError error details for the operation in case of a failure.
1866type OperationError struct {
1867	// Code - The error code of the operation error.
1868	Code *string `json:"code,omitempty"`
1869	// Message - The error message of the operation error.
1870	Message *string `json:"message,omitempty"`
1871}
1872
1873// OperationMetadata the REST API operation supported by ManagedLab ResourceProvider.
1874type OperationMetadata struct {
1875	// Name - Operation name: {provider}/{resource}/{operation}
1876	Name *string `json:"name,omitempty"`
1877	// Display - The object that describes the operations
1878	Display *OperationMetadataDisplay `json:"display,omitempty"`
1879}
1880
1881// OperationMetadataDisplay the object that describes the operations
1882type OperationMetadataDisplay struct {
1883	// Provider - Friendly name of the resource provider
1884	Provider *string `json:"provider,omitempty"`
1885	// Resource - Resource type on which the operation is performed.
1886	Resource *string `json:"resource,omitempty"`
1887	// Operation - Operation type: read, write, delete, listKeys/action, etc.
1888	Operation *string `json:"operation,omitempty"`
1889	// Description - Friendly name of the operation
1890	Description *string `json:"description,omitempty"`
1891}
1892
1893// OperationResult an Operation Result
1894type OperationResult struct {
1895	autorest.Response `json:"-"`
1896	// Status - The operation status.
1897	Status *string `json:"status,omitempty"`
1898	// Error - Error details for the operation in case of a failure.
1899	Error *OperationError `json:"error,omitempty"`
1900}
1901
1902// OperationStatusPayload payload to get the status of an operation
1903type OperationStatusPayload struct {
1904	// OperationURL - The operation url of long running operation
1905	OperationURL *string `json:"operationUrl,omitempty"`
1906}
1907
1908// OperationStatusResponse status Details of the long running operation for an environment
1909type OperationStatusResponse struct {
1910	autorest.Response `json:"-"`
1911	// Status - READ-ONLY; status of the long running operation for an environment
1912	Status *string `json:"status,omitempty"`
1913}
1914
1915// PersonalPreferencesOperationsPayload represents payload for any Environment operations like get, start,
1916// stop, connect
1917type PersonalPreferencesOperationsPayload struct {
1918	// LabAccountResourceID - Resource Id of the lab account
1919	LabAccountResourceID *string `json:"labAccountResourceId,omitempty"`
1920	// AddRemove - Enum indicating if user is adding or removing a favorite lab. Possible values include: 'Add', 'Remove'
1921	AddRemove AddRemove `json:"addRemove,omitempty"`
1922	// LabResourceID - Resource Id of the lab to add/remove from the favorites list
1923	LabResourceID *string `json:"labResourceId,omitempty"`
1924}
1925
1926// ProviderOperationResult result of the request to list REST API operations
1927type ProviderOperationResult struct {
1928	autorest.Response `json:"-"`
1929	// Value - List of operations supported by the resource provider.
1930	Value *[]OperationMetadata `json:"value,omitempty"`
1931	// NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
1932	NextLink *string `json:"nextLink,omitempty"`
1933}
1934
1935// ProviderOperationResultIterator provides access to a complete listing of OperationMetadata values.
1936type ProviderOperationResultIterator struct {
1937	i    int
1938	page ProviderOperationResultPage
1939}
1940
1941// NextWithContext advances to the next value.  If there was an error making
1942// the request the iterator does not advance and the error is returned.
1943func (iter *ProviderOperationResultIterator) NextWithContext(ctx context.Context) (err error) {
1944	if tracing.IsEnabled() {
1945		ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultIterator.NextWithContext")
1946		defer func() {
1947			sc := -1
1948			if iter.Response().Response.Response != nil {
1949				sc = iter.Response().Response.Response.StatusCode
1950			}
1951			tracing.EndSpan(ctx, sc, err)
1952		}()
1953	}
1954	iter.i++
1955	if iter.i < len(iter.page.Values()) {
1956		return nil
1957	}
1958	err = iter.page.NextWithContext(ctx)
1959	if err != nil {
1960		iter.i--
1961		return err
1962	}
1963	iter.i = 0
1964	return nil
1965}
1966
1967// Next advances to the next value.  If there was an error making
1968// the request the iterator does not advance and the error is returned.
1969// Deprecated: Use NextWithContext() instead.
1970func (iter *ProviderOperationResultIterator) Next() error {
1971	return iter.NextWithContext(context.Background())
1972}
1973
1974// NotDone returns true if the enumeration should be started or is not yet complete.
1975func (iter ProviderOperationResultIterator) NotDone() bool {
1976	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1977}
1978
1979// Response returns the raw server response from the last page request.
1980func (iter ProviderOperationResultIterator) Response() ProviderOperationResult {
1981	return iter.page.Response()
1982}
1983
1984// Value returns the current value or a zero-initialized value if the
1985// iterator has advanced beyond the end of the collection.
1986func (iter ProviderOperationResultIterator) Value() OperationMetadata {
1987	if !iter.page.NotDone() {
1988		return OperationMetadata{}
1989	}
1990	return iter.page.Values()[iter.i]
1991}
1992
1993// Creates a new instance of the ProviderOperationResultIterator type.
1994func NewProviderOperationResultIterator(page ProviderOperationResultPage) ProviderOperationResultIterator {
1995	return ProviderOperationResultIterator{page: page}
1996}
1997
1998// IsEmpty returns true if the ListResult contains no values.
1999func (por ProviderOperationResult) IsEmpty() bool {
2000	return por.Value == nil || len(*por.Value) == 0
2001}
2002
2003// providerOperationResultPreparer prepares a request to retrieve the next set of results.
2004// It returns nil if no more results exist.
2005func (por ProviderOperationResult) providerOperationResultPreparer(ctx context.Context) (*http.Request, error) {
2006	if por.NextLink == nil || len(to.String(por.NextLink)) < 1 {
2007		return nil, nil
2008	}
2009	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2010		autorest.AsJSON(),
2011		autorest.AsGet(),
2012		autorest.WithBaseURL(to.String(por.NextLink)))
2013}
2014
2015// ProviderOperationResultPage contains a page of OperationMetadata values.
2016type ProviderOperationResultPage struct {
2017	fn  func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)
2018	por ProviderOperationResult
2019}
2020
2021// NextWithContext advances to the next page of values.  If there was an error making
2022// the request the page does not advance and the error is returned.
2023func (page *ProviderOperationResultPage) NextWithContext(ctx context.Context) (err error) {
2024	if tracing.IsEnabled() {
2025		ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultPage.NextWithContext")
2026		defer func() {
2027			sc := -1
2028			if page.Response().Response.Response != nil {
2029				sc = page.Response().Response.Response.StatusCode
2030			}
2031			tracing.EndSpan(ctx, sc, err)
2032		}()
2033	}
2034	next, err := page.fn(ctx, page.por)
2035	if err != nil {
2036		return err
2037	}
2038	page.por = next
2039	return nil
2040}
2041
2042// Next advances to the next page of values.  If there was an error making
2043// the request the page does not advance and the error is returned.
2044// Deprecated: Use NextWithContext() instead.
2045func (page *ProviderOperationResultPage) Next() error {
2046	return page.NextWithContext(context.Background())
2047}
2048
2049// NotDone returns true if the page enumeration should be started or is not yet complete.
2050func (page ProviderOperationResultPage) NotDone() bool {
2051	return !page.por.IsEmpty()
2052}
2053
2054// Response returns the raw server response from the last page request.
2055func (page ProviderOperationResultPage) Response() ProviderOperationResult {
2056	return page.por
2057}
2058
2059// Values returns the slice of values for the current page or nil if there are no values.
2060func (page ProviderOperationResultPage) Values() []OperationMetadata {
2061	if page.por.IsEmpty() {
2062		return nil
2063	}
2064	return *page.por.Value
2065}
2066
2067// Creates a new instance of the ProviderOperationResultPage type.
2068func NewProviderOperationResultPage(getNextPage func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)) ProviderOperationResultPage {
2069	return ProviderOperationResultPage{fn: getNextPage}
2070}
2071
2072// PublishPayload payload for Publish operation on EnvironmentSetting.
2073type PublishPayload struct {
2074	// UseExistingImage - Whether to use existing VM custom image when publishing.
2075	UseExistingImage *bool `json:"useExistingImage,omitempty"`
2076}
2077
2078// ReferenceVM details of a Reference Vm
2079type ReferenceVM struct {
2080	// UserName - The username of the virtual machine
2081	UserName *string `json:"userName,omitempty"`
2082	// Password - The password of the virtual machine. This will be set to null in GET resource API
2083	Password *string `json:"password,omitempty"`
2084	// VMStateDetails - READ-ONLY; The state details for the reference virtual machine.
2085	VMStateDetails *VMStateDetails `json:"vmStateDetails,omitempty"`
2086	// VMResourceID - READ-ONLY; VM resource Id for the environment
2087	VMResourceID *string `json:"vmResourceId,omitempty"`
2088}
2089
2090// ReferenceVMCreationParameters creation parameters for Reference Vm
2091type ReferenceVMCreationParameters struct {
2092	// UserName - The username of the virtual machine
2093	UserName *string `json:"userName,omitempty"`
2094	// Password - The password of the virtual machine.
2095	Password *string `json:"password,omitempty"`
2096}
2097
2098// ReferenceVMFragment details of a Reference Vm
2099type ReferenceVMFragment struct {
2100	// UserName - The username of the virtual machine
2101	UserName *string `json:"userName,omitempty"`
2102	// Password - The password of the virtual machine. This will be set to null in GET resource API
2103	Password *string `json:"password,omitempty"`
2104}
2105
2106// RegionalAvailability the availability information of sizes across regions
2107type RegionalAvailability struct {
2108	// Region - Corresponding region
2109	Region *string `json:"region,omitempty"`
2110	// SizeAvailabilities - List of all the size information for the region
2111	SizeAvailabilities *[]SizeAvailability `json:"sizeAvailabilities,omitempty"`
2112}
2113
2114// RegisterPayload represents payload for Register action.
2115type RegisterPayload struct {
2116	// RegistrationCode - The registration code of the lab.
2117	RegistrationCode *string `json:"registrationCode,omitempty"`
2118}
2119
2120// ResetPasswordPayload represents the payload for resetting passwords.
2121type ResetPasswordPayload struct {
2122	// EnvironmentID - The resourceId of the environment
2123	EnvironmentID *string `json:"environmentId,omitempty"`
2124	// Username - The username for which the password will be reset.
2125	Username *string `json:"username,omitempty"`
2126	// Password - The password to assign to the user specified in
2127	Password *string `json:"password,omitempty"`
2128}
2129
2130// Resource an Azure resource.
2131type Resource struct {
2132	// ID - READ-ONLY; The identifier of the resource.
2133	ID *string `json:"id,omitempty"`
2134	// Name - READ-ONLY; The name of the resource.
2135	Name *string `json:"name,omitempty"`
2136	// Type - READ-ONLY; The type of the resource.
2137	Type *string `json:"type,omitempty"`
2138	// Location - The location of the resource.
2139	Location *string `json:"location,omitempty"`
2140	// Tags - The tags of the resource.
2141	Tags map[string]*string `json:"tags"`
2142}
2143
2144// MarshalJSON is the custom marshaler for Resource.
2145func (r Resource) MarshalJSON() ([]byte, error) {
2146	objectMap := make(map[string]interface{})
2147	if r.Location != nil {
2148		objectMap["location"] = r.Location
2149	}
2150	if r.Tags != nil {
2151		objectMap["tags"] = r.Tags
2152	}
2153	return json.Marshal(objectMap)
2154}
2155
2156// ResourceSet represents a VM and the setting Id it was created for.
2157type ResourceSet struct {
2158	// VMResourceID - VM resource Id for the environment
2159	VMResourceID *string `json:"vmResourceId,omitempty"`
2160	// ResourceSettingID - resourceSettingId for the environment
2161	ResourceSettingID *string `json:"resourceSettingId,omitempty"`
2162}
2163
2164// ResourceSetFragment represents a VM and the setting Id it was created for.
2165type ResourceSetFragment struct {
2166	// VMResourceID - VM resource Id for the environment
2167	VMResourceID *string `json:"vmResourceId,omitempty"`
2168	// ResourceSettingID - resourceSettingId for the environment
2169	ResourceSettingID *string `json:"resourceSettingId,omitempty"`
2170}
2171
2172// ResourceSettingCreationParameters represents resource specific settings
2173type ResourceSettingCreationParameters struct {
2174	// Location - The location where the virtual machine will live
2175	Location *string `json:"location,omitempty"`
2176	// Name - The name of the resource setting
2177	Name *string `json:"name,omitempty"`
2178	// GalleryImageResourceID - The resource id of the gallery image used for creating the virtual machine
2179	GalleryImageResourceID *string `json:"galleryImageResourceId,omitempty"`
2180	// Size - The size of the virtual machine. Possible values include: 'Basic', 'Standard', 'Performance'
2181	Size ManagedLabVMSize `json:"size,omitempty"`
2182	// ReferenceVMCreationParameters - Creation parameters for Reference Vm
2183	ReferenceVMCreationParameters *ReferenceVMCreationParameters `json:"referenceVmCreationParameters,omitempty"`
2184}
2185
2186// ResourceSettings represents resource specific settings
2187type ResourceSettings struct {
2188	// ID - READ-ONLY; The unique id of the resource setting
2189	ID *string `json:"id,omitempty"`
2190	// GalleryImageResourceID - The resource id of the gallery image used for creating the virtual machine
2191	GalleryImageResourceID *string `json:"galleryImageResourceId,omitempty"`
2192	// ImageName - READ-ONLY; The name of the image used to created the environment setting
2193	ImageName *string `json:"imageName,omitempty"`
2194	// Size - The size of the virtual machine. Possible values include: 'Basic', 'Standard', 'Performance'
2195	Size ManagedLabVMSize `json:"size,omitempty"`
2196	// Cores - READ-ONLY; The translated compute cores of the virtual machine
2197	Cores *int32 `json:"cores,omitempty"`
2198	// ReferenceVM - Details specific to Reference Vm
2199	ReferenceVM *ReferenceVM `json:"referenceVm,omitempty"`
2200}
2201
2202// ResourceSettingsFragment represents resource specific settings
2203type ResourceSettingsFragment struct {
2204	// GalleryImageResourceID - The resource id of the gallery image used for creating the virtual machine
2205	GalleryImageResourceID *string `json:"galleryImageResourceId,omitempty"`
2206	// Size - The size of the virtual machine. Possible values include: 'Basic', 'Standard', 'Performance'
2207	Size ManagedLabVMSize `json:"size,omitempty"`
2208	// ReferenceVM - Details specific to Reference Vm
2209	ReferenceVM *ReferenceVMFragment `json:"referenceVm,omitempty"`
2210}
2211
2212// ResponseWithContinuationEnvironment the response of a list operation.
2213type ResponseWithContinuationEnvironment struct {
2214	autorest.Response `json:"-"`
2215	// Value - Results of the list operation.
2216	Value *[]Environment `json:"value,omitempty"`
2217	// NextLink - Link for next set of results.
2218	NextLink *string `json:"nextLink,omitempty"`
2219}
2220
2221// ResponseWithContinuationEnvironmentIterator provides access to a complete listing of Environment values.
2222type ResponseWithContinuationEnvironmentIterator struct {
2223	i    int
2224	page ResponseWithContinuationEnvironmentPage
2225}
2226
2227// NextWithContext advances to the next value.  If there was an error making
2228// the request the iterator does not advance and the error is returned.
2229func (iter *ResponseWithContinuationEnvironmentIterator) NextWithContext(ctx context.Context) (err error) {
2230	if tracing.IsEnabled() {
2231		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationEnvironmentIterator.NextWithContext")
2232		defer func() {
2233			sc := -1
2234			if iter.Response().Response.Response != nil {
2235				sc = iter.Response().Response.Response.StatusCode
2236			}
2237			tracing.EndSpan(ctx, sc, err)
2238		}()
2239	}
2240	iter.i++
2241	if iter.i < len(iter.page.Values()) {
2242		return nil
2243	}
2244	err = iter.page.NextWithContext(ctx)
2245	if err != nil {
2246		iter.i--
2247		return err
2248	}
2249	iter.i = 0
2250	return nil
2251}
2252
2253// Next advances to the next value.  If there was an error making
2254// the request the iterator does not advance and the error is returned.
2255// Deprecated: Use NextWithContext() instead.
2256func (iter *ResponseWithContinuationEnvironmentIterator) Next() error {
2257	return iter.NextWithContext(context.Background())
2258}
2259
2260// NotDone returns true if the enumeration should be started or is not yet complete.
2261func (iter ResponseWithContinuationEnvironmentIterator) NotDone() bool {
2262	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2263}
2264
2265// Response returns the raw server response from the last page request.
2266func (iter ResponseWithContinuationEnvironmentIterator) Response() ResponseWithContinuationEnvironment {
2267	return iter.page.Response()
2268}
2269
2270// Value returns the current value or a zero-initialized value if the
2271// iterator has advanced beyond the end of the collection.
2272func (iter ResponseWithContinuationEnvironmentIterator) Value() Environment {
2273	if !iter.page.NotDone() {
2274		return Environment{}
2275	}
2276	return iter.page.Values()[iter.i]
2277}
2278
2279// Creates a new instance of the ResponseWithContinuationEnvironmentIterator type.
2280func NewResponseWithContinuationEnvironmentIterator(page ResponseWithContinuationEnvironmentPage) ResponseWithContinuationEnvironmentIterator {
2281	return ResponseWithContinuationEnvironmentIterator{page: page}
2282}
2283
2284// IsEmpty returns true if the ListResult contains no values.
2285func (rwcE ResponseWithContinuationEnvironment) IsEmpty() bool {
2286	return rwcE.Value == nil || len(*rwcE.Value) == 0
2287}
2288
2289// responseWithContinuationEnvironmentPreparer prepares a request to retrieve the next set of results.
2290// It returns nil if no more results exist.
2291func (rwcE ResponseWithContinuationEnvironment) responseWithContinuationEnvironmentPreparer(ctx context.Context) (*http.Request, error) {
2292	if rwcE.NextLink == nil || len(to.String(rwcE.NextLink)) < 1 {
2293		return nil, nil
2294	}
2295	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2296		autorest.AsJSON(),
2297		autorest.AsGet(),
2298		autorest.WithBaseURL(to.String(rwcE.NextLink)))
2299}
2300
2301// ResponseWithContinuationEnvironmentPage contains a page of Environment values.
2302type ResponseWithContinuationEnvironmentPage struct {
2303	fn   func(context.Context, ResponseWithContinuationEnvironment) (ResponseWithContinuationEnvironment, error)
2304	rwce ResponseWithContinuationEnvironment
2305}
2306
2307// NextWithContext advances to the next page of values.  If there was an error making
2308// the request the page does not advance and the error is returned.
2309func (page *ResponseWithContinuationEnvironmentPage) NextWithContext(ctx context.Context) (err error) {
2310	if tracing.IsEnabled() {
2311		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationEnvironmentPage.NextWithContext")
2312		defer func() {
2313			sc := -1
2314			if page.Response().Response.Response != nil {
2315				sc = page.Response().Response.Response.StatusCode
2316			}
2317			tracing.EndSpan(ctx, sc, err)
2318		}()
2319	}
2320	next, err := page.fn(ctx, page.rwce)
2321	if err != nil {
2322		return err
2323	}
2324	page.rwce = next
2325	return nil
2326}
2327
2328// Next advances to the next page of values.  If there was an error making
2329// the request the page does not advance and the error is returned.
2330// Deprecated: Use NextWithContext() instead.
2331func (page *ResponseWithContinuationEnvironmentPage) Next() error {
2332	return page.NextWithContext(context.Background())
2333}
2334
2335// NotDone returns true if the page enumeration should be started or is not yet complete.
2336func (page ResponseWithContinuationEnvironmentPage) NotDone() bool {
2337	return !page.rwce.IsEmpty()
2338}
2339
2340// Response returns the raw server response from the last page request.
2341func (page ResponseWithContinuationEnvironmentPage) Response() ResponseWithContinuationEnvironment {
2342	return page.rwce
2343}
2344
2345// Values returns the slice of values for the current page or nil if there are no values.
2346func (page ResponseWithContinuationEnvironmentPage) Values() []Environment {
2347	if page.rwce.IsEmpty() {
2348		return nil
2349	}
2350	return *page.rwce.Value
2351}
2352
2353// Creates a new instance of the ResponseWithContinuationEnvironmentPage type.
2354func NewResponseWithContinuationEnvironmentPage(getNextPage func(context.Context, ResponseWithContinuationEnvironment) (ResponseWithContinuationEnvironment, error)) ResponseWithContinuationEnvironmentPage {
2355	return ResponseWithContinuationEnvironmentPage{fn: getNextPage}
2356}
2357
2358// ResponseWithContinuationEnvironmentSetting the response of a list operation.
2359type ResponseWithContinuationEnvironmentSetting struct {
2360	autorest.Response `json:"-"`
2361	// Value - Results of the list operation.
2362	Value *[]EnvironmentSetting `json:"value,omitempty"`
2363	// NextLink - Link for next set of results.
2364	NextLink *string `json:"nextLink,omitempty"`
2365}
2366
2367// ResponseWithContinuationEnvironmentSettingIterator provides access to a complete listing of
2368// EnvironmentSetting values.
2369type ResponseWithContinuationEnvironmentSettingIterator struct {
2370	i    int
2371	page ResponseWithContinuationEnvironmentSettingPage
2372}
2373
2374// NextWithContext advances to the next value.  If there was an error making
2375// the request the iterator does not advance and the error is returned.
2376func (iter *ResponseWithContinuationEnvironmentSettingIterator) NextWithContext(ctx context.Context) (err error) {
2377	if tracing.IsEnabled() {
2378		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationEnvironmentSettingIterator.NextWithContext")
2379		defer func() {
2380			sc := -1
2381			if iter.Response().Response.Response != nil {
2382				sc = iter.Response().Response.Response.StatusCode
2383			}
2384			tracing.EndSpan(ctx, sc, err)
2385		}()
2386	}
2387	iter.i++
2388	if iter.i < len(iter.page.Values()) {
2389		return nil
2390	}
2391	err = iter.page.NextWithContext(ctx)
2392	if err != nil {
2393		iter.i--
2394		return err
2395	}
2396	iter.i = 0
2397	return nil
2398}
2399
2400// Next advances to the next value.  If there was an error making
2401// the request the iterator does not advance and the error is returned.
2402// Deprecated: Use NextWithContext() instead.
2403func (iter *ResponseWithContinuationEnvironmentSettingIterator) Next() error {
2404	return iter.NextWithContext(context.Background())
2405}
2406
2407// NotDone returns true if the enumeration should be started or is not yet complete.
2408func (iter ResponseWithContinuationEnvironmentSettingIterator) NotDone() bool {
2409	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2410}
2411
2412// Response returns the raw server response from the last page request.
2413func (iter ResponseWithContinuationEnvironmentSettingIterator) Response() ResponseWithContinuationEnvironmentSetting {
2414	return iter.page.Response()
2415}
2416
2417// Value returns the current value or a zero-initialized value if the
2418// iterator has advanced beyond the end of the collection.
2419func (iter ResponseWithContinuationEnvironmentSettingIterator) Value() EnvironmentSetting {
2420	if !iter.page.NotDone() {
2421		return EnvironmentSetting{}
2422	}
2423	return iter.page.Values()[iter.i]
2424}
2425
2426// Creates a new instance of the ResponseWithContinuationEnvironmentSettingIterator type.
2427func NewResponseWithContinuationEnvironmentSettingIterator(page ResponseWithContinuationEnvironmentSettingPage) ResponseWithContinuationEnvironmentSettingIterator {
2428	return ResponseWithContinuationEnvironmentSettingIterator{page: page}
2429}
2430
2431// IsEmpty returns true if the ListResult contains no values.
2432func (rwcEs ResponseWithContinuationEnvironmentSetting) IsEmpty() bool {
2433	return rwcEs.Value == nil || len(*rwcEs.Value) == 0
2434}
2435
2436// responseWithContinuationEnvironmentSettingPreparer prepares a request to retrieve the next set of results.
2437// It returns nil if no more results exist.
2438func (rwcEs ResponseWithContinuationEnvironmentSetting) responseWithContinuationEnvironmentSettingPreparer(ctx context.Context) (*http.Request, error) {
2439	if rwcEs.NextLink == nil || len(to.String(rwcEs.NextLink)) < 1 {
2440		return nil, nil
2441	}
2442	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2443		autorest.AsJSON(),
2444		autorest.AsGet(),
2445		autorest.WithBaseURL(to.String(rwcEs.NextLink)))
2446}
2447
2448// ResponseWithContinuationEnvironmentSettingPage contains a page of EnvironmentSetting values.
2449type ResponseWithContinuationEnvironmentSettingPage struct {
2450	fn    func(context.Context, ResponseWithContinuationEnvironmentSetting) (ResponseWithContinuationEnvironmentSetting, error)
2451	rwces ResponseWithContinuationEnvironmentSetting
2452}
2453
2454// NextWithContext advances to the next page of values.  If there was an error making
2455// the request the page does not advance and the error is returned.
2456func (page *ResponseWithContinuationEnvironmentSettingPage) NextWithContext(ctx context.Context) (err error) {
2457	if tracing.IsEnabled() {
2458		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationEnvironmentSettingPage.NextWithContext")
2459		defer func() {
2460			sc := -1
2461			if page.Response().Response.Response != nil {
2462				sc = page.Response().Response.Response.StatusCode
2463			}
2464			tracing.EndSpan(ctx, sc, err)
2465		}()
2466	}
2467	next, err := page.fn(ctx, page.rwces)
2468	if err != nil {
2469		return err
2470	}
2471	page.rwces = next
2472	return nil
2473}
2474
2475// Next advances to the next page of values.  If there was an error making
2476// the request the page does not advance and the error is returned.
2477// Deprecated: Use NextWithContext() instead.
2478func (page *ResponseWithContinuationEnvironmentSettingPage) Next() error {
2479	return page.NextWithContext(context.Background())
2480}
2481
2482// NotDone returns true if the page enumeration should be started or is not yet complete.
2483func (page ResponseWithContinuationEnvironmentSettingPage) NotDone() bool {
2484	return !page.rwces.IsEmpty()
2485}
2486
2487// Response returns the raw server response from the last page request.
2488func (page ResponseWithContinuationEnvironmentSettingPage) Response() ResponseWithContinuationEnvironmentSetting {
2489	return page.rwces
2490}
2491
2492// Values returns the slice of values for the current page or nil if there are no values.
2493func (page ResponseWithContinuationEnvironmentSettingPage) Values() []EnvironmentSetting {
2494	if page.rwces.IsEmpty() {
2495		return nil
2496	}
2497	return *page.rwces.Value
2498}
2499
2500// Creates a new instance of the ResponseWithContinuationEnvironmentSettingPage type.
2501func NewResponseWithContinuationEnvironmentSettingPage(getNextPage func(context.Context, ResponseWithContinuationEnvironmentSetting) (ResponseWithContinuationEnvironmentSetting, error)) ResponseWithContinuationEnvironmentSettingPage {
2502	return ResponseWithContinuationEnvironmentSettingPage{fn: getNextPage}
2503}
2504
2505// ResponseWithContinuationGalleryImage the response of a list operation.
2506type ResponseWithContinuationGalleryImage struct {
2507	autorest.Response `json:"-"`
2508	// Value - Results of the list operation.
2509	Value *[]GalleryImage `json:"value,omitempty"`
2510	// NextLink - Link for next set of results.
2511	NextLink *string `json:"nextLink,omitempty"`
2512}
2513
2514// ResponseWithContinuationGalleryImageIterator provides access to a complete listing of GalleryImage
2515// values.
2516type ResponseWithContinuationGalleryImageIterator struct {
2517	i    int
2518	page ResponseWithContinuationGalleryImagePage
2519}
2520
2521// NextWithContext advances to the next value.  If there was an error making
2522// the request the iterator does not advance and the error is returned.
2523func (iter *ResponseWithContinuationGalleryImageIterator) NextWithContext(ctx context.Context) (err error) {
2524	if tracing.IsEnabled() {
2525		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImageIterator.NextWithContext")
2526		defer func() {
2527			sc := -1
2528			if iter.Response().Response.Response != nil {
2529				sc = iter.Response().Response.Response.StatusCode
2530			}
2531			tracing.EndSpan(ctx, sc, err)
2532		}()
2533	}
2534	iter.i++
2535	if iter.i < len(iter.page.Values()) {
2536		return nil
2537	}
2538	err = iter.page.NextWithContext(ctx)
2539	if err != nil {
2540		iter.i--
2541		return err
2542	}
2543	iter.i = 0
2544	return nil
2545}
2546
2547// Next advances to the next value.  If there was an error making
2548// the request the iterator does not advance and the error is returned.
2549// Deprecated: Use NextWithContext() instead.
2550func (iter *ResponseWithContinuationGalleryImageIterator) Next() error {
2551	return iter.NextWithContext(context.Background())
2552}
2553
2554// NotDone returns true if the enumeration should be started or is not yet complete.
2555func (iter ResponseWithContinuationGalleryImageIterator) NotDone() bool {
2556	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2557}
2558
2559// Response returns the raw server response from the last page request.
2560func (iter ResponseWithContinuationGalleryImageIterator) Response() ResponseWithContinuationGalleryImage {
2561	return iter.page.Response()
2562}
2563
2564// Value returns the current value or a zero-initialized value if the
2565// iterator has advanced beyond the end of the collection.
2566func (iter ResponseWithContinuationGalleryImageIterator) Value() GalleryImage {
2567	if !iter.page.NotDone() {
2568		return GalleryImage{}
2569	}
2570	return iter.page.Values()[iter.i]
2571}
2572
2573// Creates a new instance of the ResponseWithContinuationGalleryImageIterator type.
2574func NewResponseWithContinuationGalleryImageIterator(page ResponseWithContinuationGalleryImagePage) ResponseWithContinuationGalleryImageIterator {
2575	return ResponseWithContinuationGalleryImageIterator{page: page}
2576}
2577
2578// IsEmpty returns true if the ListResult contains no values.
2579func (rwcGi ResponseWithContinuationGalleryImage) IsEmpty() bool {
2580	return rwcGi.Value == nil || len(*rwcGi.Value) == 0
2581}
2582
2583// responseWithContinuationGalleryImagePreparer prepares a request to retrieve the next set of results.
2584// It returns nil if no more results exist.
2585func (rwcGi ResponseWithContinuationGalleryImage) responseWithContinuationGalleryImagePreparer(ctx context.Context) (*http.Request, error) {
2586	if rwcGi.NextLink == nil || len(to.String(rwcGi.NextLink)) < 1 {
2587		return nil, nil
2588	}
2589	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2590		autorest.AsJSON(),
2591		autorest.AsGet(),
2592		autorest.WithBaseURL(to.String(rwcGi.NextLink)))
2593}
2594
2595// ResponseWithContinuationGalleryImagePage contains a page of GalleryImage values.
2596type ResponseWithContinuationGalleryImagePage struct {
2597	fn    func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)
2598	rwcgi ResponseWithContinuationGalleryImage
2599}
2600
2601// NextWithContext advances to the next page of values.  If there was an error making
2602// the request the page does not advance and the error is returned.
2603func (page *ResponseWithContinuationGalleryImagePage) NextWithContext(ctx context.Context) (err error) {
2604	if tracing.IsEnabled() {
2605		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImagePage.NextWithContext")
2606		defer func() {
2607			sc := -1
2608			if page.Response().Response.Response != nil {
2609				sc = page.Response().Response.Response.StatusCode
2610			}
2611			tracing.EndSpan(ctx, sc, err)
2612		}()
2613	}
2614	next, err := page.fn(ctx, page.rwcgi)
2615	if err != nil {
2616		return err
2617	}
2618	page.rwcgi = next
2619	return nil
2620}
2621
2622// Next advances to the next page of values.  If there was an error making
2623// the request the page does not advance and the error is returned.
2624// Deprecated: Use NextWithContext() instead.
2625func (page *ResponseWithContinuationGalleryImagePage) Next() error {
2626	return page.NextWithContext(context.Background())
2627}
2628
2629// NotDone returns true if the page enumeration should be started or is not yet complete.
2630func (page ResponseWithContinuationGalleryImagePage) NotDone() bool {
2631	return !page.rwcgi.IsEmpty()
2632}
2633
2634// Response returns the raw server response from the last page request.
2635func (page ResponseWithContinuationGalleryImagePage) Response() ResponseWithContinuationGalleryImage {
2636	return page.rwcgi
2637}
2638
2639// Values returns the slice of values for the current page or nil if there are no values.
2640func (page ResponseWithContinuationGalleryImagePage) Values() []GalleryImage {
2641	if page.rwcgi.IsEmpty() {
2642		return nil
2643	}
2644	return *page.rwcgi.Value
2645}
2646
2647// Creates a new instance of the ResponseWithContinuationGalleryImagePage type.
2648func NewResponseWithContinuationGalleryImagePage(getNextPage func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)) ResponseWithContinuationGalleryImagePage {
2649	return ResponseWithContinuationGalleryImagePage{fn: getNextPage}
2650}
2651
2652// ResponseWithContinuationLab the response of a list operation.
2653type ResponseWithContinuationLab struct {
2654	autorest.Response `json:"-"`
2655	// Value - Results of the list operation.
2656	Value *[]Lab `json:"value,omitempty"`
2657	// NextLink - Link for next set of results.
2658	NextLink *string `json:"nextLink,omitempty"`
2659}
2660
2661// ResponseWithContinuationLabAccount the response of a list operation.
2662type ResponseWithContinuationLabAccount struct {
2663	autorest.Response `json:"-"`
2664	// Value - Results of the list operation.
2665	Value *[]LabAccount `json:"value,omitempty"`
2666	// NextLink - Link for next set of results.
2667	NextLink *string `json:"nextLink,omitempty"`
2668}
2669
2670// ResponseWithContinuationLabAccountIterator provides access to a complete listing of LabAccount values.
2671type ResponseWithContinuationLabAccountIterator struct {
2672	i    int
2673	page ResponseWithContinuationLabAccountPage
2674}
2675
2676// NextWithContext advances to the next value.  If there was an error making
2677// the request the iterator does not advance and the error is returned.
2678func (iter *ResponseWithContinuationLabAccountIterator) NextWithContext(ctx context.Context) (err error) {
2679	if tracing.IsEnabled() {
2680		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabAccountIterator.NextWithContext")
2681		defer func() {
2682			sc := -1
2683			if iter.Response().Response.Response != nil {
2684				sc = iter.Response().Response.Response.StatusCode
2685			}
2686			tracing.EndSpan(ctx, sc, err)
2687		}()
2688	}
2689	iter.i++
2690	if iter.i < len(iter.page.Values()) {
2691		return nil
2692	}
2693	err = iter.page.NextWithContext(ctx)
2694	if err != nil {
2695		iter.i--
2696		return err
2697	}
2698	iter.i = 0
2699	return nil
2700}
2701
2702// Next advances to the next value.  If there was an error making
2703// the request the iterator does not advance and the error is returned.
2704// Deprecated: Use NextWithContext() instead.
2705func (iter *ResponseWithContinuationLabAccountIterator) Next() error {
2706	return iter.NextWithContext(context.Background())
2707}
2708
2709// NotDone returns true if the enumeration should be started or is not yet complete.
2710func (iter ResponseWithContinuationLabAccountIterator) NotDone() bool {
2711	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2712}
2713
2714// Response returns the raw server response from the last page request.
2715func (iter ResponseWithContinuationLabAccountIterator) Response() ResponseWithContinuationLabAccount {
2716	return iter.page.Response()
2717}
2718
2719// Value returns the current value or a zero-initialized value if the
2720// iterator has advanced beyond the end of the collection.
2721func (iter ResponseWithContinuationLabAccountIterator) Value() LabAccount {
2722	if !iter.page.NotDone() {
2723		return LabAccount{}
2724	}
2725	return iter.page.Values()[iter.i]
2726}
2727
2728// Creates a new instance of the ResponseWithContinuationLabAccountIterator type.
2729func NewResponseWithContinuationLabAccountIterator(page ResponseWithContinuationLabAccountPage) ResponseWithContinuationLabAccountIterator {
2730	return ResponseWithContinuationLabAccountIterator{page: page}
2731}
2732
2733// IsEmpty returns true if the ListResult contains no values.
2734func (rwcLa ResponseWithContinuationLabAccount) IsEmpty() bool {
2735	return rwcLa.Value == nil || len(*rwcLa.Value) == 0
2736}
2737
2738// responseWithContinuationLabAccountPreparer prepares a request to retrieve the next set of results.
2739// It returns nil if no more results exist.
2740func (rwcLa ResponseWithContinuationLabAccount) responseWithContinuationLabAccountPreparer(ctx context.Context) (*http.Request, error) {
2741	if rwcLa.NextLink == nil || len(to.String(rwcLa.NextLink)) < 1 {
2742		return nil, nil
2743	}
2744	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2745		autorest.AsJSON(),
2746		autorest.AsGet(),
2747		autorest.WithBaseURL(to.String(rwcLa.NextLink)))
2748}
2749
2750// ResponseWithContinuationLabAccountPage contains a page of LabAccount values.
2751type ResponseWithContinuationLabAccountPage struct {
2752	fn    func(context.Context, ResponseWithContinuationLabAccount) (ResponseWithContinuationLabAccount, error)
2753	rwcla ResponseWithContinuationLabAccount
2754}
2755
2756// NextWithContext advances to the next page of values.  If there was an error making
2757// the request the page does not advance and the error is returned.
2758func (page *ResponseWithContinuationLabAccountPage) NextWithContext(ctx context.Context) (err error) {
2759	if tracing.IsEnabled() {
2760		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabAccountPage.NextWithContext")
2761		defer func() {
2762			sc := -1
2763			if page.Response().Response.Response != nil {
2764				sc = page.Response().Response.Response.StatusCode
2765			}
2766			tracing.EndSpan(ctx, sc, err)
2767		}()
2768	}
2769	next, err := page.fn(ctx, page.rwcla)
2770	if err != nil {
2771		return err
2772	}
2773	page.rwcla = next
2774	return nil
2775}
2776
2777// Next advances to the next page of values.  If there was an error making
2778// the request the page does not advance and the error is returned.
2779// Deprecated: Use NextWithContext() instead.
2780func (page *ResponseWithContinuationLabAccountPage) Next() error {
2781	return page.NextWithContext(context.Background())
2782}
2783
2784// NotDone returns true if the page enumeration should be started or is not yet complete.
2785func (page ResponseWithContinuationLabAccountPage) NotDone() bool {
2786	return !page.rwcla.IsEmpty()
2787}
2788
2789// Response returns the raw server response from the last page request.
2790func (page ResponseWithContinuationLabAccountPage) Response() ResponseWithContinuationLabAccount {
2791	return page.rwcla
2792}
2793
2794// Values returns the slice of values for the current page or nil if there are no values.
2795func (page ResponseWithContinuationLabAccountPage) Values() []LabAccount {
2796	if page.rwcla.IsEmpty() {
2797		return nil
2798	}
2799	return *page.rwcla.Value
2800}
2801
2802// Creates a new instance of the ResponseWithContinuationLabAccountPage type.
2803func NewResponseWithContinuationLabAccountPage(getNextPage func(context.Context, ResponseWithContinuationLabAccount) (ResponseWithContinuationLabAccount, error)) ResponseWithContinuationLabAccountPage {
2804	return ResponseWithContinuationLabAccountPage{fn: getNextPage}
2805}
2806
2807// ResponseWithContinuationLabIterator provides access to a complete listing of Lab values.
2808type ResponseWithContinuationLabIterator struct {
2809	i    int
2810	page ResponseWithContinuationLabPage
2811}
2812
2813// NextWithContext advances to the next value.  If there was an error making
2814// the request the iterator does not advance and the error is returned.
2815func (iter *ResponseWithContinuationLabIterator) NextWithContext(ctx context.Context) (err error) {
2816	if tracing.IsEnabled() {
2817		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabIterator.NextWithContext")
2818		defer func() {
2819			sc := -1
2820			if iter.Response().Response.Response != nil {
2821				sc = iter.Response().Response.Response.StatusCode
2822			}
2823			tracing.EndSpan(ctx, sc, err)
2824		}()
2825	}
2826	iter.i++
2827	if iter.i < len(iter.page.Values()) {
2828		return nil
2829	}
2830	err = iter.page.NextWithContext(ctx)
2831	if err != nil {
2832		iter.i--
2833		return err
2834	}
2835	iter.i = 0
2836	return nil
2837}
2838
2839// Next advances to the next value.  If there was an error making
2840// the request the iterator does not advance and the error is returned.
2841// Deprecated: Use NextWithContext() instead.
2842func (iter *ResponseWithContinuationLabIterator) Next() error {
2843	return iter.NextWithContext(context.Background())
2844}
2845
2846// NotDone returns true if the enumeration should be started or is not yet complete.
2847func (iter ResponseWithContinuationLabIterator) NotDone() bool {
2848	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2849}
2850
2851// Response returns the raw server response from the last page request.
2852func (iter ResponseWithContinuationLabIterator) Response() ResponseWithContinuationLab {
2853	return iter.page.Response()
2854}
2855
2856// Value returns the current value or a zero-initialized value if the
2857// iterator has advanced beyond the end of the collection.
2858func (iter ResponseWithContinuationLabIterator) Value() Lab {
2859	if !iter.page.NotDone() {
2860		return Lab{}
2861	}
2862	return iter.page.Values()[iter.i]
2863}
2864
2865// Creates a new instance of the ResponseWithContinuationLabIterator type.
2866func NewResponseWithContinuationLabIterator(page ResponseWithContinuationLabPage) ResponseWithContinuationLabIterator {
2867	return ResponseWithContinuationLabIterator{page: page}
2868}
2869
2870// IsEmpty returns true if the ListResult contains no values.
2871func (rwcL ResponseWithContinuationLab) IsEmpty() bool {
2872	return rwcL.Value == nil || len(*rwcL.Value) == 0
2873}
2874
2875// responseWithContinuationLabPreparer prepares a request to retrieve the next set of results.
2876// It returns nil if no more results exist.
2877func (rwcL ResponseWithContinuationLab) responseWithContinuationLabPreparer(ctx context.Context) (*http.Request, error) {
2878	if rwcL.NextLink == nil || len(to.String(rwcL.NextLink)) < 1 {
2879		return nil, nil
2880	}
2881	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2882		autorest.AsJSON(),
2883		autorest.AsGet(),
2884		autorest.WithBaseURL(to.String(rwcL.NextLink)))
2885}
2886
2887// ResponseWithContinuationLabPage contains a page of Lab values.
2888type ResponseWithContinuationLabPage struct {
2889	fn   func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)
2890	rwcl ResponseWithContinuationLab
2891}
2892
2893// NextWithContext advances to the next page of values.  If there was an error making
2894// the request the page does not advance and the error is returned.
2895func (page *ResponseWithContinuationLabPage) NextWithContext(ctx context.Context) (err error) {
2896	if tracing.IsEnabled() {
2897		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabPage.NextWithContext")
2898		defer func() {
2899			sc := -1
2900			if page.Response().Response.Response != nil {
2901				sc = page.Response().Response.Response.StatusCode
2902			}
2903			tracing.EndSpan(ctx, sc, err)
2904		}()
2905	}
2906	next, err := page.fn(ctx, page.rwcl)
2907	if err != nil {
2908		return err
2909	}
2910	page.rwcl = next
2911	return nil
2912}
2913
2914// Next advances to the next page of values.  If there was an error making
2915// the request the page does not advance and the error is returned.
2916// Deprecated: Use NextWithContext() instead.
2917func (page *ResponseWithContinuationLabPage) Next() error {
2918	return page.NextWithContext(context.Background())
2919}
2920
2921// NotDone returns true if the page enumeration should be started or is not yet complete.
2922func (page ResponseWithContinuationLabPage) NotDone() bool {
2923	return !page.rwcl.IsEmpty()
2924}
2925
2926// Response returns the raw server response from the last page request.
2927func (page ResponseWithContinuationLabPage) Response() ResponseWithContinuationLab {
2928	return page.rwcl
2929}
2930
2931// Values returns the slice of values for the current page or nil if there are no values.
2932func (page ResponseWithContinuationLabPage) Values() []Lab {
2933	if page.rwcl.IsEmpty() {
2934		return nil
2935	}
2936	return *page.rwcl.Value
2937}
2938
2939// Creates a new instance of the ResponseWithContinuationLabPage type.
2940func NewResponseWithContinuationLabPage(getNextPage func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)) ResponseWithContinuationLabPage {
2941	return ResponseWithContinuationLabPage{fn: getNextPage}
2942}
2943
2944// ResponseWithContinuationUser the response of a list operation.
2945type ResponseWithContinuationUser struct {
2946	autorest.Response `json:"-"`
2947	// Value - Results of the list operation.
2948	Value *[]User `json:"value,omitempty"`
2949	// NextLink - Link for next set of results.
2950	NextLink *string `json:"nextLink,omitempty"`
2951}
2952
2953// ResponseWithContinuationUserIterator provides access to a complete listing of User values.
2954type ResponseWithContinuationUserIterator struct {
2955	i    int
2956	page ResponseWithContinuationUserPage
2957}
2958
2959// NextWithContext advances to the next value.  If there was an error making
2960// the request the iterator does not advance and the error is returned.
2961func (iter *ResponseWithContinuationUserIterator) NextWithContext(ctx context.Context) (err error) {
2962	if tracing.IsEnabled() {
2963		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserIterator.NextWithContext")
2964		defer func() {
2965			sc := -1
2966			if iter.Response().Response.Response != nil {
2967				sc = iter.Response().Response.Response.StatusCode
2968			}
2969			tracing.EndSpan(ctx, sc, err)
2970		}()
2971	}
2972	iter.i++
2973	if iter.i < len(iter.page.Values()) {
2974		return nil
2975	}
2976	err = iter.page.NextWithContext(ctx)
2977	if err != nil {
2978		iter.i--
2979		return err
2980	}
2981	iter.i = 0
2982	return nil
2983}
2984
2985// Next advances to the next value.  If there was an error making
2986// the request the iterator does not advance and the error is returned.
2987// Deprecated: Use NextWithContext() instead.
2988func (iter *ResponseWithContinuationUserIterator) Next() error {
2989	return iter.NextWithContext(context.Background())
2990}
2991
2992// NotDone returns true if the enumeration should be started or is not yet complete.
2993func (iter ResponseWithContinuationUserIterator) NotDone() bool {
2994	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2995}
2996
2997// Response returns the raw server response from the last page request.
2998func (iter ResponseWithContinuationUserIterator) Response() ResponseWithContinuationUser {
2999	return iter.page.Response()
3000}
3001
3002// Value returns the current value or a zero-initialized value if the
3003// iterator has advanced beyond the end of the collection.
3004func (iter ResponseWithContinuationUserIterator) Value() User {
3005	if !iter.page.NotDone() {
3006		return User{}
3007	}
3008	return iter.page.Values()[iter.i]
3009}
3010
3011// Creates a new instance of the ResponseWithContinuationUserIterator type.
3012func NewResponseWithContinuationUserIterator(page ResponseWithContinuationUserPage) ResponseWithContinuationUserIterator {
3013	return ResponseWithContinuationUserIterator{page: page}
3014}
3015
3016// IsEmpty returns true if the ListResult contains no values.
3017func (rwcU ResponseWithContinuationUser) IsEmpty() bool {
3018	return rwcU.Value == nil || len(*rwcU.Value) == 0
3019}
3020
3021// responseWithContinuationUserPreparer prepares a request to retrieve the next set of results.
3022// It returns nil if no more results exist.
3023func (rwcU ResponseWithContinuationUser) responseWithContinuationUserPreparer(ctx context.Context) (*http.Request, error) {
3024	if rwcU.NextLink == nil || len(to.String(rwcU.NextLink)) < 1 {
3025		return nil, nil
3026	}
3027	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3028		autorest.AsJSON(),
3029		autorest.AsGet(),
3030		autorest.WithBaseURL(to.String(rwcU.NextLink)))
3031}
3032
3033// ResponseWithContinuationUserPage contains a page of User values.
3034type ResponseWithContinuationUserPage struct {
3035	fn   func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)
3036	rwcu ResponseWithContinuationUser
3037}
3038
3039// NextWithContext advances to the next page of values.  If there was an error making
3040// the request the page does not advance and the error is returned.
3041func (page *ResponseWithContinuationUserPage) NextWithContext(ctx context.Context) (err error) {
3042	if tracing.IsEnabled() {
3043		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserPage.NextWithContext")
3044		defer func() {
3045			sc := -1
3046			if page.Response().Response.Response != nil {
3047				sc = page.Response().Response.Response.StatusCode
3048			}
3049			tracing.EndSpan(ctx, sc, err)
3050		}()
3051	}
3052	next, err := page.fn(ctx, page.rwcu)
3053	if err != nil {
3054		return err
3055	}
3056	page.rwcu = next
3057	return nil
3058}
3059
3060// Next advances to the next page of values.  If there was an error making
3061// the request the page does not advance and the error is returned.
3062// Deprecated: Use NextWithContext() instead.
3063func (page *ResponseWithContinuationUserPage) Next() error {
3064	return page.NextWithContext(context.Background())
3065}
3066
3067// NotDone returns true if the page enumeration should be started or is not yet complete.
3068func (page ResponseWithContinuationUserPage) NotDone() bool {
3069	return !page.rwcu.IsEmpty()
3070}
3071
3072// Response returns the raw server response from the last page request.
3073func (page ResponseWithContinuationUserPage) Response() ResponseWithContinuationUser {
3074	return page.rwcu
3075}
3076
3077// Values returns the slice of values for the current page or nil if there are no values.
3078func (page ResponseWithContinuationUserPage) Values() []User {
3079	if page.rwcu.IsEmpty() {
3080		return nil
3081	}
3082	return *page.rwcu.Value
3083}
3084
3085// Creates a new instance of the ResponseWithContinuationUserPage type.
3086func NewResponseWithContinuationUserPage(getNextPage func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)) ResponseWithContinuationUserPage {
3087	return ResponseWithContinuationUserPage{fn: getNextPage}
3088}
3089
3090// SizeAvailability represents the size information
3091type SizeAvailability struct {
3092	// SizeCategory - The category of the size (Basic, Standard, Performance). Possible values include: 'Basic', 'Standard', 'Performance'
3093	SizeCategory ManagedLabVMSize `json:"sizeCategory,omitempty"`
3094	// IsAvailable - Whether or not this size category is available
3095	IsAvailable *bool `json:"isAvailable,omitempty"`
3096}
3097
3098// SizeConfigurationProperties represents the size configuration under the lab account
3099type SizeConfigurationProperties struct {
3100	// EnvironmentSizes - Represents a list of size categories supported by this Lab Account (Small, Medium, Large)
3101	EnvironmentSizes *[]EnvironmentSize `json:"environmentSizes,omitempty"`
3102}
3103
3104// SizeConfigurationPropertiesFragment represents the size configuration under the lab account
3105type SizeConfigurationPropertiesFragment struct {
3106	// EnvironmentSizes - Represents a list of size categories supported by this Lab Account (Small, Medium, Large)
3107	EnvironmentSizes *[]EnvironmentSizeFragment `json:"environmentSizes,omitempty"`
3108}
3109
3110// SizeInfo contains detailed information about a size
3111type SizeInfo struct {
3112	// ComputeSize - Represents the actual compute size, e.g. Standard_A2_v2.
3113	ComputeSize *string `json:"computeSize,omitempty"`
3114	// Price - The pay-as-you-go price per hour this size will cost. It does not include discounts and may not reflect the actual price the size will cost.
3115	Price *decimal.Decimal `json:"price,omitempty"`
3116	// NumberOfCores - The number of cores a VM of this size has.
3117	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
3118	// Memory - The amount of memory available (in GB).
3119	Memory *float64 `json:"memory,omitempty"`
3120}
3121
3122// SizeInfoFragment contains detailed information about a size
3123type SizeInfoFragment struct {
3124	// ComputeSize - Represents the actual compute size, e.g. Standard_A2_v2.
3125	ComputeSize *string `json:"computeSize,omitempty"`
3126	// Price - The pay-as-you-go price per hour this size will cost. It does not include discounts and may not reflect the actual price the size will cost.
3127	Price *decimal.Decimal `json:"price,omitempty"`
3128	// NumberOfCores - The number of cores a VM of this size has.
3129	NumberOfCores *int32 `json:"numberOfCores,omitempty"`
3130	// Memory - The amount of memory available (in GB).
3131	Memory *float64 `json:"memory,omitempty"`
3132}
3133
3134// User the User registered to a lab
3135type User struct {
3136	autorest.Response `json:"-"`
3137	// UserProperties - These are the properties for the user registered under a lab.
3138	*UserProperties `json:"properties,omitempty"`
3139	// ID - READ-ONLY; The identifier of the resource.
3140	ID *string `json:"id,omitempty"`
3141	// Name - READ-ONLY; The name of the resource.
3142	Name *string `json:"name,omitempty"`
3143	// Type - READ-ONLY; The type of the resource.
3144	Type *string `json:"type,omitempty"`
3145	// Location - The location of the resource.
3146	Location *string `json:"location,omitempty"`
3147	// Tags - The tags of the resource.
3148	Tags map[string]*string `json:"tags"`
3149}
3150
3151// MarshalJSON is the custom marshaler for User.
3152func (u User) MarshalJSON() ([]byte, error) {
3153	objectMap := make(map[string]interface{})
3154	if u.UserProperties != nil {
3155		objectMap["properties"] = u.UserProperties
3156	}
3157	if u.Location != nil {
3158		objectMap["location"] = u.Location
3159	}
3160	if u.Tags != nil {
3161		objectMap["tags"] = u.Tags
3162	}
3163	return json.Marshal(objectMap)
3164}
3165
3166// UnmarshalJSON is the custom unmarshaler for User struct.
3167func (u *User) UnmarshalJSON(body []byte) error {
3168	var m map[string]*json.RawMessage
3169	err := json.Unmarshal(body, &m)
3170	if err != nil {
3171		return err
3172	}
3173	for k, v := range m {
3174		switch k {
3175		case "properties":
3176			if v != nil {
3177				var userProperties UserProperties
3178				err = json.Unmarshal(*v, &userProperties)
3179				if err != nil {
3180					return err
3181				}
3182				u.UserProperties = &userProperties
3183			}
3184		case "id":
3185			if v != nil {
3186				var ID string
3187				err = json.Unmarshal(*v, &ID)
3188				if err != nil {
3189					return err
3190				}
3191				u.ID = &ID
3192			}
3193		case "name":
3194			if v != nil {
3195				var name string
3196				err = json.Unmarshal(*v, &name)
3197				if err != nil {
3198					return err
3199				}
3200				u.Name = &name
3201			}
3202		case "type":
3203			if v != nil {
3204				var typeVar string
3205				err = json.Unmarshal(*v, &typeVar)
3206				if err != nil {
3207					return err
3208				}
3209				u.Type = &typeVar
3210			}
3211		case "location":
3212			if v != nil {
3213				var location string
3214				err = json.Unmarshal(*v, &location)
3215				if err != nil {
3216					return err
3217				}
3218				u.Location = &location
3219			}
3220		case "tags":
3221			if v != nil {
3222				var tags map[string]*string
3223				err = json.Unmarshal(*v, &tags)
3224				if err != nil {
3225					return err
3226				}
3227				u.Tags = tags
3228			}
3229		}
3230	}
3231
3232	return nil
3233}
3234
3235// UserFragment the User registered to a lab
3236type UserFragment struct {
3237	// UserPropertiesFragment - These are the properties for the user registered under a lab.
3238	*UserPropertiesFragment `json:"properties,omitempty"`
3239	// ID - READ-ONLY; The identifier of the resource.
3240	ID *string `json:"id,omitempty"`
3241	// Name - READ-ONLY; The name of the resource.
3242	Name *string `json:"name,omitempty"`
3243	// Type - READ-ONLY; The type of the resource.
3244	Type *string `json:"type,omitempty"`
3245	// Location - The location of the resource.
3246	Location *string `json:"location,omitempty"`
3247	// Tags - The tags of the resource.
3248	Tags map[string]*string `json:"tags"`
3249}
3250
3251// MarshalJSON is the custom marshaler for UserFragment.
3252func (uf UserFragment) MarshalJSON() ([]byte, error) {
3253	objectMap := make(map[string]interface{})
3254	if uf.UserPropertiesFragment != nil {
3255		objectMap["properties"] = uf.UserPropertiesFragment
3256	}
3257	if uf.Location != nil {
3258		objectMap["location"] = uf.Location
3259	}
3260	if uf.Tags != nil {
3261		objectMap["tags"] = uf.Tags
3262	}
3263	return json.Marshal(objectMap)
3264}
3265
3266// UnmarshalJSON is the custom unmarshaler for UserFragment struct.
3267func (uf *UserFragment) UnmarshalJSON(body []byte) error {
3268	var m map[string]*json.RawMessage
3269	err := json.Unmarshal(body, &m)
3270	if err != nil {
3271		return err
3272	}
3273	for k, v := range m {
3274		switch k {
3275		case "properties":
3276			if v != nil {
3277				var userPropertiesFragment UserPropertiesFragment
3278				err = json.Unmarshal(*v, &userPropertiesFragment)
3279				if err != nil {
3280					return err
3281				}
3282				uf.UserPropertiesFragment = &userPropertiesFragment
3283			}
3284		case "id":
3285			if v != nil {
3286				var ID string
3287				err = json.Unmarshal(*v, &ID)
3288				if err != nil {
3289					return err
3290				}
3291				uf.ID = &ID
3292			}
3293		case "name":
3294			if v != nil {
3295				var name string
3296				err = json.Unmarshal(*v, &name)
3297				if err != nil {
3298					return err
3299				}
3300				uf.Name = &name
3301			}
3302		case "type":
3303			if v != nil {
3304				var typeVar string
3305				err = json.Unmarshal(*v, &typeVar)
3306				if err != nil {
3307					return err
3308				}
3309				uf.Type = &typeVar
3310			}
3311		case "location":
3312			if v != nil {
3313				var location string
3314				err = json.Unmarshal(*v, &location)
3315				if err != nil {
3316					return err
3317				}
3318				uf.Location = &location
3319			}
3320		case "tags":
3321			if v != nil {
3322				var tags map[string]*string
3323				err = json.Unmarshal(*v, &tags)
3324				if err != nil {
3325					return err
3326				}
3327				uf.Tags = tags
3328			}
3329		}
3330	}
3331
3332	return nil
3333}
3334
3335// UserProperties lab User properties
3336type UserProperties struct {
3337	// Email - READ-ONLY; The user email address, as it was specified during registration.
3338	Email *string `json:"email,omitempty"`
3339	// FamilyName - READ-ONLY; The user family name, as it was specified during registration.
3340	FamilyName *string `json:"familyName,omitempty"`
3341	// GivenName - READ-ONLY; The user given name, as it was specified during registration.
3342	GivenName *string `json:"givenName,omitempty"`
3343	// TenantID - READ-ONLY; The user tenant ID, as it was specified during registration.
3344	TenantID *string `json:"tenantId,omitempty"`
3345	// TotalUsage - READ-ONLY; How long the user has used his VMs in this lab
3346	TotalUsage *string `json:"totalUsage,omitempty"`
3347	// ProvisioningState - The provisioning status of the resource.
3348	ProvisioningState *string `json:"provisioningState,omitempty"`
3349	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
3350	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3351	// LatestOperationResult - READ-ONLY; The details of the latest operation. ex: status, error
3352	LatestOperationResult *LatestOperationResult `json:"latestOperationResult,omitempty"`
3353}
3354
3355// UserPropertiesFragment lab User properties
3356type UserPropertiesFragment struct {
3357	// ProvisioningState - The provisioning status of the resource.
3358	ProvisioningState *string `json:"provisioningState,omitempty"`
3359	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
3360	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
3361}
3362
3363// UsersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3364type UsersDeleteFuture struct {
3365	azure.Future
3366}
3367
3368// Result returns the result of the asynchronous operation.
3369// If the operation has not completed it will return an error.
3370func (future *UsersDeleteFuture) Result(client UsersClient) (ar autorest.Response, err error) {
3371	var done bool
3372	done, err = future.DoneWithContext(context.Background(), client)
3373	if err != nil {
3374		err = autorest.NewErrorWithError(err, "labservices.UsersDeleteFuture", "Result", future.Response(), "Polling failure")
3375		return
3376	}
3377	if !done {
3378		err = azure.NewAsyncOpIncompleteError("labservices.UsersDeleteFuture")
3379		return
3380	}
3381	ar.Response = future.Response()
3382	return
3383}
3384
3385// VirtualMachineDetails details of the backing virtual machine.
3386type VirtualMachineDetails struct {
3387	// ProvisioningState - READ-ONLY; Provisioning state of the Dtl VM
3388	ProvisioningState *string `json:"provisioningState,omitempty"`
3389	// RdpAuthority - READ-ONLY; Connection information for Windows
3390	RdpAuthority *string `json:"rdpAuthority,omitempty"`
3391	// SSHAuthority - READ-ONLY; Connection information for Linux
3392	SSHAuthority *string `json:"sshAuthority,omitempty"`
3393	// PrivateIPAddress - READ-ONLY; PrivateIp address of the compute VM
3394	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
3395	// UserName - READ-ONLY; Compute VM login user name
3396	UserName *string `json:"userName,omitempty"`
3397	// LastKnownPowerState - READ-ONLY; Last known compute power state captured in DTL
3398	LastKnownPowerState *string `json:"lastKnownPowerState,omitempty"`
3399}
3400
3401// VMStateDetails details about the state of the reference virtual machine.
3402type VMStateDetails struct {
3403	// RdpAuthority - READ-ONLY; The RdpAuthority property is a server DNS host name or IP address followed by the service port number for RDP (Remote Desktop Protocol).
3404	RdpAuthority *string `json:"rdpAuthority,omitempty"`
3405	// SSHAuthority - READ-ONLY; The SshAuthority property is a server DNS host name or IP address followed by the service port number for SSH.
3406	SSHAuthority *string `json:"sshAuthority,omitempty"`
3407	// PowerState - READ-ONLY; The power state of the reference virtual machine.
3408	PowerState *string `json:"powerState,omitempty"`
3409	// LastKnownPowerState - READ-ONLY; Last known compute power state captured in DTL
3410	LastKnownPowerState *string `json:"lastKnownPowerState,omitempty"`
3411}
3412